diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 229 |
1 files changed, 195 insertions, 34 deletions
@@ -1595,6 +1595,101 @@ fi +# Do some error checking and defaulting for the host and target type. +# The inputs are: +# configure --host=HOST --target=TARGET --build=BUILD NONOPT +# +# The rules are: +# 1. You are not allowed to specify --host, --target, and nonopt at the +# same time. +# 2. Host defaults to nonopt. +# 3. If nonopt is not specified, then host defaults to the current host, +# as determined by config.guess. +# 4. Target and build default to nonopt. +# 5. If nonopt is not specified, then target and build default to host. + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +case $host---$target---$nonopt in +NONE---*---* | *---NONE---* | *---*---NONE) ;; +*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; +esac + + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1626: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:1647: checking target system type" >&5 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:1665: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + + +case "$host_os" in + linux*) + CFLAGS= ;; +esac + + # Check whether --with-user or --without-user was given. if test "${with_user+set}" = set; then @@ -1629,6 +1724,10 @@ if [ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]; exit fi; +if test x$LVM1 = xinternal; then + CFLAGS="$CFLAGS -DLVM1_INTERNAL" +fi + # Check whether --enable-jobs or --disable-jobs was given. if test "${enable_jobs+set}" = set; then enableval="$enable_jobs" @@ -1657,6 +1756,10 @@ else fi +if test x$READLINE = xyes; then + CFLAGS="$CFLAGS -DREADLINE_SUPPORT" +fi + # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -1677,19 +1780,23 @@ else fi +if test x$DEVMAPPER = xyes; then + CFLAGS="$CFLAGS -DDEVMAPPER_SUPPORT" +fi + if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]; then exec_prefix=""; fi; if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1687: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1794: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext <<EOF -#line 1693 "configure" +#line 1800 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -1707,7 +1814,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 1711 "configure" +#line 1818 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -1729,12 +1836,12 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1733: checking return type of signal handlers" >&5 +echo "configure:1840: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1738 "configure" +#line 1845 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -1751,7 +1858,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1770,12 +1877,12 @@ EOF echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1774: checking for vprintf" >&5 +echo "configure:1881: 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 <<EOF -#line 1779 "configure" +#line 1886 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vprintf(); below. */ @@ -1798,7 +1905,7 @@ vprintf(); ; return 0; } EOF -if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1909: \"$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 @@ -1822,12 +1929,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1826: checking for _doprnt" >&5 +echo "configure:1933: 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 <<EOF -#line 1831 "configure" +#line 1938 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt(); below. */ @@ -1850,7 +1957,7 @@ _doprnt(); ; return 0; } EOF -if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1961: \"$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 @@ -1877,12 +1984,12 @@ fi for ac_func in mkdir rmdir uname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1881: checking for $ac_func" >&5 +echo "configure:1988: 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 <<EOF -#line 1886 "configure" +#line 1993 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1905,7 +2012,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2016: \"$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 @@ -1933,14 +2040,14 @@ done if test x$READLINE = xyes; then echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 -echo "configure:1937: checking for library containing tgetent" >&5 +echo "configure:2044: checking for library containing tgetent" >&5 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_tgetent="no" cat > conftest.$ac_ext <<EOF -#line 1944 "configure" +#line 2051 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1951,7 +2058,7 @@ int main() { tgetent() ; return 0; } EOF -if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_tgetent="none required" else @@ -1962,7 +2069,7 @@ rm -f conftest* test "$ac_cv_search_tgetent" = "no" && for i in ncurses curses termcap termlib; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 1966 "configure" +#line 2073 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1973,7 +2080,7 @@ int main() { tgetent() ; return 0; } EOF -if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_tgetent="-l$i" break @@ -2006,7 +2113,7 @@ fi fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2010: checking for dlopen in -ldl" >&5 +echo "configure:2117: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2014,7 +2121,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2018 "configure" +#line 2125 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2025,7 +2132,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2048,12 +2155,54 @@ fi if test x$HAVE_LIBDL = xyes; then + CFLAGS="$CFLAGS -DHAVE_LIBDL" LIBS="-ldl $LIBS" fi +for ac_hdr in getopt.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2167: 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 +#line 2172 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2177: \"$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 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + CFLAGS="$CFLAGS -DHAVE_GETOPTLONG" +else + echo "$ac_t""no" 1>&6 +fi +done + + if test x$READLINE = xyes; then echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:2057: checking for readline in -lreadline" >&5 +echo "configure:2206: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2061,7 +2210,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <<EOF -#line 2065 "configure" +#line 2214 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2072,7 +2221,7 @@ int main() { readline() ; return 0; } EOF -if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2109,12 +2258,12 @@ package as well (which may be called readline-devel or something similar). fi echo $ac_n "checking for rl_completion_matches""... $ac_c" 1>&6 -echo "configure:2113: checking for rl_completion_matches" >&5 +echo "configure:2262: checking for rl_completion_matches" >&5 if eval "test \"`echo '$''{'ac_cv_func_rl_completion_matches'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2118 "configure" +#line 2267 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char rl_completion_matches(); below. */ @@ -2137,7 +2286,7 @@ rl_completion_matches(); ; return 0; } EOF -if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_rl_completion_matches=yes" else @@ -2151,12 +2300,12 @@ fi if eval "test \"`echo '$ac_cv_func_'rl_completion_matches`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_RL_COMPLETION_MATCHES=yes + CFLAGS="$CFLAGS -DHAVE_RL_COMPLETION_MATCHES" else echo "$ac_t""no" 1>&6 -HAVE_RL_COMPLETION_MATCHES=no fi + fi if test "-f VERSION"; then @@ -2176,7 +2325,6 @@ fi - trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -2345,11 +2493,24 @@ s%@LN_S@%$LN_S%g s%@SET_MAKE@%$SET_MAKE%g s%@RANLIB@%$RANLIB%g s%@CPP@%$CPP%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g s%@JOBS@%$JOBS%g s%@STATIC_LINK@%$STATIC_LINK%g -s%@READLINE@%$READLINE%g s%@LVM1@%$LVM1%g -s%@HAVE_RL_COMPLETION_MATCHES@%$HAVE_RL_COMPLETION_MATCHES%g s%@OWNER@%$OWNER%g s%@GROUP@%$GROUP%g s%@LVM_VERSION@%$LVM_VERSION%g |