diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | configure.ac | 26 |
2 files changed, 37 insertions, 2 deletions
@@ -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) |