]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/m4/libtool.m4 (LT_PATH_NM): Also look in
authorKean Johnston <jkj@sco.com>
Sun, 18 Dec 2005 13:09:45 +0000 (13:09 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 18 Dec 2005 13:09:45 +0000 (13:09 +0000)
/usr/ccs/bin/elf, for SCO.  If we are not cross-compiling, but
$ac_tool_prefix is set, also try an un-prefixed `nm'.

ChangeLog
libltdl/m4/libtool.m4

index 23065bff17ca7402d6427b4b569caabf806332a3..1c1a24c03f2c62a647f6e0fad258f7884cd60564 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-18  Kean Johnston  <jkj@sco.com>,
+           Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * 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 <Ralf.Wildenhues@gmx.de>
 
        * libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG)
index 080de144986ee0f861d86cf116c628a9c5521a57..fb001077136e424270f3dc8de9bf98c086f23c08 100644 (file)
@@ -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