From 88223168614ea60a5d76a264f6c11837b6c5a443 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 25 May 2010 22:16:16 +0000 Subject: [PATCH] Add configure flags for the location of GMP includes/library; fixes #4022 --- configure.ac | 16 ++++++++++++++++ mk/config.mk.in | 2 ++ rules/build-package-data.mk | 8 ++++++++ 3 files changed, 26 insertions(+) diff --git a/configure.ac b/configure.ac index 28e380b..c0ca168 100644 --- a/configure.ac +++ b/configure.ac @@ -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-------------------------------------------------------------------- diff --git a/mk/config.mk.in b/mk/config.mk.in index 78b0b7a..697bf51 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -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@ diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 5882e89..93919ff 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -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 -- 1.7.10.4