[project @ 2003-06-12 11:13:07 by simonmar]
authorsimonmar <unknown>
Thu, 12 Jun 2003 11:13:07 +0000 (11:13 +0000)
committersimonmar <unknown>
Thu, 12 Jun 2003 11:13:07 +0000 (11:13 +0000)
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

index fea206c..12ebf1e 100644 (file)
@@ -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>