Add configure flags for the location of GMP includes/library; fixes #4022
authorIan Lynagh <igloo@earth.li>
Tue, 25 May 2010 22:16:16 +0000 (22:16 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 25 May 2010 22:16:16 +0000 (22:16 +0000)
configure.ac
mk/config.mk.in
rules/build-package-data.mk

index 28e380b..c0ca168 100644 (file)
@@ -194,6 +194,22 @@ AC_ARG_WITH([iconv-libraries],
 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)
+
 dnl--------------------------------------------------------------------
 dnl * Choose host(/target/build) platform
 dnl--------------------------------------------------------------------
index 78b0b7a..697bf51 100644 (file)
@@ -785,3 +785,5 @@ CONFIGURE_ARGS = @CONFIGURE_ARGS@
 ICONV_INCLUDE_DIRS = @ICONV_INCLUDE_DIRS@
 ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
 
+GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@
+GMP_LIB_DIRS = @GMP_LIB_DIRS@
index 5882e89..93919ff 100644 (file)
@@ -42,6 +42,14 @@ ifneq "$$(ICONV_LIB_DIRS)" ""
 $1_$2_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="$$(ICONV_LIB_DIRS)"
 endif
 
+ifneq "$$(GMP_INCLUDE_DIRS)" ""
+$1_$2_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="$$(GMP_INCLUDE_DIRS)"
+endif
+
+ifneq "$$(GMP_LIB_DIRS)" ""
+$1_$2_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="$$(GMP_LIB_DIRS)"
+endif
+
 ifeq "$3" "0"
 $1_$2_CONFIGURE_OPTS += $$(BOOT_PKG_CONSTRAINTS)
 endif