summaryrefslogtreecommitdiffstats
path: root/bin/ltmain.sh
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 /bin/ltmain.sh
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 'bin/ltmain.sh')
-rw-r--r--bin/ltmain.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/ltmain.sh b/bin/ltmain.sh
index 414c582..c353f6c 100644
--- a/bin/ltmain.sh
+++ b/bin/ltmain.sh
@@ -495,8 +495,13 @@ if test -z "$show_help"; then
-L*)
dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
case "$dir" in
- /* | [A-Za-z]:\\*)
+ /*)
# Add the corresponding hardcode_libdir_flag, if it is not identical.
+ finalize_shlibpath="$finalize_shlibpath$dir:"
+ ;;
+ [A-Za-z]:\\*)
+ # Add the corresponding hardcode_libdir_flag, if it is not identical.
+ finalize_shlibpath="$finalize_shlibpath$dir;"
;;
*)
$echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
@@ -1496,10 +1501,11 @@ else
if test -f \"\$progdir/\$program\"; then"
# Export our shlibpath_var if we have one.
- if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ if test -n "$shlibpath_var" &&
+ (test -n "$temp_rpath" || test -n "$finalize_shlibpath"); then
$echo >> $output "\
# Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+ $shlibpath_var=\"$finalize_shlibpath$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`