From: Mo DeJong Date: Mon, 10 Jul 2000 09:42:18 +0000 (+0000) Subject: * libtool.m4 (AC_PROG_NM): Fix macro so that it X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62a5246fd718298e778f441d6a3920f8386e807d;p=thirdparty%2Flibtool.git * libtool.m4 (AC_PROG_NM): Fix macro so that it finds a cross NM on the PATH. --- diff --git a/ChangeLog b/ChangeLog index 8d7fd8f78..de7a81b17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-07-10 Mo DeJong + + * libtool.m4 (AC_PROG_NM): Fix macro so that it + finds a cross NM on the PATH. + 2000-07-10 Maciej W. Rozycki * Makefile.am (libtool): Pass $(host_alias) to ltconfig. diff --git a/libtool.m4 b/libtool.m4 index 35b627368..6788fe845 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -324,18 +324,19 @@ else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + tmp_nm=$ac_dir/${ac_tool_prefix}nm + if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # 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" + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_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" + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_nm -p" break else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi