* Brian J. Murrell wrote on Mon, Mar 01, 2010 at 11:03:26PM CET: > AC_INIT([pkg], [1.0]) > > # > # LB_LINUX_COMPILE_IFELSE > # > # like AC_COMPILE_IFELSE > # > AC_DEFUN([LB_LINUX_COMPILE_IFELSE], > [m4_ifvaln([$1], [LB_LINUX_CONFTEST([$1])])dnl > rm -f build/conftest.o build/conftest.mod.c build/conftest.ko > AS_IF([AC_TRY_COMMAND(cp conftest.c build && make -d [$2] ${LD:+"LD=$LD"} CC="$CC" -f $PWD/build/Makefile LUSTRE_LINUX_CONFIG=$LINUX_CONFIG LINUXINCLUDE="$EXTRA_LNET_INCLUDE -I$LINUX/arch/`uname -m|sed -e 's/ppc.*/powerpc/' -e 's/x86_64/x86/' -e 's/i.86/x86/'`/include -I$LINUX/include -I$LINUX_OBJ/include -I$LINUX_OBJ/include2 -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM $MODULE_TARGET=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])], > [$4], > [_AC_MSG_LOG_CONFTEST > m4_ifvaln([$5],[$5])dnl]) > rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko m4_ifval([$1], [build/conftest.c conftest.c])[]dnl > ]) > > LB_LINUX_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <linux/thread_info.h> > #if THREAD_SIZE < 8192 > #error "stack size < 8192" > #endif > ]],[],[echo foo])]) > --------- > > As you can see it's similar to your test case but when I try to autoconf > it I get: > > $ autoconf > configure.ac:18: error: possibly undefined macro: AC_LANG_SOURCE You also need a definition of LB_LINUX_CONFTEST, since you use it in LB_LINUX_COMPILE_IFELSE. autoconf expands the $1 argument in that undefined macro to the string AC_LANG_SOURCE and complains, because, without LB_LINUX_CONFTEST being a macro, its argument is sufficiently quoted to not undergo m4 expansion. Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf