diff -r f55c4aa3687f2723419e0132c05b8f9c3e39f39a -r e8b6f15e43fbbda6e49722411ad2367544101558 configure --- a/configure Wed Apr 17 22:26:30 2013 -0500 +++ b/configure Wed Apr 17 22:30:55 2013 -0500 @@ -19703,9 +19703,9 @@ echo $ECHO_N "checking whether gmp.h works for us... $ECHO_C" >&6; } oldCPPFLAGS=$CPPFLAGS if test "x$with_gmp_dir" != "x"; then - test -r $with_gmp_dir/include/$GMPH && cp $with_gmp_dir/include/$GMPH . - if test -r $GMPH && ! fgrep -q "USER_GMP_WRAP" $GMPH; then - patch -s -f $GMPH < $srcdir/gmp.h.patch \ + test -r $with_gmp_dir/include/$GMPH && cp $with_gmp_dir/include/$GMPH ./gmp.h + if test -r gmp.h && ! fgrep -q "USER_GMP_WRAP" gmp.h; then + patch -s -f gmp.h < $srcdir/gmp.h.patch \ && CPPFLAGS="$CPPFLAGS -I$PWD" \ && echo "no, using locally patched gmp.h" \ && gmp_inc_dir="GMP_inc_dir = $PWD" @@ -19719,10 +19719,10 @@ fi else # use default header location, and try to patch gmp.h locally, if necessary - test -r /usr/include/$GMPH && cp /usr/include/$GMPH . - test -r /usr/local/include/$GMPH && cp /usr/local/include/$GMPH . - if test -r $GMPH && ! fgrep -q "USER_GMP_WRAP" $GMPH; then - patch -s -f $GMPH < $srcdir/gmp.h.patch \ + test -r /usr/include/$GMPH && cp /usr/include/$GMPH ./gmp.h + test -r /usr/local/include/$GMPH && cp /usr/local/include/$GMPH ./gmp.h + if test -r gmp.h && ! fgrep -q "USER_GMP_WRAP" gmp.h; then + patch -s -f gmp.h < $srcdir/gmp.h.patch \ && CPPFLAGS="$CPPFLAGS -I$PWD" \ && echo "no, using locally patched gmp.h" \ && gmp_inc_dir="GMP_inc_dir = $PWD"