Detect whether $(GHC) supports the readline package.
+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.
dnl ** Map an arithmetic C type to a Haskell type.
dnl Based on autconf's AC_CHECK_SIZEOF.
dnl ** check for ghc-pkg command
FP_PROG_GHC_PKG
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]])],
AC_ARG_WITH(greencard,
[AC_HELP_STRING([--with-greencard=ARG],
[Use ARG as the path to greencard [default=autodetct]])],
GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
endif
GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
endif
+# Set to YES if $(GHC) has the readline package installed
+GhcHasReadline = @GhcHasReadline@
+