From: Kean Johnston Date: Sun, 18 Dec 2005 13:09:45 +0000 (+0000) Subject: * libltdl/m4/libtool.m4 (LT_PATH_NM): Also look in X-Git-Tag: release-2-1b~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c3e9801c32bdf52552d3c2a79cb1231249186bb;p=thirdparty%2Flibtool.git * libltdl/m4/libtool.m4 (LT_PATH_NM): Also look in /usr/ccs/bin/elf, for SCO. If we are not cross-compiling, but $ac_tool_prefix is set, also try an un-prefixed `nm'. --- diff --git a/ChangeLog b/ChangeLog index 23065bff1..1c1a24c03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-12-18 Kean Johnston , + Ralf Wildenhues + + * libltdl/m4/libtool.m4 (LT_PATH_NM): Also look in + /usr/ccs/bin/elf, for SCO. If we are not cross-compiling, but + $ac_tool_prefix is set, also try an un-prefixed `nm'. + 2005-12-18 Ralf Wildenhues * libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG) diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 080de1449..fb0010771 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -2968,37 +2968,43 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, # Let the user override the test. lt_cv_path_NM="$NM" else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - 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 - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_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 + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - ;; - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then