Source: gnucobol4 Version: 4.0~early~20200606-5 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
gnucobol4 fails to cross build from source, because it uses AC_CHECK_FILE to test for file existence inside the source tree while that macro is meant to test files on the host machine. Doing so makes ./configure fail in the absence of unreasonable cache variables. Please consider applying the attached patch to fix that. The patch does not make gnucobol4 cross buildable, because it also uses help2man. Generation of manual pages using help2man is a difficult topic for cross compilation with no obviously best solution. Therefore, this bug is only about the AC_CHECK_FILE part. Helmut
--- gnucobol4-4.0~early~20200606.orig/configure.ac +++ gnucobol4-4.0~early~20200606/configure.ac @@ -590,7 +590,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" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cJSON.c"]], @@ -601,7 +601,7 @@ )] ) 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" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cJSON.c"]],