summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-04-25 18:32:24 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-25 18:39:49 -0400
commit9373994acaf1b73fe0e7cf8e03594c63cec8d235 (patch)
treeb62be20056a3148835dbc59088cb79cfb54b596b /configure.ac
parent66108864540601837ad77847f4062a670362361f (diff)
downloadhaskell-9373994acaf1b73fe0e7cf8e03594c63cec8d235.tar.gz
configure: Kill off FP_ARG_WITH_*
This replaces the --with-* configure flags with the usual autoconf environment variables, as suggested by #13583. Test Plan: Configure on various platforms Reviewers: hvr, trofi, thomie, austin Reviewed By: trofi Subscribers: rwbarton, erikd GHC Trac Issues: #13583 Differential Revision: https://phabricator.haskell.org/D3499
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac47
1 files changed, 27 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 194d37bd57..46e37ab3e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -502,7 +502,14 @@ AC_SUBST([LdCmd])
dnl ** Which nm to use?
dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG([NM], [nm], [nm])
+if test "$HostOS" != "mingw32"; then
+ AC_CHECK_TARGET_TOOL([NM], [nm])
+ if test "$NM" = ":"; then
+ AC_MSG_ERROR([cannot find nm in your PATH])
+ fi
+fi
+NmCmd="$NM"
+AC_SUBST([NmCmd])
if test "$TargetOS_CPP" = "darwin"
then
@@ -529,40 +536,40 @@ then
esac
fi
-NmCmd="$NM"
-AC_SUBST([NmCmd])
-
dnl ** Which objdump to use?
dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([OBJDUMP], [objdump], [objdump])
+dnl Note: we may not have objdump on OS X, and we only need it on Windows (for DLL checks)
+case $HostOS_CPP in
+ cygwin32|mingw32)
+ AC_CHECK_TARGET_TOOL([OBJDUMP], [objdump])
+ ;;
+esac
+
ObjdumpCmd="$OBJDUMP"
AC_SUBST([ObjdumpCmd])
dnl ** Which ar to use?
dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG([AR], [ar], [ar])
+if test "$HostOS" != "mingw32"; then
+ AC_CHECK_TARGET_TOOL([AR], [ar])
+ if test "$AR" = ":"; then
+ AC_MSG_ERROR([cannot find ar in your PATH])
+ fi
+fi
ArCmd="$AR"
fp_prog_ar="$AR"
AC_SUBST([ArCmd])
dnl ** Which ranlib to use?
dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG([RANLIB], [ranlib], [ranlib])
+AC_PROG_RANLIB
+if test "$RANLIB" = ":"; then
+ AC_MSG_ERROR([cannot find ranlib in your PATH])
+fi
RanlibCmd="$RANLIB"
RANLIB="$RanlibCmd"
-# Note: we may not have objdump on OS X, and we only need it on Windows (for DLL checks)
-case $HostOS_CPP in
-cygwin32|mingw32)
- dnl ** Which objdump to use?
- dnl --------------------------------------------------------------
- FP_ARG_WITH_PATH_GNU_PROG([OBJDUMP], [objdump], [objdump])
- ObjdumpCmd="$OBJDUMP"
- AC_SUBST([ObjdumpCmd])
- ;;
-esac
-
# 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
# versions of LLVM simultaneously, but that stopped working around
@@ -574,13 +581,13 @@ AC_DEFINE_UNQUOTED([sUPPORTED_LLVM_VERSION], ${sUPPORTED_LLVM_VERSION}, [The sup
dnl ** Which LLVM llc to use?
dnl --------------------------------------------------------------
-FIND_LLVM_PROG([LLC], [llc], [llc], [$LlvmVersion])
+FIND_LLVM_PROG([LLC], [llc], [$LlvmVersion])
LlcCmd="$LLC"
AC_SUBST([LlcCmd])
dnl ** Which LLVM opt to use?
dnl --------------------------------------------------------------
-FIND_LLVM_PROG([OPT], [opt], [opt], [$LlvmVersion])
+FIND_LLVM_PROG([OPT], [opt], [$LlvmVersion])
OptCmd="$OPT"
AC_SUBST([OptCmd])