Here in NetBSD land we aren't that happy using file(1) for
deplibs_check_method...
The reason that pass_all can't be used is that on some platforms linking
in a library of the form libfoo.a can cause problems. So Todd suggested
we use echo with file_magic and patterns that ld(1) uses to match shared
libraries. These patterns don't actually match the real library (on ELF)
and so this uses of file_magic fails as it follows symlinks.
So what to do... I have two suggestions
1) Change file_magic so that it doesn't follow symlinks - this will
probably cause problems with the platforms that don't specify
file_magic_cmd='file -L'
2) Create a new deplibs_check_method, e.g. match_pattern, diff (against
head) attached.
Thoughts?
Nick
--
aka [EMAIL PROTECTED], [EMAIL PROTECTED]
? test.log
? install-sh
? mkinstalldirs
? missing
? INSTALL
? COPYING
Index: libtool.m4
===================================================================
RCS file: /home/cvs/libtool/libtool.m4,v
retrieving revision 1.151
diff -c -r1.151 libtool.m4
*** libtool.m4 2001/03/16 03:58:51 1.151
--- libtool.m4 2001/03/23 17:45:34
***************
*** 3123,3134 ****
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
! [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared
library']
else
! [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared
object']
fi
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
newos6*)
--- 3123,3132 ----
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
! [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
else
! [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
fi
;;
newos6*)
Index: ltmain.in
===================================================================
RCS file: /home/cvs/libtool/ltmain.in,v
retrieving revision 1.246
diff -c -r1.246 ltmain.in
*** ltmain.in 2001/03/10 02:16:45 1.246
--- ltmain.in 2001/03/23 17:45:56
***************
*** 2565,2570 ****
--- 2565,2604 ----
fi
done # Gone through all deplibs.
;;
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" -a "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ if eval echo \"$potent_lib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by
+$a_deplib."
+ echo "*** I have the capability to make that library automatically
+link in when"
+ echo "*** you link to this library. But I can only do this if you
+have a"
+ echo "*** shared version of the library, which you do not appear to
+have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
none | unknown | *)
newdeplibs=""
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \