[commit: ghc] ghc-7.10: Make top-level "configure" accept and propagate --with-curses-{includes, libraries} to libraries (d9e24f4)

git at git.haskell.org git at git.haskell.org
Mon Feb 23 09:54:17 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/d9e24f4eb1f214a59f1d7d8a2535b1b255a45a51/ghc

>---------------------------------------------------------------

commit d9e24f4eb1f214a59f1d7d8a2535b1b255a45a51
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
    
    (cherry picked from commit bbb57a6b3a31c22a5a24fa4b92abbe13a6736ad8)


>---------------------------------------------------------------

d9e24f4eb1f214a59f1d7d8a2535b1b255a45a51
 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 6933e6f..0cc9dcc 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 c98feb8..689ebd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -413,6 +413,7 @@ AS_IF([test "$UseSystemLibFFI" = "YES"], [
 
 FP_ICONV
 FP_GMP
+FP_CURSES
 
 XCODE_VERSION()
 
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 40c66d9..42720c8 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -812,3 +812,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