summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2009-08-31 18:38:17 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2009-08-31 18:38:17 (GMT)
commit3c0de7fb0cb1fdcc83bf376be6aead3abcc49e6e (patch)
treeb06170309bdc41e49843a6a7a66b94bb03bb43e5 /configure.in
parentee3ed7a67ff8a3d8a3ce2dac4e6942724ba33c85 (diff)
downloadhdf5-3c0de7fb0cb1fdcc83bf376be6aead3abcc49e6e.zip
hdf5-3c0de7fb0cb1fdcc83bf376be6aead3abcc49e6e.tar.gz
hdf5-3c0de7fb0cb1fdcc83bf376be6aead3abcc49e6e.tar.bz2
[svn-r17441] Purpose:
Merge from trunk Description: Merged revisions 17228 and 17440 from trunk to 1.8 Specifically, this brings support of --enable-static-exec flag into 1.8 Tested: Manually on jam, linew, smirom, liberty, plus h5committest. Currently, there is no automatic regression test that exists due to portability issues. Behavior is both different and undefined on certain systems (and while 'nm' command seems to exist on all machines, behavior is confirmed to be different on Mac, possibly others). Solution will be to set up some sort of framework in daily tests to build statically, remove shared paths, and verify executables can function.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in45
1 files changed, 26 insertions, 19 deletions
diff --git a/configure.in b/configure.in
index 9ae6ae9..f81750e 100644
--- a/configure.in
+++ b/configure.in
@@ -565,25 +565,6 @@ dnl Change back to the C language
AC_LANG_POP(C++)
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],
- [AC_HELP_STRING([--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 Check if they have Perl installed on their system. We only need Perl
dnl if they're using a GNU compiler.
dnl
@@ -993,6 +974,32 @@ EOF
;;
esac
+dnl ----------------------------------------------------------------------
+dnl Check if we should install only statically linked executables.
+dnl This check needs to occur after libtool is initialized because
+dnl we check a libtool cache value and may issue a warning based
+dnl on its result.
+AC_MSG_CHECKING([if we should install only statically linked executables])
+AC_ARG_ENABLE([static_exec],
+ [AC_HELP_STRING([--enable-static-exec],
+ [Install only statically linked executables
+ [default=no]])],
+ [STATIC_EXEC=$enableval])
+
+if test "X$STATIC_EXEC" = "Xyes"; then
+ echo "yes"
+ dnl Issue a warning if -static flag is not supported.
+ if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then
+ echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
+ fi
+ LT_STATIC_EXEC="-all-static"
+else
+ echo "no"
+ LT_STATIC_EXEC=""
+fi
+
+AC_SUBST([LT_STATIC_EXEC])
+
dnl Fix up the INSTALL macro if it's a relative path. We want the
dnl full-path to the binary instead.
case "$INSTALL" in