From: Mo DeJong Date: Mon, 10 Jul 2000 09:42:21 +0000 (+0000) Subject: * libtool.m4 (AC_PROG_NM): Fix macro so that it X-Git-Tag: release-1-3d~153 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53779eeb795efc00df725d38cfbf59b34a5f4bd2;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 4a29d89aa..ca588c8ac 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 Ken Block * libltdl/ltdl.h: Also check for __cplusplus, __STDC__ is not diff --git a/libtool.m4 b/libtool.m4 index d48e7cab1..4ca45fc26 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -626,18 +626,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