mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-12 14:06:37 +08:00
* ltmain.in: Implement a new deplibs_check_method called
match_pattern that does pattern matching on filenames... * libtool.m4: ...use it with NetBSD
This commit is contained in:
parent
b9cca8a2d6
commit
b9158c9d28
@ -1,3 +1,9 @@
|
||||
2001-04-06 Nick Hudson <skrll@netbsd.org>
|
||||
|
||||
* ltmain.in: Implement a new deplibs_check_method called
|
||||
match_pattern that does pattern matching on filenames...
|
||||
* libtool.m4: ...use it with NetBSD
|
||||
|
||||
2001-04-05 Gary V. Vaughan <gvv@techie.com>
|
||||
|
||||
* doc/libtool.texi (Multiple dependencies): A note about the
|
||||
|
6
libtool.m4
vendored
6
libtool.m4
vendored
@ -3142,12 +3142,10 @@ linux-gnu*)
|
||||
|
||||
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']
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
else
|
||||
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
|
||||
fi
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
||||
;;
|
||||
|
||||
newos6*)
|
||||
|
34
ltmain.in
34
ltmain.in
@ -2594,6 +2594,40 @@ EOF
|
||||
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$//' \
|
||||
|
Loading…
Reference in New Issue
Block a user