Whamcloud - gitweb
b=22967 s/LB_LINUX_CONFTEST/AC_LANG_CONFTEST/
authorBrian J. Murrell <brian@sun.com>
Tue, 24 Aug 2010 21:53:16 +0000 (17:53 -0400)
committerJohann Lombardi <johann.lombardi@oracle.com>
Wed, 25 Aug 2010 10:02:04 +0000 (12:02 +0200)
There was a macro update in more recent releases of autoconf that
requires us to use AC_LANG_CONFTEST instead of the LB_LINUX_CONFTEST
that we currently use.  The problem using LB_LINUX_CONFTEST causes
is that as configure is determining capabilities and setting capability
flags, these are not being used when compiling further conftest.c
programs.

So for example if a macro determines if foo is available and then sets
FOO if it is, and then a test in a subsequent macro tries to use FOO,
it will find it undefined.

i=michael.macdonald
i=andreas.dilger

build/autoconf/lustre-build-linux.m4

index ffdcd3f..ff27505 100644 (file)
@@ -365,7 +365,7 @@ $2
 # like AC_COMPILE_IFELSE
 #
 AC_DEFUN([LB_LINUX_COMPILE_IFELSE],
-[m4_ifvaln([$1], [LB_LINUX_CONFTEST([$1])])dnl
+[m4_ifvaln([$1], [AC_LANG_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],