* 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.
This commit is contained in:
Alexandre Oliva 1999-01-13 10:38:45 +00:00 committed by Alexandre Oliva
parent 02fde1ea95
commit f9370ed9c2
3 changed files with 14 additions and 5 deletions

View File

@ -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>

8
libtool.m4 vendored
View 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"

View File

@ -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"