From f8bd9807037836d99c8482dfe0572f8f22d55baa Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 26 Oct 1999 04:19:45 +0000 Subject: [PATCH] ChangeLog, configure, configure.in: configure.in: Move the code that checks for the presence of Linux header files, to earlier in the config file, since it adds a directory to the include path, and that needs to happen before any compile tests are run. --- ChangeLog | 7 ++ configure | 390 +++++++++++++++++++++++++++++------------------------------ configure.in | 28 ++--- 3 files changed, 216 insertions(+), 209 deletions(-) diff --git a/ChangeLog b/ChangeLog index 828931e2..c73786bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-10-26 + + * configure.in: Move the code that checks for the presence of + Linux header files, to earlier in the config file, since + it adds a directory to the include path, and that needs to + happen before any compile tests are run. + 1999-10-25 * configure.in: Capitalized Hurd to make the GNU folks happy. diff --git a/configure b/configure index 5bcb9ddc..49aedbe5 100644 --- a/configure +++ b/configure @@ -669,6 +669,131 @@ else CCOPTS= fi +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:674: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +ac_safe=`echo "linux/fs.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6 +echo "configure:755: checking for linux/fs.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + linux_headers=yes +else + echo "$ac_t""no" 1>&6 +linux_headers=no +fi + +if test "$linux_headers" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_FS_H 1 +EOF + +else + LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include' + # Use this include directory with test compiles in the configure script too. + CPPFLAGS="$CPPFLAGS -I$srcdir/include -I./include" +fi + LIB_EXT=.a STATIC_LIB_EXT=.a PROFILE_LIB_EXT=.a @@ -901,7 +1026,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:905: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1030: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -930,7 +1055,7 @@ fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:934: checking for $ac_word" >&5 +echo "configure:1059: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -964,7 +1089,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:968: checking whether ln -s works" >&5 +echo "configure:1093: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -987,7 +1112,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:991: checking for $ac_word" >&5 +echo "configure:1116: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1023,7 +1148,7 @@ fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1027: checking for $ac_word" >&5 +echo "configure:1152: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1059,7 +1184,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1063: checking for $ac_word" >&5 +echo "configure:1188: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1095,7 +1220,7 @@ fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1099: checking for $ac_word" >&5 +echo "configure:1224: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1131,7 +1256,7 @@ fi # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1135: checking for $ac_word" >&5 +echo "configure:1260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1167,7 +1292,7 @@ fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1171: checking for $ac_word" >&5 +echo "configure:1296: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1203,7 +1328,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1207: checking for $ac_word" >&5 +echo "configure:1332: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1237,7 +1362,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1241: checking build system type" >&5 +echo "configure:1366: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1263,7 +1388,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1267: checking for $ac_word" >&5 +echo "configure:1392: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1295,7 +1420,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1299: checking for $ac_word" >&5 +echo "configure:1424: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1330,7 +1455,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1334: checking for $ac_word" >&5 +echo "configure:1459: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1362,7 +1487,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1366: checking for $ac_word" >&5 +echo "configure:1491: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1397,7 +1522,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1401: checking for $ac_word" >&5 +echo "configure:1526: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1429,7 +1554,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1433: checking for $ac_word" >&5 +echo "configure:1558: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1464,7 +1589,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1468: checking for $ac_word" >&5 +echo "configure:1593: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1494,7 +1619,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1498: checking for $ac_word" >&5 +echo "configure:1623: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1545,7 +1670,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1549: checking for $ac_word" >&5 +echo "configure:1674: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1577,7 +1702,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1581: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1588,12 +1713,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1592 "configure" +#line 1717 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1619,12 +1744,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1623: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1748: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1628: checking whether we are using GNU C" >&5 +echo "configure:1753: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1633,7 +1758,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1652,7 +1777,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1656: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1781: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1695,7 +1820,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1699: checking for a BSD compatible install" >&5 +echo "configure:1824: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1758,7 +1883,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1762: checking for $ac_word" >&5 +echo "configure:1887: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1788,101 +1913,21 @@ test -n "$BUILD_CC" && break done fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1793: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - for ac_hdr in stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h linux/fd.h linux/major.h sys/disklabel.h sys/sockio.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1876: checking for $ac_hdr" >&5 +echo "configure:1921: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1909,12 +1954,12 @@ fi done echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1913: checking for vprintf" >&5 +echo "configure:1958: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1961,12 +2006,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1965: checking for _doprnt" >&5 +echo "configure:2010: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2014,12 +2059,12 @@ fi fi echo $ac_n "checking whether struct dirent has a d_namlen field""... $ac_c" 1>&6 -echo "configure:2018: checking whether struct dirent has a d_namlen field" >&5 +echo "configure:2063: checking whether struct dirent has a d_namlen field" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_d_namlen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2027,7 +2072,7 @@ int main() { struct dirent de; de.d_namlen = 0; ; return 0; } EOF -if { (eval echo configure:2031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_d_namlen=yes else @@ -2047,19 +2092,19 @@ EOF fi echo $ac_n "checking whether llseek declared in unistd.h""... $ac_c" 1>&6 -echo "configure:2051: checking whether llseek declared in unistd.h" >&5 +echo "configure:2096: checking whether llseek declared in unistd.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_have_llseek_prototype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { extern int llseek(int); ; return 0; } EOF -if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_have_llseek_prototype=no else @@ -2087,7 +2132,7 @@ if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" 1>&2 fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2091: checking size of short" >&5 +echo "configure:2136: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2095,7 +2140,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2106,7 +2151,7 @@ main() exit(0); } EOF -if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2126,7 +2171,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2130: checking size of int" >&5 +echo "configure:2175: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2134,7 +2179,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2145,7 +2190,7 @@ main() exit(0); } EOF -if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2165,7 +2210,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2169: checking size of long" >&5 +echo "configure:2214: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2173,7 +2218,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2184,7 +2229,7 @@ main() exit(0); } EOF -if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2204,7 +2249,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:2208: checking size of long long" >&5 +echo "configure:2253: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2212,7 +2257,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2223,7 +2268,7 @@ main() exit(0); } EOF -if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -2251,19 +2296,19 @@ SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6 -echo "configure:2255: checking whether struct stat has a st_flags field" >&5 +echo "configure:2300: checking whether struct stat has a st_flags field" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat stat; stat.st_flags = 0; ; return 0; } EOF -if { (eval echo configure:2267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags=yes else @@ -2278,19 +2323,19 @@ fi echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6 if test "$e2fsprogs_cv_struct_st_flags" = yes; then echo $ac_n "checking whether st_flags field is useful""... $ac_c" 1>&6 -echo "configure:2282: checking whether st_flags field is useful" >&5 +echo "configure:2327: checking whether st_flags field is useful" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags_immut'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat stat; stat.st_flags |= UF_IMMUTABLE; ; return 0; } EOF -if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags_immut=yes else @@ -2313,12 +2358,12 @@ fi for ac_func in chflags getrusage llseek strdup getmntinfo strcasecmp srandom fchown mallinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2317: checking for $ac_func" >&5 +echo "configure:2362: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2366,19 +2411,19 @@ fi done echo $ac_n "checking ino_t defined by sys/types.h""... $ac_c" 1>&6 -echo "configure:2370: checking ino_t defined by sys/types.h" >&5 +echo "configure:2415: checking ino_t defined by sys/types.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ino_t ino; ino = 0; ; return 0; } EOF -if { (eval echo configure:2382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_ino_t=yes else @@ -2397,51 +2442,6 @@ if test "$e2fsprogs_cv_ino_t" = yes; then EOF fi -ac_safe=`echo "linux/fs.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6 -echo "configure:2403: checking for linux/fs.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - linux_headers=yes -else - echo "$ac_t""no" 1>&6 -linux_headers=no -fi - -if test "$linux_headers" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LINUX_FS_H 1 -EOF - -else - LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include' - # Use this include directory with test compiles in the configure script too. - CPPFLAGS="$CPPFLAGS -I$srcdir/include -I./include" -fi - SOCKET_LIB='' echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 echo "configure:2448: checking for socket in -lsocket" >&5 @@ -2820,6 +2820,8 @@ s%@host_os@%$host_os%g s%@CC@%$CC%g s%@LD@%$LD%g s%@CCOPTS@%$CCOPTS%g +s%@CPP@%$CPP%g +s%@LINUX_INCLUDE@%$LINUX_INCLUDE%g s%@DLL_CMT@%$DLL_CMT%g /@MAKEFILE_DLL@/r $MAKEFILE_DLL s%@MAKEFILE_DLL@%%g @@ -2867,12 +2869,10 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@BUILD_CC@%$BUILD_CC%g -s%@CPP@%$CPP%g s%@SIZEOF_SHORT@%$SIZEOF_SHORT%g s%@SIZEOF_INT@%$SIZEOF_INT%g s%@SIZEOF_LONG@%$SIZEOF_LONG%g s%@SIZEOF_LONG_LONG@%$SIZEOF_LONG_LONG%g -s%@LINUX_INCLUDE@%$LINUX_INCLUDE%g s%@SOCKET_LIB@%$SOCKET_LIB%g s%@root_prefix@%$root_prefix%g s%@LDFLAG_STATIC@%$LDFLAG_STATIC%g diff --git a/configure.in b/configure.in index 723ecd37..1c737e5d 100644 --- a/configure.in +++ b/configure.in @@ -77,6 +77,20 @@ CFLAGS="$CFLAGS $withval", CCOPTS=)dnl AC_SUBST(CCOPTS) dnl +dnl On systems without linux header files, we add an extra include directory +dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here +dnl is quoted so that it gets expanded by make, not by configure. +dnl +AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no]) +if test "$linux_headers" = yes; then + AC_DEFINE(HAVE_LINUX_FS_H) +else + LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include' + # Use this include directory with test compiles in the configure script too. + CPPFLAGS="$CPPFLAGS -I$srcdir/include -I./include" +fi +AC_SUBST(LINUX_INCLUDE) +dnl dnl Set default values for library extentions. Will be dealt with after dnl parsing configuration opions, which may modify these dnl @@ -423,20 +437,6 @@ if test "$e2fsprogs_cv_ino_t" = yes; then AC_DEFINE(HAVE_INO_T) fi dnl -dnl On systems without linux header files, we add an extra include directory -dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here -dnl is quoted so that it gets expanded by make, not by configure. -dnl -AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no]) -if test "$linux_headers" = yes; then - AC_DEFINE(HAVE_LINUX_FS_H) -else - LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include' - # Use this include directory with test compiles in the configure script too. - CPPFLAGS="$CPPFLAGS -I$srcdir/include -I./include" -fi -AC_SUBST(LINUX_INCLUDE) -dnl dnl Check to see if -lsocket is required (solaris) to make something dnl that uses socket() to compile; this is needed for the UUID library dnl -- 2.11.0