summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2000-09-12 07:53:49 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2000-09-12 07:53:49 (GMT)
commitcd2902be8328d0b006121a9cb64de968ee9b727c (patch)
tree8277fdb1c054ad246e035fe74194e3bbf133eb09 /configure.in
parenta33e9619aac03d6135e837fdf95956843dc662cb (diff)
downloadhdf5-cd2902be8328d0b006121a9cb64de968ee9b727c.zip
hdf5-cd2902be8328d0b006121a9cb64de968ee9b727c.tar.gz
hdf5-cd2902be8328d0b006121a9cb64de968ee9b727c.tar.bz2
[svn-r2537] I take the LDFLAGS macro, scan it for -L/<path> statements and add the
equivalent -R/<path> to the LT_LINK_EXE command. Therefore, any executables created will know where we got the different libraries from automagically.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 26 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 69f0248..abd1365 100644
--- a/configure.in
+++ b/configure.in
@@ -513,10 +513,10 @@ case $withval in
if test "X" != "$hdf4_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$hdf4_lib"
- AC_CHECK_LIB(z,deflate,,unset H5TOH4 TESTH5TOH4)
- AC_CHECK_LIB(jpeg,jpeg_start_compress,,unset H5TOH4 TESTH5TOH4)
- AC_CHECK_LIB(df,Hstartaccess,,unset H5TOH4 TESTH5TOH4)
- AC_CHECK_LIB(mfhdf,SDstart,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(z,deflate,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(jpeg,jpeg_start_compress,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(df,Hstartaccess,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(mfhdf,SDstart,,unset H5TOH4 TESTH5TOH4)
else
AC_CHECK_LIB(z,deflate,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(jpeg,jpeg_start_compress,,unset H5TOH4 TESTH5TOH4)
@@ -533,8 +533,6 @@ dnl command-line switch. The value is an include path and/or a library path.
dnl If the library path is specified then it must be preceded by a comma.
dnl
-ZLIB_DIR=/usr/lib
-
AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression],
,withval=yes)
case $withval in
@@ -560,7 +558,6 @@ case $withval in
if test "X" != "$zlib_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$zlib_lib"
- ZLIB_DIR=$zlib_lib
AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS")
else
AC_CHECK_LIB(z, compress)
@@ -568,8 +565,6 @@ case $withval in
;;
esac
-AC_SUBST(ZLIB_DIR)
-
dnl ----------------------------------------------------------------------
dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage
dnl driver.
@@ -1331,6 +1326,28 @@ else
fi
fi
+dnl ----------------------------------------------------------------------
+dnl Determine the runtime libraries we may need to include in the
+dnl libtools command so that executables will find the correct dynamic
+dnl libraries.
+dnl
+DYNAMIC_DIRS=""
+if test -n $LDFLAGS; then
+ for d in $LDFLAGS ; do
+ d=`echo $d | sed -e 's/-L/-R/g'`
+
+ dnl If the path isn't absolute, make it so by prepending the pwd
+ dnl to it.
+ case "$d" in
+ .*)
+ d=`pwd`/$d
+ ;;
+ esac
+
+ DYNAMIC_DIRS="$d $DYNAMIC_DIRS"
+ done
+fi
+AC_SUBST(DYNAMIC_DIRS)
dnl ----------------------------------------------------------------------
dnl Build the Makefiles. Almost every Makefile.in will begin with the line