Check target libtool
authorMoritz Angermann <moritz.angermann@gmail.com>
Thu, 8 Jun 2017 18:59:20 +0000 (14:59 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 8 Jun 2017 19:35:58 +0000 (15:35 -0400)
This will qualify the libtool with the target, e.g.
arch-vendor-os-libtool, instead of simply using libtool.

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd

Differential Revision: https://phabricator.haskell.org/D3617

aclocal.m4
configure.ac

index adc70bc..d566f83 100644 (file)
@@ -491,8 +491,13 @@ AC_DEFUN([FP_SETTINGS],
         else
             SettingsWindresCommand="$Windres"
         fi
-        SettingsLibtoolCommand="libtool"
-        SettingsTouchCommand='touch'
+       SettingsTouchCommand='touch'
+    fi
+    if test -z "$LibtoolCmd"
+    then
+      SettingsLibtoolCommand="libtool"
+    else
+      SettingsLibtoolCommand="$LibtoolCmd"
     fi
     if test -z "$LlcCmd"
     then
index 45b2ab3..a32e6b4 100644 (file)
@@ -569,6 +569,11 @@ fi
 RanlibCmd="$RANLIB"
 RANLIB="$RanlibCmd"
 
+dnl ** which libtool to use?
+dnl --------------------------------------------------------------
+AC_CHECK_TARGET_TOOL([LIBTOOL], [libtool])
+LibtoolCmd="$LIBTOOL"
+LIBTOOL="$LibtoolCmd"
 
 # Here is where we re-target which specific version of the LLVM
 # tools we are looking for. In the past, GHC supported a number of
@@ -1250,6 +1255,7 @@ echo "\
    ar           : $ArCmd
    ld           : $LdCmd
    nm           : $NmCmd
+   libtool      : $LibtoolCmd
    objdump      : $ObjdumpCmd
    ranlib       : $RanlibCmd
    windres      : $Windres