summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2010-05-04 12:29:21 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2010-05-04 12:29:21 +0000
commit4d2215111c0a8c84fc2d472c95c12d4747e5e144 (patch)
treea5dc4991c2db0229f8c824f08b0f354b80fd0deb
parent2bf0f1a3dadca3e4829f18fc47cfa8ee593e476c (diff)
downloadclasspath-4d2215111c0a8c84fc2d472c95c12d4747e5e144.tar.gz
Allow location of GMP to be specified.
2010-05-04 Andrew John Hughes <ahughes@redhat.com> * configure.ac: Add output to GMP directory detection and only perform when compiling GMP. 2010-05-04 Mike Stump <mikestump@comcast.net> * configure.ac: Allow prefix, libdir and includedir of GMP to be specified via --with-gmp, --with-gmp-include and --with-gmp-lib.
-rw-r--r--ChangeLog13
-rw-r--r--configure.ac26
2 files changed, 37 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 43c8514b0..ec48b8071 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-05-04 Andrew John Hughes <ahughes@redhat.com>
+
+ * configure.ac:
+ Add output to GMP directory detection and
+ only perform when compiling GMP.
+
+2010-05-04 Mike Stump <mikestump@comcast.net>
+
+ * configure.ac:
+ Allow prefix, libdir and includedir of GMP
+ to be specified via --with-gmp, --with-gmp-include
+ and --with-gmp-lib.
+
2010-04-28 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/print/ipp/IppPrintService.java:
diff --git a/configure.ac b/configure.ac
index fd807166a..29fb0dd40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -752,10 +752,32 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl __gmpz_mul_si for earlier versions (>= 3.1).
dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to
dnl change the name of the corresponding ac_ variable on lines 860...
+ AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package.
+ Equivalent to --with-gmp-include=PATH/include
+ plus --with-gmp-lib=PATH/lib])
+ AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files])
+ AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library])
+
if test "x${COMPILE_GMP}" = xyes; then
+ AC_MSG_CHECKING([for GMP directories])
+ if test "x$with_gmp" != x; then
+ gmplibs="-L$with_gmp/lib -lgmp"
+ gmpinc="-I$with_gmp/include"
+ if test "x$with_gmp_include" != x; then
+ gmpinc="-I$with_gmp_include $gmpinc"
+ fi
+ if test "x$with_gmp_lib" != x; then
+ gmplibs="-L$with_gmp_lib $gmplibs"
+ fi
+ else
+ with_gmp="/usr"
+ gmplibs="-lgmp"
+ gmpinc="-I/usr/include"
+ fi
+ AC_MSG_RESULT([prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc])
AC_CHECK_LIB(gmp, __gmpz_mul_si,
- [GMP_CFLAGS=-I/usr/include
- GMP_LIBS=-lgmp ],
+ [GMP_CFLAGS="$gmpinc"
+ GMP_LIBS="$gmplibs" ],
[GMP_CFLAGS=
GMP_LIBS= ])
AC_SUBST(GMP_CFLAGS)