Commit 054725a0 authored by panne's avatar panne

[project @ 2004-11-20 15:12:26 by panne]

Pushed "ghc has readline" check down to ghc subdir
parent 067e49d1
......@@ -657,19 +657,6 @@ ifelse($#, [1], [dnl
])dnl
AC_DEFUN(FPTOOLS_GHC_HAS_READLINE,
[AC_CACHE_CHECK([whether ghc has readline package], [fptools_ghc_has_readline],
[if "${GhcPkgCmd-ghc-pkg}" --show-package readline >/dev/null 2>&1; then
fptools_ghc_has_readline='yes';
GhcHasReadline='YES';
else
fptools_ghc_has_readline='no';
GhcHasReadline='NO';
fi
AC_SUBST(GhcHasReadline)
])
])
dnl ** Map an arithmetic C type to a Haskell type.
dnl Based on autconf's AC_CHECK_SIZEOF.
......
......@@ -874,9 +874,6 @@ FP_PROG_FO_PROCESSOR
dnl ** check for ghc-pkg command
FP_PROG_GHC_PKG
dnl Check whether this GHC has readline installed
FPTOOLS_GHC_HAS_READLINE
AC_ARG_WITH(greencard,
[AC_HELP_STRING([--with-greencard=ARG],
[Use ARG as the path to greencard [default=autodetct]])],
......
......@@ -24,3 +24,37 @@ AC_SUBST([ProjectVersionInt])
test -z "$ProjectPatchLevel" && ProjectPatchLevel=0
AC_SUBST([ProjectPatchLevel])
])# FP_SETUP_PROJECT_INFO
# FP_PROG_GHC_PKG
# ----------------
# Try to find a ghc-pkg matching the ghc mentioned in the environment variable
# WithGhc. If the latter is unset or no matching ghc-pkg can be found, try to
# find a plain ghc-pkg. Sets the output variable GhcPkgCmd.
AC_DEFUN([FP_PROG_GHC_PKG],
[AC_CACHE_CHECK([for ghc-pkg matching $WithGhc], fp_cv_matching_ghc_pkg,
[fp_ghc_pkg_guess=`echo $WithGhc | sed 's,ghc\(@<:@^/\\@:>@*\)$,ghc-pkg\1,'`
if "$fp_ghc_pkg_guess" -l > /dev/null 2>&1; then
fp_cv_matching_ghc_pkg=$fp_ghc_pkg_guess
else
fp_cv_matching_ghc_pkg=no
fi])
if test x"$fp_cv_matching_ghc_pkg" = xno; then
AC_PATH_PROG([GhcPkgCmd], [ghc-pkg])
else
GhcPkgCmd=$fp_cv_matching_ghc_pkg
fi])# FP_PROG_GHC_PKG
# FP_GHC_HAS_READLINE
# -------------------
AC_DEFUN(FP_GHC_HAS_READLINE,
[AC_REQUIRE([FP_PROG_GHC_PKG])
AC_CACHE_CHECK([whether ghc has readline package], [fp_cv_ghc_has_readline],
[if "${GhcPkgCmd-ghc-pkg}" --show-package readline >/dev/null 2>&1; then
fp_cv_ghc_has_readline=yes
else
fp_cv_ghc_has_readline=no
fi])
AC_SUBST([GhcHasReadline], [`echo $fp_cv_ghc_has_readline | sed 'y/yesno/YESNO/'`])
])# FP_GHC_HAS_READLINE
......@@ -7,6 +7,9 @@ FP_SETUP_PROJECT_INFO
# Hmmm, we fix the RPM release number to 1 here... Is this convenient?
AC_SUBST([release], [1])
# Check whether this GHC has readline installed
FP_GHC_HAS_READLINE
# Write the results...
AC_CONFIG_FILES([ghc.spec VERSION docs/users_guide/ug-book.xml mk/version.mk])
AC_CONFIG_FILES([ghc.spec VERSION docs/users_guide/ug-book.xml mk/config.mk mk/version.mk])
AC_OUTPUT
# -----------------------------------------------------------------------------
# $Id: config.mk,v 1.20 2003/05/19 13:01:23 simonmar Exp $
#
# GHC project configuration
#
......@@ -22,4 +21,7 @@ GhcBinDistLibPrlScripts = ghc-asm ghc-split
GhcBinDistBins = hp2ps ghcprof
GhcBinDistLinks = ghc ghci ghc-pkg
# Set to YES if $(GHC) has the readline package installed
GhcHasReadline = @GhcHasReadline@
include $(GhcMainDir)/mk/version.mk
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment