summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--configure.ac30
-rw-r--r--doc/mpc.texi14
3 files changed, 35 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index f101307..addc679 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ Recent changes:
- version number: MPC_VERSION_MAJOR, MPC_VERSION_MINOR,
MPC_VERSION_PATCHLEVEL, MPC_VERSION_STRING
- configure checks on recent mpfr library
+ - new configure options: --with-gmp-lib, --with-gmp-include,
+ --with-mpfr-lib, and --with-mpfr-include
- Test framework rewritten
- Bug fixes:
- configure looks for gmp first, then for mpfr
diff --git a/configure.ac b/configure.ac
index 0fb6235..0536699 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,14 @@ AM_INIT_AUTOMAKE([1.9 -Wall -Werror])
AM_MAINTAINER_MODE
dnl Extra arguments to configure
+AC_ARG_WITH([mpfr_include],
+ [AC_HELP_STRING([--with-mpfr-include=DIR],
+ [MPFR include directory])],
+ [CPPFLAGS="-I$withval $CPPFLAGS"])
+AC_ARG_WITH([mpfr_lib],
+ [AC_HELP_STRING([--with-mpfr-lib=DIR],
+ [MPFR lib directory])],
+ [LDFLAGS="-I$withval $LDFLAGS"])
AC_ARG_WITH([mpfr],
[AC_HELP_STRING([--with-mpfr=DIR],
[MPFR install directory])],
@@ -38,6 +46,14 @@ AC_ARG_WITH([mpfr],
CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval/lib $LDFLAGS"
])
+AC_ARG_WITH([gmp_include],
+ [AC_HELP_STRING([--with-gmp-include=DIR],
+ [GMP include directory])],
+ [CPPFLAGS="-I$withval $CPPFLAGS"])
+AC_ARG_WITH([gmp_lib],
+ [AC_HELP_STRING([--with-gmp-lib=DIR],
+ [GMP lib directory])],
+ [LDFLAGS="-I$withval $LDFLAGS"])
AC_ARG_WITH([gmp],
[AC_HELP_STRING([--with-gmp=DIR],
[GMP install directory])],
@@ -77,16 +93,20 @@ AC_CHECK_LIB([mpfr], [mpfr_clear],
# Check for a recent MPFR
AC_MSG_CHECKING(for recent MPFR)
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
#include "mpfr.h"
#if (MPFR_VERSION_MAJOR*100 + MPFR_VERSION_MINOR*10 < 230)
# error "min MPFR version is 2.3.0"
error
#endif
-]])],[AC_MSG_RESULT(yes)],[
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([MPFR 2.3.0 min required])
-])
+ ]])],
+ [AC_MSG_RESULT(yes)],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([MPFR 2.3.0 min required])
+ ])
# Checks for header files.
AC_HEADER_STDC
diff --git a/doc/mpc.texi b/doc/mpc.texi
index e4d23e3..46a45c1 100644
--- a/doc/mpc.texi
+++ b/doc/mpc.texi
@@ -202,15 +202,17 @@ that are searched by default by the compiler and the linking tools.
@samp{./configure --with-gmp=<gmp_install_dir>}
-is used to indicate a different location where GMP is installed.
+is used to indicate a different location where GMP is
+installed. Alternatively, you can specify directly GMP include and GMP lib
+directories with @samp{./configure --with-gmp-lib=<gmp_lib_dir>
+--with-gmp-include=<gmp_include_dir>}.
@samp{./configure --with-mpfr=<mpfr_install_dir>}
-is used to indicate a different location where MPFR is installed.
-
-@samp{./configure --with-gmp=<gmp_install_dir> --with-mpfr=<mpfr_install_dir>}
-
-is used to indicate different locations of GMP and MPFR.
+is used to indicate a different location where MPFR is
+installed. Alternatively, you can specify directly MPFR include and MPFR lib
+directories with @samp{./configure --with-mpf-lib=<mpfr_lib_dir>
+--with-mpfr-include=<mpfr_include_dir>}.
@item
@samp{make}