aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stump <mikestump@comcast.net>2010-05-29 20:54:18 +0000
committerMike Stump <mrs@gcc.gnu.org>2010-05-29 20:54:18 +0000
commit8df9a5db771b92d45f20665e38279a18f1ebff00 (patch)
tree70790d49358106a4377828eb126b5f95dc79c7a5
parent24e47c76ba526c0f90045ea5fe0d26cc41fdf2d3 (diff)
downloadgcc-8df9a5db771b92d45f20665e38279a18f1ebff00.zip
gcc-8df9a5db771b92d45f20665e38279a18f1ebff00.tar.gz
gcc-8df9a5db771b92d45f20665e38279a18f1ebff00.tar.bz2
configure.ac: Add multilib support for gmp.
* configure.ac: Add multilib support for gmp. Proper -I and -L flags for gmp are added. * configure: Regenerate. From-SVN: r160037
-rw-r--r--libjava/ChangeLog5
-rwxr-xr-xlibjava/classpath/configure63
-rw-r--r--libjava/classpath/configure.ac26
3 files changed, 82 insertions, 12 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 0d4e906..1aaefa4 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-29 Mike Stump <mikestump@comcast.net>
+
+ * configure.ac: Add multilib support for gmp. Proper -I and -L
+ flags for gmp are added.
+
2010-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac: Redirect grep stdout, stderr to /dev/null instead
diff --git a/libjava/classpath/configure b/libjava/classpath/configure
index 86e72ca..e452d98 100755
--- a/libjava/classpath/configure
+++ b/libjava/classpath/configure
@@ -914,6 +914,9 @@ enable_rpath
with_libiconv_prefix
with_x
with_qt4dir
+with_gmp
+with_gmp_include
+with_gmp_lib
with_javah
with_vm_classes
enable_maintainer_mode
@@ -1654,6 +1657,11 @@ Optional Packages:
--with-x use the X Window System
--with-qt4dir=DIR Qt4 installation directory used for OS-X. For other
systems use pkg-config.
+ --with-gmp=PATH specify prefix directory for the installed GMP package.
+ Equivalent to --with-gmp-include=PATH/include
+ plus --with-gmp-lib=PATH/lib
+ --with-gmp-include=PATH specify directory for installed GMP include files
+ --with-gmp-lib=PATH specify directory for the installed GMP library
--with-javah specify path or name of a javah-like program
--with-vm-classes specify path to VM override source files
--with-ecj-jar=ABS.PATH specify jar file containing the Eclipse Java
@@ -11804,7 +11812,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11807 "configure"
+#line 11815 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11910,7 +11918,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11913 "configure"
+#line 11921 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21906,7 +21914,42 @@ $as_echo "$GTK_LIBS" >&6; }
fi
- if test "x${COMPILE_GMP}" = xyes; then
+
+# Check whether --with-gmp was given.
+if test "${with_gmp+set}" = set; then :
+ withval=$with_gmp;
+fi
+
+
+# Check whether --with-gmp_include was given.
+if test "${with_gmp_include+set}" = set; then :
+ withval=$with_gmp_include;
+fi
+
+
+# Check whether --with-gmp_lib was given.
+if test "${with_gmp_lib+set}" = set; then :
+ withval=$with_gmp_lib;
+fi
+
+
+ if test "x$with_gmp" != x; then
+ gmplibs=-lgmp
+ gmpinc=
+ gmplibs="-L$with_gmp/lib $gmplibs"
+ if test "x$with_gmp_include" != x; then
+ gmpinc="-I$with_gmp_include $gmpinc"
+ fi
+ gmpinc="-I$with_gmp/include $gmpinc"
+ if test "x$with_gmp_lib" != x; then
+ gmplibs="-L$with_gmp_lib $gmplibs"
+ fi
+ else
+ gmplibs="-lgmp"
+ gmpinc="-I/usr/include"
+ fi
+
+ if test "x${COMPILE_GMP}" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_mul_si in -lgmp" >&5
$as_echo_n "checking for __gmpz_mul_si in -lgmp... " >&6; }
if test "${ac_cv_lib_gmp___gmpz_mul_si+set}" = set; then :
@@ -21947,8 +21990,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_mul_si" >&5
$as_echo "$ac_cv_lib_gmp___gmpz_mul_si" >&6; }
if test "x$ac_cv_lib_gmp___gmpz_mul_si" = x""yes; then :
- GMP_CFLAGS=-I/usr/include
- GMP_LIBS=-lgmp
+ GMP_CFLAGS="$gmpinc"
+ GMP_LIBS="$gmplibs"
else
GMP_CFLAGS=
GMP_LIBS=
@@ -23685,7 +23728,7 @@ EOF
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
- echo "configure: 23688: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+ echo "configure: 23731: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
@@ -23830,7 +23873,7 @@ else
JAVA_TEST=Object.java
CLASS_TEST=Object.class
cat << \EOF > $JAVA_TEST
-/* #line 23833 "configure" */
+/* #line 23876 "configure" */
package java.lang;
public class Object
@@ -23877,7 +23920,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
-/* [#]line 23880 "configure" */
+/* [#]line 23923 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
@@ -24203,7 +24246,7 @@ else
JAVA_TEST=Object.java
CLASS_TEST=Object.class
cat << \EOF > $JAVA_TEST
-/* #line 24206 "configure" */
+/* #line 24249 "configure" */
package java.lang;
public class Object
@@ -24242,7 +24285,7 @@ fi
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
- /* #line 24245 "configure" */
+ /* #line 24288 "configure" */
public class Test
{
public static void main(String args)
diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac
index 98a17f8..d2d149f 100644
--- a/libjava/classpath/configure.ac
+++ b/libjava/classpath/configure.ac
@@ -812,10 +812,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$with_gmp" != x; then
+ gmplibs=-lgmp
+ gmpinc=
+ gmplibs="-L$with_gmp/lib $gmplibs"
+ gmpinc="-I$with_gmp/include $gmpinc"
+ 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
+ gmplibs="-lgmp"
+ gmpinc="-I/usr/include"
+ fi
+
if test "x${COMPILE_GMP}" = xyes; then
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)