libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hardcoding library path dependency into library


From: Albert Chin
Subject: Hardcoding library path dependency into library
Date: Wed, 16 Jul 2003 11:49:31 -0500
User-agent: Mutt/1.4i

Say I'm on a platform with:
  # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  # resulting binary.
  hardcode_direct=yes

and I want to create a library with an embedded .so path dependency. I
don't see how this can ever work looking at ltmain.in. If the command
line is something like:
  $ libtool --mode=link xlc -o libgimp.la \
  -rpath /opt/TWWfsw/gimp12/lib -version-info 0:5:0 -release 1.2 \
  gimp.lo ... /opt/TWWfsw/gettext011/lib/libintl.so -liconv -lc -lm

then we have this in ltmain.in:
    # Go through the arguments, transforming them on the way.
    while test "$#" -gt 0; do
      ...

      # Some other compiler argument.
      *)
        ...

      # Now actually substitute the argument into the commands.
      if test -n "$arg"; then
        compile_command="$compile_command $arg"
        finalize_command="$finalize_command $arg"
      fi
    done # argument parsing loop

So $compile_command and $finalize_command will have
/opt/TWWfsw/gettext011/lib/libintl.so but $deplibs won't. Nothing in
$compile_command nor $finalize_command is used when --mode=link. How
should I solve this? Should I add a case statement to the loop above
looking for *.${shrext} and, if so, add it to deplibs if
hardcode_direct=yes?

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]