Source: gnucobol3
Version: 3.1.2-4
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

gnucobol3 fails to cross build from source, because it abuses
AC_CHECK_FILE. The macro is meant to check for files on the host system,
but it is used to check for files inside the build tree. Please use test
-e for that purpose instead. The attached patch fixes the relevant uses,
but it does not make gnucobol3 cross buildable, because it still fails
due to help2man. Please consider applying the patch and close this bug
when doing so anyway.

Helmut
--- gnucobol3-3.1.2.orig/configure.ac
+++ gnucobol3-3.1.2/configure.ac
@@ -830,7 +830,7 @@
 	AC_MSG_NOTICE([Checks for local cJSON ...])
 	curr_libs="$LIBS"; curr_cppflags="$CPPFLAGS"
 	with_cjson_local=no
-	AC_CHECK_FILE([./libcob/cJSON.c],
+	AS_IF([test -e ./libcob/cJSON.c],
 	  [AC_MSG_CHECKING([if linking of ./libcob/cJSON.c works])
 	   CPPFLAGS="$curr_cppflags -I./libcob"
 	   LIBS="$LIBS $COMMON_LIBS"
@@ -848,7 +848,7 @@
 	   LIBS="$curr_libs"]
 	)
 	if test "$with_cjson_local" = "no"; then
-	  AC_CHECK_FILE([$srcdir/libcob/cJSON.c],
+	  AS_IF([test -e "$srcdir/libcob/cJSON.c"],
 	    [AC_MSG_CHECKING([if linking of $srcdir/libcob/cJSON.c works])
 	     CPPFLAGS="$curr_cppflags -I$srcdir/libcob"
 	     LIBS="$LIBS $COMMON_LIBS"

Reply via email to