Source: mathicgb
Version: 1.0~git20170606-2
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

mathicgb fails to cross build from source, because it abuses
AC_CHECK_FILE to discover source files on the build machine. The macro
is meant to check for files on the host. Please use simple "test -f"
here. The attached patch makes mathicgb cross buildable. Please consider
applying it.

Helmut
--- mathicgb-1.0~git20170606.orig/configure.ac
+++ mathicgb-1.0~git20170606/configure.ac
@@ -44,7 +44,7 @@
 AS_IF([test "x$with_gtest" == "x"], [with_gtest="download"])
 
 AS_IF([test "x$with_gtest" == "xdownload"],
-  [with_gtest="yes"; AC_CHECK_FILE([$GTEST_PATH/src/gtest-all.cc], [], [
+  [with_gtest="yes"; AS_IF([test -f "$GTEST_PATH/src/gtest-all.cc"], [], [
     echo "downloading of gtest disabled" >&2; exit 1
     mkdir -p "$GTEST_PATH";
     (
@@ -64,7 +64,7 @@
     fi
   ])],
   [test "x$with_gtest" == "xyes"], [
-    AC_CHECK_FILE([$GTEST_PATH/src/gtest-all.cc], [], [
+    AS_IF([test -f "$GTEST_PATH/src/gtest-all.cc"], [], [
       AC_MSG_ERROR([could not find gtest source at path $GTEST_PATH.])
     ])
   ],

Reply via email to