[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] Use of expr subexpressions in ltmain.in
From: |
Paul Berrevoets |
Subject: |
[Patch] Use of expr subexpressions in ltmain.in |
Date: |
Thu, 16 Nov 2000 06:44:40 -0500 |
In light of recent discussion on the autoconf mailing list about the use
of expr subexpressions and what is returned upon failure, I am
submitting the attached patch. See:
http://mail.gnu.org/pipermail/autoconf/2000-November/008905.html
Note: I had experienced this problem before on HP-UX, but we have since
installed a patch which causes expr to return '' on subexpression match
failure.
--
Regards,
Paul
2000-11-16 Paul Berrevoets <address@hidden>
* ltmain.in: Check for '' and '0' when using expr subexpressions.
--- ltmain.in 2000/10/02 01:18:16 1.238
+++ ltmain.in 2000/11/16 11:25:44
@@ -2443,7 +2443,7 @@
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" ; then
+ if test "$name" != "" -a "$name" != "0" ; then
libname=`eval \\$echo \"$libname_spec\"`
deplib_matches=`eval \\$echo \"$library_names_spec\"`
set dummy $deplib_matches
@@ -2468,7 +2468,7 @@
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" ; then
+ if test "$name" != "" -a "$name" != "0" ; then
$rm conftest
$CC -o conftest conftest.c $i
# Did it work?
@@ -2508,7 +2508,7 @@
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" != "" ; then
+ 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`
- [Patch] Use of expr subexpressions in ltmain.in,
Paul Berrevoets <=