Skip to contentSkip to conversation

configure: Check that "libtool" is not the MacOSX one

PATCH Applied Peter Maydell 2 participants 2 messages May 4, 2013 – May 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Check that "libtool" is not the MacOSX one

The "libtool" binary on MacOSX is not GNU libtool, and doesn't support anything like the same set of command line options. Test whether we have accidentally picked this up (by looking for whether it handles the GNU --version switch), and discard it if so. The fallback machinery for the "we don't have a libtool" case will work fine. This fixes a failure in "make install" on MacOSX.

---
 configure | 8 ++++++++
 1 file changed, 8 insertions(+)
configure +8 -0
index e818e8b..a9ff4ad 100755
@@ -1685,6 +1685,14 @@ if ! has $libtool; then
     libtool=
 fi
 
+# MacOSX ships with a libtool which isn't the GNU one; weed this
+# out by checking whether libtool supports the --version switch
+if test -n "$libtool"; then
+  if ! "$libtool" --version >/dev/null 2>&1; then
+    libtool=
+  fi
+fi
+
 ##########################################
 # Sparse probe
 if test "$sparse" != "no" ; then
Signature · 1 line
1.7.11.4