classpath-01-fix-gmp-include.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. The GMP include is hardcoded to /usr/include causing obvious problems.
  2. From classpath CVS:
  3. http://cvs.savannah.gnu.org/viewvc/classpath/configure.ac?root=classpath&r1=1.245&r2=1.246
  4. [Gustavo: ditch -L or libtool complains loudly]
  5. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  6. --- a/configure.ac 2010/01/30 01:33:50 1.245
  7. +++ b/configure.ac 2010/05/04 12:29:23 1.246
  8. @@ -752,10 +752,32 @@
  9. dnl __gmpz_mul_si for earlier versions (>= 3.1).
  10. dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to
  11. dnl change the name of the corresponding ac_ variable on lines 860...
  12. + AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package.
  13. + Equivalent to --with-gmp-include=PATH/include
  14. + plus --with-gmp-lib=PATH/lib])
  15. + AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files])
  16. + AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library])
  17. +
  18. if test "x${COMPILE_GMP}" = xyes; then
  19. + AC_MSG_CHECKING([for GMP directories])
  20. + if test "x$with_gmp" != x; then
  21. + gmplibs="-lgmp"
  22. + gmpinc="-I$with_gmp/include"
  23. + if test "x$with_gmp_include" != x; then
  24. + gmpinc="-I$with_gmp_include $gmpinc"
  25. + fi
  26. + if test "x$with_gmp_lib" != x; then
  27. + gmplibs="$gmplibs"
  28. + fi
  29. + else
  30. + with_gmp="/usr"
  31. + gmplibs="-lgmp"
  32. + gmpinc="-I/usr/include"
  33. + fi
  34. + AC_MSG_RESULT([prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc])
  35. AC_CHECK_LIB(gmp, __gmpz_mul_si,
  36. - [GMP_CFLAGS=-I/usr/include
  37. - GMP_LIBS=-lgmp ],
  38. + [GMP_CFLAGS="$gmpinc"
  39. + GMP_LIBS="$gmplibs" ],
  40. [GMP_CFLAGS=
  41. GMP_LIBS= ])
  42. AC_SUBST(GMP_CFLAGS)