From: Alexandre Oliva Date: Wed, 13 Jan 1999 10:38:45 +0000 (+0000) Subject: * libtool.m4, ltconfig.in (NM): search for NM in PATH before X-Git-Tag: automake_1-4~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9370ed9c2fc6857033a80590670059260719554;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index c9cc59a65..36adaeba8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-01-13 Alexandre Oliva + * 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 diff --git a/libtool.m4 b/libtool.m4 index c84e388e2..6cf58b378 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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" diff --git a/ltconfig.in b/ltconfig.in index 1f82d0a80..007d2d8ea 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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"