diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2009-08-31 16:21:56 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2009-08-31 16:21:56 (GMT) |
commit | 49b638104c63f0f664703124724d582560f26ec0 (patch) | |
tree | 59cce29d6470fefac2a5a8dfbfa9f6400baa0539 /configure.in | |
parent | f88607ed2482c694a23518fb8602543344b9d838 (diff) | |
download | hdf5-49b638104c63f0f664703124724d582560f26ec0.zip hdf5-49b638104c63f0f664703124724d582560f26ec0.tar.gz hdf5-49b638104c63f0f664703124724d582560f26ec0.tar.bz2 |
[svn-r17440] Purpose:
Add warning to configure
Description:
Patched up the configure script to issue a warning when the user
has supplied the --enable-static-exec flag on a system that libtool
indicates does not support the -static linker flag.
Tested:
jam, smirom, linew, liberty.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/configure.in b/configure.in index 2442794..8b0e4c3 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 @@ -3061,7 +3068,7 @@ dnl the conversion to float.) dnl AC_MSG_CHECKING([if accurately converting unsigned long to float values]) -AC_CACHE_VAL([hdf5_ulong_to_float_accurate], +AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate], [AC_TRY_RUN([ int main(void) { |