Source: pd-flext Version: 0.6.0+git20161101.1.01318a94-3 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
pd-flext fails to cross build from source, because it abuses AC_CHECK_FILE for finding development files such as headers. The macro is meant to locate files on the host system, but here it is being used to search the build system. For that use, a simple "test -f" is better suited. The attached patch makes pd-flext cross buildable. Please consider applying it. Helmut
--- pd-flext-0.6.0+git20161101.1.01318a94.orig/configure.ac +++ pd-flext-0.6.0+git20161101.1.01318a94/configure.ac @@ -33,7 +33,7 @@ [ if test $win; then # LATER: shouldn't we use AC_CHECK_LIB([pd]) ? - AC_CHECK_FILE([$withval/pd.dll],,AC_MSG_ERROR([Cannot find $withval/pd.dll])) + AS_IF([test -f "$withval/pd.dll"],,AC_MSG_ERROR([Cannot find $withval/pd.dll])) fi LIBDIRS="$LIBDIRS $withval" ], @@ -47,8 +47,8 @@ if test $SYSTEM == max; then AC_DEFINE(FLEXT_SYS,1) # check for MaxAPI.h in pd folder - AC_CHECK_FILE([$sdkdir/max-includes/MaxAPI.h],,AC_MSG_ERROR([Cannot find $sdkdir/max-includes/MaxAPI.h])) - AC_CHECK_FILE([$sdkdir/max-includes/MaxAudioAPI.h],,AC_MSG_ERROR([Cannot find $sdkdir/max-includes/MaxAudioAPI.h])) + AS_IF([test -f "$sdkdir/max-includes/MaxAPI.h"],,AC_MSG_ERROR([Cannot find $sdkdir/max-includes/MaxAPI.h])) + AS_IF([test -f "$sdkdir/max-includes/MaxAudioAPI.h"],,AC_MSG_ERROR([Cannot find $sdkdir/max-includes/MaxAudioAPI.h])) INCLUDEDIRS="$INCLUDEDIRS $sdkdir/max-includes $sdkdir/msp-includes" elif test $SYSTEM == pd; then @@ -57,7 +57,7 @@ AC_DEFINE(FLEXT_SYS,2) # check for g_canvas.h in pd folder - AC_CHECK_FILE([$sdkdir/g_canvas.h],,AC_MSG_ERROR([Cannot find $sdkdir/g_canvas.h])) + AS_IF([test -f "$sdkdir/g_canvas.h"],,AC_MSG_ERROR([Cannot find $sdkdir/g_canvas.h])) INCLUDEDIRS="$INCLUDEDIRS $sdkdir" if test $win; then @@ -71,7 +71,7 @@ AC_ARG_WITH(atomic_ops, AC_HELP_STRING(--with-atomic_ops,[path to atomic_ops library (needed for gcc version < 4.1 on non-i386 cpus)]), [ - AC_CHECK_FILE([$withval/atomic_ops.h],,AC_MSG_ERROR([Cannot find $withval/atomic_ops.h])) + AS_IF([test -f "$withval/atomic_ops.h"],,AC_MSG_ERROR([Cannot find $withval/atomic_ops.h])) INCLUDEDIRS="$INCLUDEDIRS $withval" AC_DEFINE(USE_ATOMIC_OPS) ] @@ -80,7 +80,7 @@ AC_ARG_WITH(stkdir, AC_HELP_STRING(--with-stkdir,[path to STK headers]), [ - AC_CHECK_FILE([$withval/Stk.h],,AC_MSG_ERROR([Cannot find $withval/Stk.h])) + AS_IF([test -f "$withval/Stk.h"],,AC_MSG_ERROR([Cannot find $withval/Stk.h])) stkdir=$withval INCLUDEDIRS="$INCLUDEDIRS $withval" ] @@ -91,7 +91,7 @@ AC_ARG_WITH(sndobjdir, AC_HELP_STRING(--with-sndobjdir,[path to SndObj headers]), [ - AC_CHECK_FILE([$withval/SndObj.h],,AC_MSG_ERROR([Cannot find $withval/SndObj.h])) + AS_IF([test -f "$withval/SndObj.h"],,AC_MSG_ERROR([Cannot find $withval/SndObj.h])) sndobjdir=$withval INCLUDEDIRS="$INCLUDEDIRS $withval" ]