diff -Naur mpfr-2.1.0-p1/Makefile.in mpfr-2.1.0-p2/Makefile.in --- mpfr-2.1.0-p1/Makefile.in 2004-11-03 15:26:14.000000000 +0000 +++ mpfr-2.1.0-p2/Makefile.in 2005-01-23 23:11:47.002994720 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.2 from Makefile.am. +# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff -Naur mpfr-2.1.0-p1/aclocal.m4 mpfr-2.1.0-p2/aclocal.m4 --- mpfr-2.1.0-p1/aclocal.m4 2004-11-03 15:25:55.000000000 +0000 +++ mpfr-2.1.0-p2/aclocal.m4 2005-01-23 23:11:29.176704728 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.9.2 -*- Autoconf -*- +# generated automatically by aclocal 1.9.4 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. @@ -40,7 +40,7 @@ # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.2])]) + [AM_AUTOMAKE_VERSION([1.9.4])]) # AM_AUX_DIR_EXPAND diff -Naur mpfr-2.1.0-p1/configure mpfr-2.1.0-p2/configure --- mpfr-2.1.0-p1/configure 2004-11-03 15:26:05.000000000 +0000 +++ mpfr-2.1.0-p2/configure 2005-01-23 23:11:50.900402224 +0000 @@ -6952,106 +6952,68 @@ mv confdefs.tmp confdefs.h fi - -if ` test "$with_gmp_lib" ` -then - echo "$as_me:$LINENO: checking gmp library" >&5 -echo $ECHO_N "checking gmp library... $ECHO_C" >&6 - if test -r "$with_gmp_lib/libgmp.a" - then - LIBS="$LIBS $with_gmp_lib/libgmp.a" - else - if test -r "$with_gmp_lib/libgmp.so" - then - LIBS="$LIBS $with_gmp_lib/libgmp.so" - else - if test -r "$with_gmp_lib/libgmp.lib" - then - LIBS="$LIBS $with_gmp_lib/libgmp.lib" - else - { { echo "$as_me:$LINENO: error: $with_gmp_lib/libgmp.a/so/lib not found" >&5 -echo "$as_me: error: $with_gmp_lib/libgmp.a/so/lib not found" >&2;} - { (exit 1); exit 1; }; } - fi - fi - fi - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +echo "$as_me:$LINENO: checking for GMP library" >&5 +echo $ECHO_N "checking for GMP library... $ECHO_C" >&6 +if test -r "$with_gmp_lib/libgmp.a"; then + LIBS="$with_gmp_lib/libgmp.a $LIBS" +elif test -r "$with_gmp_lib/libgmp.so"; then + LIBS="$with_gmp_lib/libgmp.so $LIBS" +elif test -r "$with_gmp_lib/libgmp.lib"; then + LIBS="$with_gmp_lib/libgmp.lib $LIBS" else + if test -d "$with_gmp_lib"; then + LDFLAGS="-L$with_gmp_lib $LDFLAGS" + fi + LIBS="-lgmp $LIBS" +fi +if test "$cross_compiling" = yes; then + + echo "$as_me:$LINENO: result: can't test" >&5 +echo "${ECHO_T}can't test" >&6 -echo "$as_me:$LINENO: checking for main in -lgmp" >&5 -echo $ECHO_N "checking for main in -lgmp... $ECHO_C" >&6 -if test "${ac_cv_lib_gmp_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmp $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include "gmp.h" +int main() { return !gmp_version; } -int -main () -{ -main (); - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_gmp_main=yes + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_gmp_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gmp_main" >&5 -echo "${ECHO_T}$ac_cv_lib_gmp_main" >&6 -if test $ac_cv_lib_gmp_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGMP 1 -_ACEOF - - LIBS="-lgmp $LIBS" +( exit $ac_status ) -else - { { echo "$as_me:$LINENO: error: gmp not found" >&5 -echo "$as_me: error: gmp not found" >&2;} + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: libgmp not found" >&5 +echo "$as_me: error: libgmp not found" >&2;} { (exit 1); exit 1; }; } -fi fi - - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi echo "$as_me:$LINENO: checking if gmp.h version and libgmp version are the same" >&5 echo $ECHO_N "checking if gmp.h version and libgmp version are the same... $ECHO_C" >&6 diff -Naur mpfr-2.1.0-p1/configure.in mpfr-2.1.0-p2/configure.in --- mpfr-2.1.0-p1/configure.in 2004-11-03 15:08:49.000000000 +0000 +++ mpfr-2.1.0-p2/configure.in 2005-01-23 23:10:16.115811672 +0000 @@ -155,7 +155,32 @@ mv confdefs.tmp confdefs.h fi -AC_MY_LIBS($with_gmp_lib, gmp) +dnl AC_CHECK_LIB doesn't do what we want +AC_MSG_CHECKING(for GMP library) +if test -r "$with_gmp_lib/libgmp.a"; then + LIBS="$with_gmp_lib/libgmp.a $LIBS" +elif test -r "$with_gmp_lib/libgmp.so"; then + LIBS="$with_gmp_lib/libgmp.so $LIBS" +elif test -r "$with_gmp_lib/libgmp.lib"; then + LIBS="$with_gmp_lib/libgmp.lib $LIBS" +else + if test -d "$with_gmp_lib"; then + LDFLAGS="-L$with_gmp_lib $LDFLAGS" + fi + LIBS="-lgmp $LIBS" +fi +dnl FIXME: If AC_RUN_IFELSE failed try with AC_LINK_IFELSE? +AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include "gmp.h" +int main() { return !gmp_version; } + ]])], [ + AC_MSG_RESULT(yes) + ], [ + AC_MSG_RESULT(no) + AC_MSG_ERROR(libgmp not found) + ], [ + AC_MSG_RESULT([can't test]) + ]) dnl Check for corresponding 'gmp.h' and libgmp.a AC_MSG_CHECKING(if gmp.h version and libgmp version are the same) @@ -168,13 +193,13 @@ char buffer[100]; if (__GNU_MP_VERSION_PATCHLEVEL != 0) sprintf (buffer, "%d.%d.%d", __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, - __GNU_MP_VERSION_PATCHLEVEL); + __GNU_MP_VERSION_PATCHLEVEL); else sprintf (buffer, "%d.%d", __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR); printf ("(%s/%s) ", buffer, gmp_version); return (strcmp (buffer, gmp_version) != 0) ? 1 : 0; } -], AC_MSG_RESULT(yes), +], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no) AC_MSG_ERROR(['gmp.h' and 'libgmp' have different versions, or (on some platforms) libgmp couldn't be found! You have to properly reinstall GMP.])], AC_MSG_RESULT([can't test]) diff -Naur mpfr-2.1.0-p1/tests/Makefile.in mpfr-2.1.0-p2/tests/Makefile.in --- mpfr-2.1.0-p1/tests/Makefile.in 2004-11-03 15:26:13.000000000 +0000 +++ mpfr-2.1.0-p2/tests/Makefile.in 2005-01-23 23:11:45.314251448 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.2 from Makefile.am. +# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,