make check failed due to 32/64 bits problem

Paul Zimmermann Paul.Zimmermann at loria.fr
Wed Nov 5 10:50:19 CET 2008


       Dear Torbjörn,

> From: Torbjorn Granlund <tg at swox.com>
> Date: Wed, 05 Nov 2008 10:45:34 +0100
> 
>   Note that with GMP >= 4.2.3 and MPFR >= 2.4.0 (which should be soon out),
>   MPFR will automagically get CC/CFLAGS from GMP.
>   
> That might be very helpful to all users, in particular the many new
> users that arrived with gcc.
> 
> How does it do that?  

this is done by getting those from gmp.h, more precisely with the following
code in configure.in.

Paul

dnl Check for GMP CFLAGS in gmp.h
if test -z "$GMP_CFLAGS" -a -z "$user_redefine_cc" ; then
   AC_MSG_CHECKING(for CC and CFLAGS in gmp.h)
   # FIXME: Move this in aclocal ?
   # Get CC
   echo "#include \"gmp.h\"" >  conftest.c
   echo "MPFR_OPTION __GMP_CC"           >> conftest.c
   GMP_CC="`$CPP $CPPFLAGS conftest.c 2> /dev/null | $EGREP MPFR_OPTION | $SED -e 's/MPFR_OPTION //g' | $SED -e 's/"//g'`"
   #Get CFLAGS
   echo "#include \"gmp.h\"" >  conftest.c
   echo "MPFR_OPTION __GMP_CFLAGS"           >> conftest.c
   GMP_CFLAGS="`$CPP $CPPFLAGS conftest.c 2> /dev/null | $EGREP MPFR_OPTION | $SED -e 's/MPFR_OPTION //g'| $SED -e 's/"//g'`"
   rm -f conftest*
   if test "x$GMP_CFLAGS" = "x__GMP_CFLAGS" -o "x$GMP_CC" = "x__GMP_CC" ; then
      AC_MSG_RESULT(no)
      GMP_CFLAGS=
      GMP_CC=
   else
      AC_MSG_RESULT(yes [CC=$GMP_CC CFLAGS=$GMP_CFLAGS])
   fi
fi


More information about the gmp-bugs mailing list