+2000-06-05 Ossama Othman <ossama@debian.org>
+
+ * ltcf-cxx.sh (compiler_lib_search_path), ltconfig.in
+ (compiler_lib_search_path), ltmain.in (libs): The library path
+ that the compiler uses internally was being placed before the one
+ supplied by the user. Added a loop that moves that path after the
+ user supplied one.
+ Reported by Stephan Kulow <coolo@kde.org> and Michael Matz
+ <matz@ifh.de>
+
2000-05-30 Gary V. Vaughan <gvv@techie.com>
* ltconfig.in (ORIGINAL_CONFIG_SHELL): Prevent lossage when
if eval $ac_compile 2>&5; then
# Parse the compiler output and extract the necessary
- # object, libraries and library flags.
+ # objects, libraries and library flags.
# Sentinel used to keep track of whether or not we are before
# the conftest object file.
fi
if test "$pre_test_object_deps_done" = no; then
- if test -z "$predeps"; then
- predeps="${prev}${p}"
- else
- predeps="${predeps} ${prev}${p}"
- fi
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path"; then
+ compiler_lib_search_path="${prev}${p}"
+ else
+ compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
else
if test -z "$postdeps"; then
postdeps="${prev}${p}"
postdep_objects=
predeps=
postdeps=
+compiler_lib_search_path=
## Link characteristics:
allow_undefined_flag=
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- predep_objects postdep_objects predeps postdeps \
+ predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
old_striplib striplib file_magic_cmd export_symbols_cmds \
deplibs_check_method allow_undefined_flag no_undefined_flag \
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
# shared library.
postdeps=$postdeps
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$compiler_lib_search_path
+
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$deplibs_check_method
done
if test $linkmode = lib; then
- libs="$predeps $libs $postdeps"
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
fi
deplibs=