+2006-05-17 Albert Chin-A-Young <china@thewrittenword.com>
+
+ * libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4
+ (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG,
+ _LT_LANG_FC_CONFIG) [ aix4*, aix5*, hpux10*, hpux11* ]:
+ Introduce a new variable, hardcode_direct_static, which
+ would ignore hardcode_direct=yes if the result would create a
+ static library dependency. Static library dependencies are
+ immune to $shlibpath_var.
+ * tests/link-order.at: Take hardcode_direct and
+ hardcode_direct_static into consideration when testing
+ link order.
+
2006-05-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Eliminate quadratic scaling in argument parsing loop, for
but also turn comma into space so $LD understands
whole_archive_flag_spec correctly.
- * libltdl/config/ltmain.m4sh (func_mode_link) <shell wrapper>:
+ * libltdl/config/ltmain.m4sh (func_mode_link) <shell wrapper>:
Add _AS_BOURNE_COMPATIBLE code from Autoconf, to fix issues
with zsh and other shells.
Reported by David Gómez Espinosa <david@pleyades.net>.
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(hardcode_automatic, $1)=no
_LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_static, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
_LT_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
_LT_TAGVAR(archive_cmds, $1)=''
_LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_static, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_static, $1)=yes
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
;;
*)
_LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_static, $1)=yes
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
_LT_TAGDECL([], [hardcode_direct], [0],
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_static], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ static, impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
_LT_TAGDECL([], [hardcode_minus_L], [0],
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
into the resulting binary])
_LT_TAGVAR(archive_expsym_cmds, $1)=
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_static, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(archive_expsym_cmds, $1)=
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_static, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(archive_expsym_cmds, $1)=
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_static, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
AT_SETUP([Link order test.])
AT_KEYWORDS([libtool])
+eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|hardcode_direct_static|shrext_cmds)='`
LDFLAGS="$LDFLAGS -no-undefined"
prefix_old=`pwd`/old
aix* | interix*) ;; # These systems have different path syntax
*)
# Do not error if we do not relink (e.g. static-only systems)
- AT_CHECK([if $EGREP relinking stderr; then
- $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' stdout
- else :; fi], [0], [ignore], [], [echo "wrong link order"])
+ case $hardcode_direct$hardcode_direct_static in
+ yesno)
+ AT_CHECK([if $EGREP relinking stderr; then
+ $EGREP " .*\/new\/lib/libb$shrext_cmds .*\/old\/lib/libcee$shrext_cmds" stdout
+ else :; fi], [0], [ignore], [], [echo "wrong link order"])
+ ;;
+ *)
+ AT_CHECK([if $EGREP relinking stderr; then
+ $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+ else :; fi], [0], [ignore], [], [echo "wrong link order"])
+ ;;
+ esac
;;
esac