From: simonmar Date: Thu, 12 Jun 2003 11:13:07 +0000 (+0000) Subject: [project @ 2003-06-12 11:13:07 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~778 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3a9bb4cee329cb3555df42ab16c88ef4100fc247 [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. --- 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=