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--------------------------------------------------------------------
ICONV_INCLUDE_DIRS = @ICONV_INCLUDE_DIRS@
ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
+GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@
+GMP_LIB_DIRS = @GMP_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