summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-06-12 11:13:07 +0000
committersimonmar <unknown>2003-06-12 11:13:07 +0000
commit3a9bb4cee329cb3555df42ab16c88ef4100fc247 (patch)
tree5f229d66ec67eb0afb9a925d75da36ac48540d58
parentb6d1586842d1f2885f6a17e946f2295623142e2c (diff)
downloadhaskell-3a9bb4cee329cb3555df42ab16c88ef4100fc247.tar.gz
[project @ 2003-06-12 11:13:07 by simonmar]
More intelligent test for ghc-pkg: if there was a --with-ghc option to configure, then we now use that as a hint for which ghc-pkg to use.
-rw-r--r--configure.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index fea206c1e3..12ebf1edfe 100644
--- a/configure.in
+++ b/configure.in
@@ -692,7 +692,15 @@ AC_SUBST(CompressCmd)
AC_SUBST(CompressSuffix)
dnl ** check for ghc-pkg command
-AC_PATH_PROG(GhcPkgCmd,ghc-pkg)
+changequote(, )dnl
+ghc_pkg_guess=`echo $WithGhc | sed 's@ghc\([^/\\]*\)$@ghc-pkg\1@'`
+changequote([, ])dnl
+if $ghc_pkg_guess -l >/dev/null 2>/dev/null; then
+ GhcPkgCmd=$ghc_pkg_guess
+ AC_MSG_NOTICE([using $ghc_pkg_guess for ghc-pkg])
+else
+ AC_PATH_PROG(GhcPkgCmd,ghc-pkg)
+fi
AC_ARG_WITH(greencard,
[ --with-greencard=<greencard compiler>