From 3a9bb4cee329cb3555df42ab16c88ef4100fc247 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 12 Jun 2003 11:13:07 +0000 Subject: [PATCH] [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. --- configure.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index fea206c..12ebf1e 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= -- 1.7.10.4