]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4, ltconfig.in (NM): search for NM in PATH before
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 13 Jan 1999 10:38:45 +0000 (10:38 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 13 Jan 1999 10:38:45 +0000 (10:38 +0000)
/usr/ccs/bin, /usr/ucb and /bin.  However, if the found one isn't
BSD-compat keep searching.  If no BSD-compat is found, use the
first we found.

ChangeLog
libtool.m4
ltconfig.in

index c9cc59a659739dddc63e699d1d4bb222a9548a5d..36adaeba80b02b2c7dbd848dd8a9bc88378b49c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 1999-01-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * libtool.m4, ltconfig.in (NM): search for NM in PATH before
+       /usr/ccs/bin, /usr/ucb and /bin.  However, if the found one isn't
+       BSD-compat keep searching.  If no BSD-compat is found, use the
+       first we found.
+
        * THANKS: added Raffaele Sena
 
 1999-01-13  Raffaele Sena  <raff@aromatic.com>
index c84e388e289fa8c54023acef5e6ac00cc3230a9e..6cf58b378b7a1a55c3f16ec7309ad3a71f842c29 100644 (file)
@@ -303,7 +303,7 @@ AC_CACHE_VAL(ac_cv_path_NM,
   ac_cv_path_NM="$NM"
 else
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/nm; then
       # Check to see if the nm accepts a BSD-compat flag.
@@ -311,12 +311,14 @@ else
       #   nm: unknown option "B" ignored
       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
         ac_cv_path_NM="$ac_dir/nm -B"
+       break
       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
         ac_cv_path_NM="$ac_dir/nm -p"
+       break
       else
-        ac_cv_path_NM="$ac_dir/nm"
+        ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+       continue # so that we can try to find one that supports BSD flags
       fi
-      break
     fi
   done
   IFS="$ac_save_ifs"
index 1f82d0a804c70a5f479fa17cae66cca48557bdda..007d2d8ea8b87e426614fa4b5d5815c806ec14a1 100755 (executable)
@@ -1340,12 +1340,14 @@ if test -z "$NM"; then
        #   nm: unknown option "B" ignored
        if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
          NM="$ac_dir/nm -B"
+         break
        elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
          NM="$ac_dir/nm -p"
+         break
        else
-         NM="$ac_dir/nm"
+         NM=${NM="$ac_dir/nm"} # keep the first match, but
+         continue # so that we can try to find one that supports BSD flags
        fi
-       break
       fi
     done
     IFS="$ac_save_ifs"