summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-11-20 17:02:45 +0000
committerIan Lynagh <igloo@earth.li>2010-11-20 17:02:45 +0000
commite69c73766b85435741a83c87185be6f1f9ebdc92 (patch)
treeb526615cb1aa1d07ba258488ecc6258883145ebe
parent414929e778330a743aed4fd3bb5e6968ef564c7b (diff)
downloadhaskell-e69c73766b85435741a83c87185be6f1f9ebdc92.tar.gz
configure.ac tweaks
-rw-r--r--aclocal.m464
-rw-r--r--configure.ac66
2 files changed, 60 insertions, 70 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index f386b354ee..9ebfe7d224 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1199,27 +1199,53 @@ case $fptools_cv_timer_create_works in
esac
])
-# FP_ARG_GMP
+# FP_ICONV
# -------------
-AC_DEFUN([FP_ARG_GMP],
+AC_DEFUN([FP_ICONV],
[
-AC_ARG_WITH([gmp-includes],
- [AC_HELP_STRING([--with-gmp-includes],
- [directory containing gmp.h])],
- [gmp_includes=$withval],
- [gmp_includes=NONE])
-
-AC_ARG_WITH([gmp-libraries],
- [AC_HELP_STRING([--with-gmp-libraries],
- [directory containing gmp library])],
- [gmp_libraries=$withval],
- [gmp_libraries=NONE])
-])# FP_ARG_GMP
-
-AC_DEFUN([CHECK_GMP],
-[AC_REQUIRE([AC_PROG_CPP])
-AC_REQUIRE([AC_PROG_CC])
-])
+ dnl--------------------------------------------------------------------
+ dnl * Deal with arguments telling us iconv is somewhere odd
+ dnl--------------------------------------------------------------------
+
+ dnl Note: ICONV_LIB_DIRS and ICONV_INCLUDE_DIRS are not predefined
+ dnl to the empty string to allow them to be overridden from the
+ dnl environment.
+
+ AC_ARG_WITH([iconv-includes],
+ [AC_HELP_STRING([--with-iconv-includes],
+ [directory containing iconv.h])],
+ [ICONV_INCLUDE_DIRS=$withval])
+
+ AC_ARG_WITH([iconv-libraries],
+ [AC_HELP_STRING([--with-iconv-libraries],
+ [directory containing iconv library])],
+ [ICONV_LIB_DIRS=$withval])
+
+ AC_SUBST(ICONV_INCLUDE_DIRS)
+ AC_SUBST(ICONV_LIB_DIRS)
+])# FP_ICONV
+
+# FP_GMP
+# -------------
+AC_DEFUN([FP_GMP],
+[
+ dnl--------------------------------------------------------------------
+ dnl * Deal with arguments telling us gmp is somewhere odd
+ dnl--------------------------------------------------------------------
+
+ AC_ARG_WITH([gmp-includes],
+ [AC_HELP_STRING([--with-gmp-includes],
+ [directory containing gmp.h])],
+ [GMP_INCLUDE_DIRS=$withval])
+
+ AC_ARG_WITH([gmp-libraries],
+ [AC_HELP_STRING([--with-gmp-libraries],
+ [directory containing gmp library])],
+ [GMP_LIB_DIRS=$withval])
+
+ AC_SUBST(GMP_INCLUDE_DIRS)
+ AC_SUBST(GMP_LIB_DIRS)
+])# FP_GMP
# FP_CHECK_MACOSX_DEPLOYMENT_TARGET
# ---------------------------------
diff --git a/configure.ac b/configure.ac
index 7d1cdf2190..e878dbdc29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,40 +175,8 @@ AC_SUBST([WithGhc])
dnl ** Without optimization some INLINE trickery fails for GHCi
SRC_CC_OPTS="-O"
-dnl Allow to specify iconv options to the toplevel configure script
-dnl so they can be properly passed to sub-builds.
-dnl Note: ICONV_LIB_DIRS and ICONV_INCLUDE_DIRS are not predefined
-dnl to the empty string to allow them to be overridden from the
-dnl environment.
-
-AC_ARG_WITH([iconv-includes],
- [AC_HELP_STRING([--with-iconv-includes],
- [directory containing iconv.h])],
- [ICONV_INCLUDE_DIRS=$withval])
-
-AC_ARG_WITH([iconv-libraries],
- [AC_HELP_STRING([--with-iconv-libraries],
- [directory containing iconv library])],
- [ICONV_LIB_DIRS=$withval])
-
-AC_SUBST(ICONV_INCLUDE_DIRS)
-AC_SUBST(ICONV_LIB_DIRS)
-
-dnl Allow to specify gmp options to the toplevel configure script
-dnl so they can be properly passed to sub-builds.
-
-AC_ARG_WITH([gmp-includes],
- [AC_HELP_STRING([--with-gmp-includes],
- [directory containing gmp.h])],
- [GMP_INCLUDE_DIRS=$withval])
-
-AC_ARG_WITH([gmp-libraries],
- [AC_HELP_STRING([--with-gmp-libraries],
- [directory containing gmp library])],
- [GMP_LIB_DIRS=$withval])
-
-AC_SUBST(GMP_INCLUDE_DIRS)
-AC_SUBST(GMP_LIB_DIRS)
+FP_ICONV
+FP_GMP
dnl--------------------------------------------------------------------
dnl * Choose host(/target/build) platform
@@ -533,26 +501,22 @@ AC_SUBST([GhcLibsWithUnix])
dnl ** does #! work?
AC_SYS_INTERPRETER()
-dnl ** look for `perl', but only in /bin on Windows
+dnl ** look for `perl'
case $HostOS_CPP in
cygwin32|mingw32)
- AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin)
- if test -z "$PerlCmd"; then
- echo "You must install the version of Perl shipped with GHC"
- echo "(or a compatible one) in /bin."
- exit 1
- fi
- ;;
+ PerlCmd=$hardtop/inplace/perl/perl
+ ;;
*)
- AC_PATH_PROG(PerlCmd,perl)
- if test -z "$PerlCmd"; then
- echo "You must install perl before you can continue"
- echo "Perhaps it is already installed, but not in your PATH?"
- exit 1
- else
- FPTOOLS_CHECK_PERL_VERSION
- fi
- ;;
+ AC_PATH_PROG(PerlCmd,perl)
+ if test -z "$PerlCmd"
+ then
+ echo "You must install perl before you can continue"
+ echo "Perhaps it is already installed, but not in your PATH?"
+ exit 1
+ else
+ FPTOOLS_CHECK_PERL_VERSION
+ fi
+ ;;
esac
dnl ** does #! path/to/perl work? (sometimes it's too long...)