From f9370ed9c2fc6857033a80590670059260719554 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 13 Jan 1999 10:38:45 +0000 Subject: [PATCH] * 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. --- ChangeLog | 5 +++++ libtool.m4 | 8 +++++--- ltconfig.in | 6 ++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9cc59a6..36adaeba 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 c84e388e..6cf58b37 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 1f82d0a8..007d2d8e 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"