[commit: ghc] master: Make top-level "configure" accept and propagate --with-curses-{includes, libraries} to libraries (bbb57a6)
git at git.haskell.org
git at git.haskell.org
Mon Feb 23 09:40:23 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/bbb57a6b3a31c22a5a24fa4b92abbe13a6736ad8/ghc
>---------------------------------------------------------------
commit bbb57a6b3a31c22a5a24fa4b92abbe13a6736ad8
Author: PHO <pho at cielonegro.org>
Date: Mon Feb 23 03:40:05 2015 -0600
Make top-level "configure" accept and propagate --with-curses-{includes,libraries} to libraries
Summary:
If curses is installed into some non-standard path, we currently have
to say something like the following in mk/build.mk:
libraries/terminfo_CONFIGURE_OPTS += \
--configure-option=--with-curses-includes=/somewhere/include \
--configure-option=--with-curses-libraries=/somewhere/lib
This is because the top-level configure does not accept nor propagate
--with-curses-{includes,libraries} to libraries while it does so for
iconv, gmp and libffi. It would be nice if curses were handled in the
same manner.
Test Plan: Install curses into some non-standard path. Then run the top-level "configure" script with options "--with-curses-includes=/path/to/curses/include" and "--with-curses-libraries=/path/to/curses/lib".
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, PHO
Differential Revision: https://phabricator.haskell.org/D665
GHC Trac Issues: #10096
>---------------------------------------------------------------
bbb57a6b3a31c22a5a24fa4b92abbe13a6736ad8
aclocal.m4 | 22 ++++++++++++++++++++++
configure.ac | 1 +
mk/config.mk.in | 3 +++
rules/build-package-data.mk | 8 ++++++++
4 files changed, 34 insertions(+)
diff --git a/aclocal.m4 b/aclocal.m4
index cb4aa83..73b8890 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1826,6 +1826,28 @@ AC_DEFUN([FP_GMP],
AC_SUBST(GMP_LIB_DIRS)
])# FP_GMP
+# FP_CURSES
+# -------------
+AC_DEFUN([FP_CURSES],
+[
+ dnl--------------------------------------------------------------------
+ dnl * Deal with arguments telling us curses is somewhere odd
+ dnl--------------------------------------------------------------------
+
+ AC_ARG_WITH([curses-includes],
+ [AC_HELP_STRING([--with-curses-includes],
+ [directory containing curses headers])],
+ [CURSES_INCLUDE_DIRS=$withval])
+
+ AC_ARG_WITH([curses-libraries],
+ [AC_HELP_STRING([--with-curses-libraries],
+ [directory containing curses libraries])],
+ [CURSES_LIB_DIRS=$withval])
+
+ AC_SUBST(CURSES_INCLUDE_DIRS)
+ AC_SUBST(CURSES_LIB_DIRS)
+])# FP_CURSES
+
# --------------------------------------------------------------
# Calculate absolute path to build tree
# --------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 9740e15..f65d133 100644
--- a/configure.ac
+++ b/configure.ac
@@ -357,6 +357,7 @@ fi
FP_ICONV
FP_GMP
+FP_CURSES
XCODE_VERSION()
diff --git a/mk/config.mk.in b/mk/config.mk.in
index dfe8c2b..b32f227 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -805,3 +805,6 @@ ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@
GMP_LIB_DIRS = @GMP_LIB_DIRS@
+
+CURSES_INCLUDE_DIRS = @CURSES_INCLUDE_DIRS@
+CURSES_LIB_DIRS = @CURSES_LIB_DIRS@
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index 2e61001..494b89a 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -77,6 +77,14 @@ ifneq "$$(GMP_LIB_DIRS)" ""
$1_$2_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="$$(GMP_LIB_DIRS)"
endif
+ifneq "$$(CURSES_INCLUDE_DIRS)" ""
+$1_$2_CONFIGURE_OPTS += --configure-option=--with-curses-includes="$$(CURSES_INCLUDE_DIRS)"
+endif
+
+ifneq "$$(CURSES_LIB_DIRS)" ""
+$1_$2_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="$$(CURSES_LIB_DIRS)"
+endif
+
ifeq "$$(CrossCompiling)" "YES"
$1_$2_CONFIGURE_OPTS += --configure-option=--host=$(TargetPlatformFull)
endif
More information about the ghc-commits
mailing list