|
|
@ -22,7 +22,7 @@ ac_help="$ac_help |
|
|
|
ac_help="$ac_help |
|
|
|
--with-gnu-ld assume the C compiler uses GNU ld [default=no]" |
|
|
|
ac_help="$ac_help |
|
|
|
--with-gmp use fast GNU gmp low-level functions" |
|
|
|
--with-gmp use external fast GNU gmp low-level functions" |
|
|
|
|
|
|
|
# Initialize some variables set by options. |
|
|
|
# The variables have the same names as the options, with |
|
|
@ -2731,29 +2731,101 @@ if test "${with_gmp+set}" = set; then |
|
|
|
: |
|
|
|
fi |
|
|
|
|
|
|
|
if test -z "$with_gmp"; then |
|
|
|
if test -d "${srcdir}/gmp"; then |
|
|
|
with_gmp=yes |
|
|
|
else |
|
|
|
with_gmp=no |
|
|
|
fi |
|
|
|
fi |
|
|
|
if test "$with_gmp" = yes; then |
|
|
|
cat >> confdefs.h <<\EOF |
|
|
|
#define CL_USE_GMP 1 |
|
|
|
ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'` |
|
|
|
echo $ac_n "checking for gmp.h""... $ac_c" 1>&6 |
|
|
|
echo "configure:2738: checking for gmp.h" >&5 |
|
|
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6 |
|
|
|
else |
|
|
|
cat > conftest.$ac_ext <<EOF |
|
|
|
#line 2743 "configure" |
|
|
|
#include "confdefs.h" |
|
|
|
#include <gmp.h> |
|
|
|
EOF |
|
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
|
|
|
{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
|
|
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
|
|
|
if test -z "$ac_err"; then |
|
|
|
rm -rf conftest* |
|
|
|
eval "ac_cv_header_$ac_safe=yes" |
|
|
|
else |
|
|
|
echo "$ac_err" >&5 |
|
|
|
echo "configure: failed program was:" >&5 |
|
|
|
cat conftest.$ac_ext >&5 |
|
|
|
rm -rf conftest* |
|
|
|
eval "ac_cv_header_$ac_safe=no" |
|
|
|
fi |
|
|
|
rm -f conftest* |
|
|
|
fi |
|
|
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
|
|
|
echo "$ac_t""yes" 1>&6 |
|
|
|
: |
|
|
|
else |
|
|
|
echo "$ac_t""no" 1>&6 |
|
|
|
with_gmp="no" |
|
|
|
fi |
|
|
|
|
|
|
|
echo $ac_n "checking for __gmpn_divexact_by3 in -lgmp""... $ac_c" 1>&6 |
|
|
|
echo "configure:2771: checking for __gmpn_divexact_by3 in -lgmp" >&5 |
|
|
|
ac_lib_var=`echo gmp___gmpn_divexact_by3 | sed 'y%./+-%__p_%'` |
|
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
|
|
|
echo $ac_n "(cached) $ac_c" 1>&6 |
|
|
|
else |
|
|
|
ac_save_LIBS="$LIBS" |
|
|
|
LIBS="-lgmp $LIBS" |
|
|
|
cat > conftest.$ac_ext <<EOF |
|
|
|
#line 2779 "configure" |
|
|
|
#include "confdefs.h" |
|
|
|
/* Override any gcc2 internal prototype to avoid an error. */ |
|
|
|
#ifdef __cplusplus |
|
|
|
extern "C" |
|
|
|
#endif |
|
|
|
/* We use char because int might match the return type of a gcc2 |
|
|
|
builtin and then its argument prototype would still apply. */ |
|
|
|
char __gmpn_divexact_by3(); |
|
|
|
|
|
|
|
GMP_INCLUDES='-I$(top_srcdir)/gmp' |
|
|
|
GMP_OBJDEPS='../gmp/mpn/libmpn.la' |
|
|
|
GMP_OBJS='../gmp/mpn/*.lo ../gmp/*.lo' |
|
|
|
int main() { |
|
|
|
__gmpn_divexact_by3() |
|
|
|
; return 0; } |
|
|
|
EOF |
|
|
|
if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
|
|
|
rm -rf conftest* |
|
|
|
eval "ac_cv_lib_$ac_lib_var=yes" |
|
|
|
else |
|
|
|
GMP_INCLUDES='' |
|
|
|
GMP_OBJDEPS='' |
|
|
|
GMP_OBJS='' |
|
|
|
echo "configure: failed program was:" >&5 |
|
|
|
cat conftest.$ac_ext >&5 |
|
|
|
rm -rf conftest* |
|
|
|
eval "ac_cv_lib_$ac_lib_var=no" |
|
|
|
fi |
|
|
|
rm -f conftest* |
|
|
|
LIBS="$ac_save_LIBS" |
|
|
|
|
|
|
|
fi |
|
|
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
|
|
|
echo "$ac_t""yes" 1>&6 |
|
|
|
ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
|
|
|
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
|
|
|
cat >> confdefs.h <<EOF |
|
|
|
#define $ac_tr_lib 1 |
|
|
|
EOF |
|
|
|
|
|
|
|
LIBS="-lgmp $LIBS" |
|
|
|
|
|
|
|
else |
|
|
|
echo "$ac_t""no" 1>&6 |
|
|
|
with_gmp="no" |
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
if test "$with_gmp" = yes; then |
|
|
|
cat >> confdefs.h <<\EOF |
|
|
|
#define CL_USE_GMP 1 |
|
|
|
EOF |
|
|
|
|
|
|
|
else |
|
|
|
echo "configure: warning: disabling external gmp" 1>&2 |
|
|
|
fi |
|
|
|
for f in 'tests/.gdbinit'; do |
|
|
|
if test '!' -f "$f"; then |
|
|
|
echo "creating $f" |
|
|
@ -2913,9 +2985,6 @@ s%@NM@%$NM%g |
|
|
|
s%@LN_S@%$LN_S%g |
|
|
|
s%@LIBTOOL@%$LIBTOOL%g |
|
|
|
s%@ALLOCA@%$ALLOCA%g |
|
|
|
s%@GMP_INCLUDES@%$GMP_INCLUDES%g |
|
|
|
s%@GMP_OBJDEPS@%$GMP_OBJDEPS%g |
|
|
|
s%@GMP_OBJS@%$GMP_OBJS%g |
|
|
|
|
|
|
|
CEOF |
|
|
|
EOF |
|
|
@ -3130,104 +3199,3 @@ chmod +x $CONFIG_STATUS |
|
|
|
rm -fr confdefs* $ac_clean_files |
|
|
|
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
|
|
|
|
|
|
|
if test "$with_gmp" = yes; then |
|
|
|
|
|
|
|
if test "$no_recursion" != yes; then |
|
|
|
|
|
|
|
# Remove --cache-file and --srcdir arguments so they do not pile up. |
|
|
|
ac_sub_configure_args= |
|
|
|
ac_prev= |
|
|
|
for ac_arg in $ac_configure_args; do |
|
|
|
if test -n "$ac_prev"; then |
|
|
|
ac_prev= |
|
|
|
continue |
|
|
|
fi |
|
|
|
case "$ac_arg" in |
|
|
|
-cache-file | --cache-file | --cache-fil | --cache-fi \ |
|
|
|
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
|
|
|
ac_prev=cache_file ;; |
|
|
|
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
|
|
|
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
|
|
|
;; |
|
|
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
|
|
|
ac_prev=srcdir ;; |
|
|
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
|
|
|
;; |
|
|
|
*) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; |
|
|
|
esac |
|
|
|
done |
|
|
|
|
|
|
|
for ac_config_dir in gmp; do |
|
|
|
|
|
|
|
# Do not complain, so a configure script can configure whichever |
|
|
|
# parts of a large source tree are present. |
|
|
|
if test ! -d $srcdir/$ac_config_dir; then |
|
|
|
continue |
|
|
|
fi |
|
|
|
|
|
|
|
echo configuring in $ac_config_dir |
|
|
|
|
|
|
|
case "$srcdir" in |
|
|
|
.) ;; |
|
|
|
*) |
|
|
|
if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; |
|
|
|
else |
|
|
|
{ echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } |
|
|
|
fi |
|
|
|
;; |
|
|
|
esac |
|
|
|
|
|
|
|
ac_popdir=`pwd` |
|
|
|
cd $ac_config_dir |
|
|
|
|
|
|
|
# A "../" for each directory in /$ac_config_dir. |
|
|
|
ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` |
|
|
|
|
|
|
|
case "$srcdir" in |
|
|
|
.) # No --srcdir option. We are building in place. |
|
|
|
ac_sub_srcdir=$srcdir ;; |
|
|
|
/*) # Absolute path. |
|
|
|
ac_sub_srcdir=$srcdir/$ac_config_dir ;; |
|
|
|
*) # Relative path. |
|
|
|
ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
|
|
|
esac |
|
|
|
|
|
|
|
# Check for guested configure; otherwise get Cygnus style configure. |
|
|
|
if test -f $ac_sub_srcdir/configure; then |
|
|
|
ac_sub_configure=$ac_sub_srcdir/configure |
|
|
|
elif test -f $ac_sub_srcdir/configure.in; then |
|
|
|
ac_sub_configure=$ac_configure |
|
|
|
else |
|
|
|
echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 |
|
|
|
ac_sub_configure= |
|
|
|
fi |
|
|
|
|
|
|
|
# The recursion is here. |
|
|
|
if test -n "$ac_sub_configure"; then |
|
|
|
|
|
|
|
# Make the cache file name correct relative to the subdirectory. |
|
|
|
case "$cache_file" in |
|
|
|
/*) ac_sub_cache_file=$cache_file ;; |
|
|
|
*) # Relative path. |
|
|
|
if test -n "$ac_dots"; then |
|
|
|
ac_sub_cache_file="$ac_dots"`echo "$cache_file" | sed 's,^\./,,'` |
|
|
|
else |
|
|
|
ac_sub_cache_file="$cache_file" |
|
|
|
fi |
|
|
|
;; |
|
|
|
esac |
|
|
|
|
|
|
|
echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" |
|
|
|
# The eval makes quoting arguments work. |
|
|
|
if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir |
|
|
|
then : |
|
|
|
else |
|
|
|
{ echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
cd $ac_popdir |
|
|
|
done |
|
|
|
fi |
|
|
|
|
|
|
|
fi |