[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] New deplibs_check_method: match_pattern
From: |
Nick Hudson |
Subject: |
[PATCH] New deplibs_check_method: match_pattern |
Date: |
Fri, 06 Apr 2001 08:39:43 +0100 |
As per Gary's request
Nick
--
aka address@hidden, address@hidden
? test.log
? install-sh
? mkinstalldirs
? missing
? INSTALL
? COPYING
Index: ChangeLog
===================================================================
RCS file: /home/cvs/libtool/ChangeLog,v
retrieving revision 1.888
diff -c -r1.888 ChangeLog
*** ChangeLog 2001/04/05 23:43:38 1.888
--- ChangeLog 2001/04/06 07:31:15
***************
*** 1,3 ****
--- 1,10 ----
+ 2001-04-06 Nick Hudson <address@hidden>
+
+ * 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 <address@hidden>
* doc/libtool.texi (Multiple dependencies): A note about the
Index: libtool.m4
===================================================================
RCS file: /home/cvs/libtool/libtool.m4,v
retrieving revision 1.155
diff -c -r1.155 libtool.m4
*** libtool.m4 2001/04/05 23:16:16 1.155
--- libtool.m4 2001/04/06 07:31:32
***************
*** 3142,3153 ****
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*)
--- 3142,3151 ----
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.250
diff -c -r1.250 ltmain.in
*** ltmain.in 2001/04/05 23:09:37 1.250
--- ltmain.in 2001/04/06 07:31:51
***************
*** 2594,2599 ****
--- 2594,2633 ----
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$//' \
- [PATCH] New deplibs_check_method: match_pattern,
Nick Hudson <=