diff options
-rwxr-xr-x | c++/configure | 121 | ||||
-rw-r--r-- | c++/configure.in | 17 |
2 files changed, 88 insertions, 50 deletions
diff --git a/c++/configure b/c++/configure index b78c641..aaf5539 100755 --- a/c++/configure +++ b/c++/configure @@ -121,6 +121,8 @@ ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" +ac_help="$ac_help + --enable-static-exec Build only statically linked executables [default=no]" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -657,7 +659,7 @@ 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:661: checking host system type" >&5 +echo "configure:663: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -680,7 +682,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking shell variables initial values""... $ac_c" 1>&6 -echo "configure:684: checking shell variables initial values" >&5 +echo "configure:686: checking shell variables initial values" >&5 set >&5 echo "$ac_t""done" 1>&6 @@ -692,7 +694,7 @@ fi ROOT=`$pwd` echo $ac_n "checking for cached host""... $ac_c" 1>&6 -echo "configure:696: checking for cached host" >&5 +echo "configure:698: checking for cached host" >&5 if eval "test \"`echo '$''{'hdf5_cv_host'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -745,7 +747,7 @@ for f in $host_cpu-$host_vendor-$host_os \ $host_vendor \ $host_cpu ; do echo $ac_n "checking for config $f""... $ac_c" 1>&6 -echo "configure:749: checking for config $f" >&5 +echo "configure:751: checking for config $f" >&5 if test -f $srcdir/config/$f; then host_config=$srcdir/config/$f echo "$ac_t""found" 1>&6 @@ -763,7 +765,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:767: checking for $ac_word" >&5 +echo "configure:769: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -795,7 +797,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:799: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:801: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -806,12 +808,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 810 "configure" +#line 812 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -837,12 +839,12 @@ if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:841: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:843: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:846: checking whether we are using GNU C++" >&5 +echo "configure:848: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -851,7 +853,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -870,7 +872,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:874: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:876: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -902,7 +904,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:906: checking how to run the C++ preprocessor" >&5 +echo "configure:908: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -915,12 +917,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext <<EOF -#line 919 "configure" +#line 921 "configure" #include "confdefs.h" #include <stdlib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:926: \"$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 : @@ -945,7 +947,7 @@ CXXCPP="$ac_cv_prog_CXXCPP" echo "$ac_t""$CXXCPP" 1>&6 CXX_BASENAME="`echo $CXX |cut -f1 -d' ' |xargs basename 2>/dev/null`" echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:949: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:951: 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 @@ -983,7 +985,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:987: checking for a BSD compatible install" >&5 +echo "configure:989: 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 @@ -1105,7 +1107,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1109: checking build system type" >&5 +echo "configure:1111: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1125,7 +1127,7 @@ echo "$ac_t""$build" 1>&6 # 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:1129: checking for $ac_word" >&5 +echo "configure:1131: 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 @@ -1155,7 +1157,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:1159: checking for $ac_word" >&5 +echo "configure:1161: 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 @@ -1185,7 +1187,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:1189: checking for $ac_word" >&5 +echo "configure:1191: 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 @@ -1236,7 +1238,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:1240: checking for $ac_word" >&5 +echo "configure:1242: 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 @@ -1268,7 +1270,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1272: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1274: 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. @@ -1279,12 +1281,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1283 "configure" +#line 1285 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1290: \"$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 @@ -1310,12 +1312,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:1314: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1316: 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:1319: checking whether we are using GNU C" >&5 +echo "configure:1321: 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 @@ -1324,7 +1326,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1328: \"$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:1330: \"$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 @@ -1343,7 +1345,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:1347: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1349: 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 @@ -1386,7 +1388,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1390: checking for ld used by GCC" >&5 +echo "configure:1392: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1410,10 +1412,10 @@ echo "configure:1390: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1414: checking for GNU ld" >&5 +echo "configure:1416: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1417: checking for non-GNU ld" >&5 +echo "configure:1419: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1448,7 +1450,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1452: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1454: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1464,7 +1466,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1468: checking for BSD-compatible nm" >&5 +echo "configure:1470: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1500,7 +1502,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1504: checking whether ln -s works" >&5 +echo "configure:1506: 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 @@ -1549,8 +1551,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1553 "configure"' > conftest.$ac_ext - if { (eval echo configure:1554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1555 "configure"' > conftest.$ac_ext + if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1571,19 +1573,19 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1575: checking whether the C compiler needs -belf" >&5 +echo "configure:1577: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1580 "configure" +#line 1582 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1691,7 +1693,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:1695: checking for $ac_word" >&5 +echo "configure:1697: 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 @@ -1726,7 +1728,7 @@ fi if test -z "$SEARCH"; then echo $ac_n "checking how make searches directories""... $ac_c" 1>&6 -echo "configure:1730: checking how make searches directories" >&5 +echo "configure:1732: checking how make searches directories" >&5 while true; do #for break cat >maketest <<EOF VPATH=$srcdir/config $srcdir/src $srcdir/bin @@ -1789,6 +1791,24 @@ EOF rm maketest fi +echo $ac_n "checking if should build only statically linked executables""... $ac_c" 1>&6 +echo "configure:1796: checking if should build only statically linked executables" >&5 +# Check whether --enable-static_exec or --disable-static_exec was given. +if test "${enable_static_exec+set}" = set; then + enableval="$enable_static_exec" + STATIC_EXEC=$enableval +fi + + +if test "X$STATIC_EXEC" = "Xyes"; then + echo "yes" + LT_STATIC_EXEC="-all-static" +else + echo "no" + LT_STATIC_EXEC="" +fi + + ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1798,12 +1818,12 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if $CXX can handle namespaces""... $ac_c" 1>&6 -echo "configure:1802: checking if $CXX can handle namespaces" >&5 +echo "configure:1822: checking if $CXX can handle namespaces" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 1807 "configure" +#line 1827 "configure" #include "confdefs.h" #ifdef __cplusplus extern "C" void exit(int); @@ -1818,7 +1838,7 @@ int main(void) { return 0; } } EOF -if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo yes @@ -1837,12 +1857,12 @@ fi echo $ac_n "checking if $CXX needs old style header files in includes""... $ac_c" 1>&6 -echo "configure:1841: checking if $CXX needs old style header files in includes" >&5 +echo "configure:1861: checking if $CXX needs old style header files in includes" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 1846 "configure" +#line 1866 "configure" #include "confdefs.h" #ifdef __cplusplus extern "C" void exit(int); @@ -1853,7 +1873,7 @@ extern "C" void exit(int); int main(void) { return 0; } EOF -if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo no @@ -1921,7 +1941,7 @@ rm -f confcache echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:1925: checking make" >&5 +echo "configure:1945: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -1938,7 +1958,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:1942: checking how to include a makefile" >&5 +echo "configure:1962: checking how to include a makefile" >&5 cat >makeinc <<EOF foo: @@ -2178,6 +2198,7 @@ s%@CC@%$CC%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g s%@AR@%$AR%g +s%@LT_STATIC_EXEC@%$LT_STATIC_EXEC%g /@DEPEND@/r $DEPEND s%@DEPEND@%%g s%@DYNAMIC_DIRS@%$DYNAMIC_DIRS%g diff --git a/c++/configure.in b/c++/configure.in index 73126c6..e56219f 100644 --- a/c++/configure.in +++ b/c++/configure.in @@ -203,6 +203,23 @@ EOF fi dnl ---------------------------------------------------------------------- +dnl If we should build only static executables +dnl +AC_MSG_CHECKING(if should build only statically linked executables) +AC_ARG_ENABLE(static_exec, + [ --enable-static-exec Build only statically linked executables [default=no]], + STATIC_EXEC=$enableval) + +if test "X$STATIC_EXEC" = "Xyes"; then + echo "yes" + LT_STATIC_EXEC="-all-static" +else + echo "no" + LT_STATIC_EXEC="" +fi +AC_SUBST(LT_STATIC_EXEC) + +dnl ---------------------------------------------------------------------- dnl Checks for compiler characteristics. dnl AC_LANG_CPLUSPLUS |