summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-02-18 12:53:32 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-02-18 12:53:32 (GMT)
commit9ca6cfa0aa4720191647474a9ea5f828b10d165a (patch)
tree30e25904de5e590b7ae79423790bdb6a3f03f38f /configure.in
parent1fdf079abcd120421fe6453666bfc190bf07dd50 (diff)
downloadhdf5-9ca6cfa0aa4720191647474a9ea5f828b10d165a.zip
hdf5-9ca6cfa0aa4720191647474a9ea5f828b10d165a.tar.gz
hdf5-9ca6cfa0aa4720191647474a9ea5f828b10d165a.tar.bz2
[svn-r1975] Purpose:
Configuration improvement Problem: Arabica has a zlib library that is a dynamic lib in /usr/ncsa/lib. Binary generated would fail to run with a missig libz.so complain if /usr/ncsa/lib is not in $LD_LIBRARY_PATH. This exposed the problem that if the binary is linked with -L$mylibpath -lxyz where libxyz is a dynamic type, the binary can't run if $mylibpath is not in $LD_LIBRARY_PATH (or equivalent) or as part of the system default library paths (e.g., /usr/lib, /usr/local/lib). This problem also caused failures during configure (when trying to see what format to print long long) and during H5detect. The base cause is because libtool does not "transfer" the knowledge of -L$mylibpath to the wrapper file its mode=link generates. Solution: bin/ltmain.sh: Changed it so that it transfers the libpaths from -Llibpaths to the wrapper generated. I used the already defined variable finalize_shlibpath. Not sure it is correct to use it this way. Need to check on this. configure.in: Put in a patch to transfer information from LDFLAGS to LD_LIBRARY_PATH right before the AC_TRY_RUN. The above fix for ltmain.sh does not work here because libtool is generated later than this point. There should be a cleaner way to do this. Removed the hardcode of NCSA_LT_LINK_EXE because it is no longer needed. commence.in: Removed the hardcode of NCSA_LT_LINK_EXE because it is no longer needed. Makefile.in: Another patch of LDFLAGS to LD_LIBRARY_PATH because I could not make it to generate H5detect in the wrapper form of libtool. Need to make it to use the libtool correctly. Later. Platform tested: arabica (solaris 2.7) baldric (solaris 2.6)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 239e537..bdadc78 100644
--- a/configure.in
+++ b/configure.in
@@ -412,12 +412,6 @@ dnl NCSA keeps hdf4 in a funny place, but for most sites we don't want these.
test -d /usr/ncsa/include && CPPFLAGS="$CPPFLAGS -I/usr/ncsa/include"
test -d /usr/ncsa/lib && LDFLAGS="$LDFLAGS -L/usr/ncsa/lib"
-AC_SUBST(NCSA_LT_LINK_EXE)
-NCSA_LT_LINK_EXE=
-if test -d /usr/ncsa/lib; then
- NCSA_LT_LINK_EXE="$NCSA_LT_LINK_EXE -rpath /usr/ncsa/lib"
-fi
-
AC_ARG_WITH(hdf4,[ --with-hdf4=INC,LIB Use the HDF4 library],,withval=yes)
case $withval in
yes)
@@ -866,9 +860,14 @@ dnl ----------------------------------------------------------------------
dnl Try to figure out how to print `long long'. Some machines use `%lld'
dnl and others use `%qd'. There may be more! The final `l' is a
dnl default in case none of the others work.
+dnl Need to patch up LD_LIBRARY_PATH so that the execution can find all
+dnl the dynamic library. The correct way to do it should be updating
+dnl LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro.
dnl
AC_MSG_CHECKING(how to print long long)
AC_CACHE_VAL(hdf5_cv_printf_ll,
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
+export LD_LIBRARY_PATH
for hdf5_cv_printf_ll in l L q ll unknown; do
AC_TRY_RUN([
#include <stdio.h>