libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCO/buffix patch 6 of 10: AC_PROG_NM fixes


From: Ralf Wildenhues
Subject: Re: SCO/buffix patch 6 of 10: AC_PROG_NM fixes
Date: Sun, 13 Nov 2005 20:59:20 +0100
User-agent: Mutt/1.5.9i

Hi Tim, Kean,

Regarding the AC_PROG_NM issue:

* Ralf Wildenhues wrote on Sat, Nov 05, 2005 at 08:54:26AM CET:
> 
> Then AFAICS there's only the /usr/ccs/bin/elf path issue left, and the
> $ac_tool_prefix one.  Regarding the latter, I should add that CVS
> Autoconf has the following description for AC_CHECK_TOOL:
*snip*
> It may be a good idea for libtool as well not to use the unprefixed name
> in the cross-compiling case (or, more appropriately: document that such
> a change will happen eventually).

Here's a proposed (not much tested yet) patch for this, shown without
changing the indentation of the inner loop, so that the actual code
changes are easily visible.  Could you check that this works for you?

Thanks,
Ralf

        * libtool.m4 (AC_PROG_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'.

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.134
diff -u -r1.314.2.134 libtool.m4
--- libtool.m4  13 Nov 2005 19:36:34 -0000      1.314.2.134
+++ libtool.m4  13 Nov 2005 19:47:14 -0000
@@ -2412,11 +2412,16 @@
   # Let the user override the test.
   lt_cv_path_NM="$NM"
 else
+  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 /usr/ucb /bin; do
+  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/${ac_tool_prefix}nm"
+    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:
@@ -2443,6 +2448,7 @@
     fi
   done
   IFS="$lt_save_ifs"
+  done
   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 fi])
 NM="$lt_cv_path_NM"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]