diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2011-04-11 21:00:38 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2011-04-11 21:00:38 (GMT) |
commit | e006157deb5866bf45ca0f092d42b7f9969e4209 (patch) | |
tree | 3e5e3db5969ab9cff933088a3a54b2f1df1435bb /configure | |
parent | a835d1e65a3dbae4feca742db93d0b2e1a9ff29c (diff) | |
download | hdf5-e006157deb5866bf45ca0f092d42b7f9969e4209.zip hdf5-e006157deb5866bf45ca0f092d42b7f9969e4209.tar.gz hdf5-e006157deb5866bf45ca0f092d42b7f9969e4209.tar.bz2 |
[svn-r20475] Purpose:
- Revise shared Fortran library disabling scenarios in configure
- Improve configure output summary
Description:
Shared Fortran libraries are not supported on Mac, but were being
disabled by configure in a way that also forced the C libraries
to be static-only. This has been fixed, so now only shared Fortran
is disabled while shared C can remain.
This prompted two additional changes:
1. While working on the check that addresses whether or not
shared Fortran libraries are allowed, removed old and no
longer needed check(s) that disable shared Fortran
libraries with HP, Intel 8, PGI, and Absoft compilers.
(Essentially, Mac is the only situation in which Fortran
shared are disabled by configure.)
2. Having two different states of libraries (i.e. shared C
library with static-only Fortran library) was not apparent
in the configure summary, which labeled all libraries as
either shared and/or static. I've added lines to both the
C++ and Fortran output sections to list shared/static-ness
of these libraries specifically.
Additionally, I've made sure that the new --enable-unsupported
configure option correctly overrides configure if it tries to
disable a shared library.
Tested:
jam, fred, & h5committest
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 86 |
1 files changed, 56 insertions, 30 deletions
@@ -692,8 +692,10 @@ SED LIBTOOL CXX_SHARED_CONDITIONAL_FALSE CXX_SHARED_CONDITIONAL_TRUE +H5_CXX_SHARED FORTRAN_SHARED_CONDITIONAL_FALSE FORTRAN_SHARED_CONDITIONAL_TRUE +H5_FORTRAN_SHARED TESTPARALLEL RUNPARALLEL RUNSERIAL @@ -7416,36 +7418,41 @@ elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then echo ' shared libraries explicitly enabled by user' fi -if test "X${HDF_FORTRAN}" = "Xyes"; then + +H5_FORTRAN_SHARED="no" +if test "X${HDF_FORTRAN}" = "Xyes" && test "X${enable_shared}" != "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5 +$as_echo_n "checking if shared Fortran libraries are supported... " >&6; } H5_FORTRAN_SHARED="yes" - if (${FC} -V 2>&1 | grep '^pgf90') > /dev/null; then + case "`uname`" in + Darwin*) H5_FORTRAN_SHARED="no" - fi + CHECK_WARN="Shared Fortran libraries not currently supported on Mac." + ;; + esac - if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then - if (${FC} -v 2>&1 | grep '^Version 8.') > /dev/null; then - H5_FORTRAN_SHARED="no" + if test "X${H5_FORTRAN_SHARED}" = "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 +$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared Fortran libraries." >&5 +$as_echo "$as_me: WARNING: Disabling shared Fortran libraries." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 +$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} + if test "X${enable_static}" = "Xno"; then + as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 + fi else - FCFLAGS="${FCFLAGS} -fPIC" - AM_FCFLAGS="${AM_FCFLAGS} -fPIC" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&5 +$as_echo "$as_me: WARNING: Allowing unsupported Fortran shared libraries due to use of --enable-unsupported flag" >&2;} + H5_FORTRAN_SHARED="yes" fi - fi - if (${FC} +version 2>&1 | grep '^HP F90') > /dev/null; then - H5_FORTRAN_SHARED="no" - fi - - if (${FC} -V 2>&1 | grep '^Absoft') > /dev/null; then - H5_FORTRAN_SHARED="no" - fi - - if test "X${enable_shared}" != "Xno" && test "X${H5_FORTRAN_SHARED}" = "Xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: shared libraries are not supported; disabling shared Fortran libraries" >&5 -$as_echo "$as_me: WARNING: shared libraries are not supported; disabling shared Fortran libraries" >&2;} - fi - - if test "X${enable_static}" = "Xno" && test "X${H5_FORTRAN_SHARED}" = "Xno"; then - as_fn_error $? "both static and shared Fortran libraries are disabled" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi fi @@ -7458,19 +7465,38 @@ else fi + H5_CXX_SHARED="no" if test "X${HDF_CXX}" = "Xyes" && test "X${enable_shared}" != "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared C++ libraries are supported" >&5 +$as_echo_n "checking if shared C++ libraries are supported... " >&6; } H5_CXX_SHARED="yes" - - if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then - echo " warning: +DD64 flag detected" - echo " disabling shared C++ libraries" + if (echo dummy ${CXX} ${CXXLD} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} | grep 'DD64') > /dev/null; then H5_CXX_SHARED="no" + CHECK_WARN="Shared C++ libraries not currently supported with +DD64 flag." fi - if test "X${enable_static}" = "Xno" && test "X${H5_CXX_SHARED}" = "Xno"; then - as_fn_error $? "both static and shared C++ libraries are disabled" "$LINENO" 5 + if test "X${H5_CXX_SHARED}" = "Xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CHECK_WARN" >&5 +$as_echo "$as_me: WARNING: $CHECK_WARN" >&2;} + if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling shared C++ libraries." >&5 +$as_echo "$as_me: WARNING: Disabling shared C++ libraries." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: To override this behavior, please use --enable-unsupported configure option." >&5 +$as_echo "$as_me: WARNING: To override this behavior, please use --enable-unsupported configure option." >&2;} + if test "X${enable_static}" = "Xno"; then + as_fn_error $? "both static and shared C++ libraries are disabled" "$LINENO" 5 + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Allowing unsupported C++ shared librares due to use of --enable-unsupported flag" >&5 +$as_echo "$as_me: WARNING: Allowing unsupported C++ shared librares due to use of --enable-unsupported flag" >&2;} + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi fi |