--enable-slow-config is now much faster because it simply takes the flags from the GMP library that we are going to build anyways.

This commit is contained in:
Juan Jose Garcia Ripoll 2009-08-31 12:21:21 +02:00
parent 2e1ba7a9e9
commit 302c48e5e4
4 changed files with 305 additions and 293 deletions

View file

@ -36,6 +36,9 @@ ECL 9.9.1:
- The functions cl_alloc_simple_{base,extended}_string() now carry the prefix
ecl_ instead of cl_, and they are simple aliases for ecl_alloc_simple_vector.
- The option --enable-slow-config is now always on in Solaris and it does not
take more time than an ordinary build using --with-system-gmp=no
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***

13
src/aclocal.m4 vendored
View file

@ -284,6 +284,7 @@ case "${host_os}" in
TCPLIBS='-lsocket -lnsl -lintl'
clibs='-ldl'
CFLAGS="${CFLAGS} -std=gnu99"
enable_slow_config=yes
;;
cygwin*)
thehost='cygwin'
@ -735,13 +736,11 @@ dnl configuring ECL in a compatible way.
dnl
AC_DEFUN(ECL_GMP_BASED_CONFIG,[
AC_MSG_CHECKING([Using the GMP library to guess good compiler/linker flags])
(rm -rf tmp; \
mkdir tmp; \
aux=`cd ${srcdir}/gmp; pwd`;
cd tmp; \
${aux}/configure --srcdir=${aux} --prefix=${builddir} >/dev/null 2>&1)
GMP_CFLAGS=`grep '^s,@CFLAGS@' tmp/config.status| sed 's&s,@CFLAGS@,\(.*\),;t t&\1&'`
GMP_LDFLAGS=`grep '^s,@GMP_LDFLAGS@' tmp/config.status| sed 's&s,@GMP_LDFLAGS@,\(.*\),;t t&\1&'`;
if test ! -f gmp/config.status; then
AC_MSG_ERROR([Cannot find GMP's configuration file. Aborting])
fi
GMP_CFLAGS=`grep '^s,@CFLAGS@' gmp/config.status| sed 's&s,@CFLAGS@,\(.*\),;t t&\1&'`
GMP_LDFLAGS=`grep '^s,@GMP_LDFLAGS@' gmp/config.status| sed 's&s,@GMP_LDFLAGS@,\(.*\),;t t&\1&'`;
# Notice that GMP_LDFLAGS is designed to be passed to libtool, and therefore
# some options could be prefixed by -Wc, which means "flag for the compiler".
LDFLAGS=`echo ${LDFLAGS} ${GMP_LDFLAGS} | sed 's%-Wc,%%g'`

453
src/configure vendored
View file

@ -637,7 +637,6 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
ECL_GMP_HEADER
ECL_BOEHM_GC_HEADER
CLX_INFO
ECL_CC
@ -663,6 +662,7 @@ SONAME2
SONAME3
EGREP
GREP
ECL_GMP_HEADER
INSTALL_INFO
INFOEXT
thehost
@ -4223,35 +4223,6 @@ $as_echo "no" >&6; }
fi
# set $(MAKE) if needed
if test "${enable_slow_config}" = "yes"; then
{ $as_echo "$as_me:$LINENO: checking Using the GMP library to guess good compiler/linker flags" >&5
$as_echo_n "checking Using the GMP library to guess good compiler/linker flags... " >&6; }
(rm -rf tmp; \
mkdir tmp; \
aux=`cd ${srcdir}/gmp; pwd`;
cd tmp; \
${aux}/configure --srcdir=${aux} --prefix=${builddir} >/dev/null 2>&1)
GMP_CFLAGS=`grep '^s,@CFLAGS@' tmp/config.status| sed 's&s,@CFLAGS@,\(.*\),;t t&\1&'`
GMP_LDFLAGS=`grep '^s,@GMP_LDFLAGS@' tmp/config.status| sed 's&s,@GMP_LDFLAGS@,\(.*\),;t t&\1&'`;
# Notice that GMP_LDFLAGS is designed to be passed to libtool, and therefore
# some options could be prefixed by -Wc, which means "flag for the compiler".
LDFLAGS=`echo ${LDFLAGS} ${GMP_LDFLAGS} | sed 's%-Wc,%%g'`
CFLAGS=`echo ${CFLAGS} ${GMP_CFLAGS} | sed 's%-Wc,%%g'`
GMP_CFLAGS=""
GMP_LDFLAGS=""
#host=`grep '^s,@host@' config.status | sed 's&s,@host@,\(.*\),;t t&\1&'`
{ $as_echo "$as_me:$LINENO: checking C/C++ compiler flags" >&5
$as_echo_n "checking C/C++ compiler flags... " >&6; }
{ $as_echo "$as_me:$LINENO: result: ${CFLAGS}" >&5
$as_echo "${CFLAGS}" >&6; }
{ $as_echo "$as_me:$LINENO: checking Linker flags" >&5
$as_echo_n "checking Linker flags... " >&6; }
{ $as_echo "$as_me:$LINENO: result: ${LDFLAGS}" >&5
$as_echo "${LDFLAGS}" >&6; }
fi
@ -4462,6 +4433,7 @@ case "${host_os}" in
TCPLIBS='-lsocket -lnsl -lintl'
clibs='-ldl'
CFLAGS="${CFLAGS} -std=gnu99"
enable_slow_config=yes
;;
cygwin*)
thehost='cygwin'
@ -4664,6 +4636,232 @@ else
INFOEXT=info
fi
if test "x${with_gmp}" != "xno"; then
CFLAGS="$CFLAGS $GMP_CFLAGS"
LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
if test ${with_system_gmp} = "auto"; then
{ $as_echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5
$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; }
if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgmp $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char __gmpz_init ();
int
main ()
{
return __gmpz_init ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_lib_gmp___gmpz_init=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gmp___gmpz_init=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5
$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then
with_system_gmp=yes
else
with_system_gmp=no
fi
fi
if test "${with_system_gmp}" = "yes"; then
{ $as_echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5
$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; }
if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgmp $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char __gmpz_init ();
int
main ()
{
return __gmpz_init ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_lib_gmp___gmpz_init=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gmp___gmpz_init=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5
$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then
FASL_LIBS="${FASL_LIBS} -lgmp"
else
{ { $as_echo "$as_me:$LINENO: error: System gmp library requested but not found." >&5
$as_echo "$as_me: error: System gmp library requested but not found." >&2;}
{ (exit 1); exit 1; }; }
fi
else
SUBDIRS="${SUBDIRS} gmp"
CORE_LIBS="-leclgmp ${CORE_LIBS}"
if test ${enable_shared} = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
fi
fi
if test "${with_gmp}" = "no" ; then
{ $as_echo "$as_me:$LINENO: Not using GMP library at all. Are you sure?" >&5
$as_echo "$as_me: Not using GMP library at all. Are you sure?" >&6;}
EXTRA_OBJS="${EXTRA_OBJS} big_ll.o"
ECL_GMP_HEADER='nofile'
else
cat >>confdefs.h <<\_ACEOF
#define WITH_GMP 1
_ACEOF
EXTRA_OBJS="${EXTRA_OBJS} big.o"
ECL_GMP_HEADER='gmp.h'
if test "${with_system_gmp}" = "no" ; then
{ $as_echo "$as_me:$LINENO: Configuring included GMP library:" >&5
$as_echo "$as_me: Configuring included GMP library:" >&6;}
test -d gmp && rm -rf gmp
if test -z "$gmp_build"; then
gmp_build="${build_alias}"
fi
if mkdir gmp; then
ECL_GMP_HEADER='ecl/gmp.h'
(destdir=`${PWDCMD}`; cd gmp; CC="${CC} ${PICFLAG}" \
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${gmp_build} --host=${host_alias} $with_gmp)
fi
fi
with_gmp="yes"
fi
{ $as_echo "$as_me:$LINENO: checking GMP autoconf" >&5
$as_echo_n "checking GMP autoconf... " >&6; }
{ $as_echo "$as_me:$LINENO: result: \"${with_gmp}.${with_system_gmp}.${enable_slow_config}\"" >&5
$as_echo "\"${with_gmp}.${with_system_gmp}.${enable_slow_config}\"" >&6; }
if test "${with_gmp}.${with_system_gmp}.${enable_slow_config}" = "yes.no.yes"; then
{ $as_echo "$as_me:$LINENO: checking Using the GMP library to guess good compiler/linker flags" >&5
$as_echo_n "checking Using the GMP library to guess good compiler/linker flags... " >&6; }
if test ! -f gmp/config.status; then
{ { $as_echo "$as_me:$LINENO: error: Cannot find GMP's configuration file. Aborting" >&5
$as_echo "$as_me: error: Cannot find GMP's configuration file. Aborting" >&2;}
{ (exit 1); exit 1; }; }
fi
GMP_CFLAGS=`grep '^s,@CFLAGS@' gmp/config.status| sed 's&s,@CFLAGS@,\(.*\),;t t&\1&'`
GMP_LDFLAGS=`grep '^s,@GMP_LDFLAGS@' gmp/config.status| sed 's&s,@GMP_LDFLAGS@,\(.*\),;t t&\1&'`;
# Notice that GMP_LDFLAGS is designed to be passed to libtool, and therefore
# some options could be prefixed by -Wc, which means "flag for the compiler".
LDFLAGS=`echo ${LDFLAGS} ${GMP_LDFLAGS} | sed 's%-Wc,%%g'`
CFLAGS=`echo ${CFLAGS} ${GMP_CFLAGS} | sed 's%-Wc,%%g'`
GMP_CFLAGS=""
GMP_LDFLAGS=""
#host=`grep '^s,@host@' config.status | sed 's&s,@host@,\(.*\),;t t&\1&'`
{ $as_echo "$as_me:$LINENO: checking C/C++ compiler flags" >&5
$as_echo_n "checking C/C++ compiler flags... " >&6; }
{ $as_echo "$as_me:$LINENO: result: ${CFLAGS}" >&5
$as_echo "${CFLAGS}" >&6; }
{ $as_echo "$as_me:$LINENO: checking Linker flags" >&5
$as_echo_n "checking Linker flags... " >&6; }
{ $as_echo "$as_me:$LINENO: result: ${LDFLAGS}" >&5
$as_echo "${LDFLAGS}" >&6; }
fi
LIBS="${LIBS} -lm"
@ -5687,169 +5885,6 @@ _ACEOF
fi
if test "x${with_gmp}" != "xno"; then
CFLAGS="$CFLAGS $GMP_CFLAGS"
LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
if test ${with_system_gmp} = "auto"; then
{ $as_echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5
$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; }
if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgmp $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char __gmpz_init ();
int
main ()
{
return __gmpz_init ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_lib_gmp___gmpz_init=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gmp___gmpz_init=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5
$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then
with_system_gmp=yes
else
with_system_gmp=no
fi
fi
if test "${with_system_gmp}" = "yes"; then
{ $as_echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5
$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; }
if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgmp $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char __gmpz_init ();
int
main ()
{
return __gmpz_init ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_lib_gmp___gmpz_init=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gmp___gmpz_init=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5
$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then
FASL_LIBS="${FASL_LIBS} -lgmp"
else
{ { $as_echo "$as_me:$LINENO: error: System gmp library requested but not found." >&5
$as_echo "$as_me: error: System gmp library requested but not found." >&2;}
{ (exit 1); exit 1; }; }
fi
else
SUBDIRS="${SUBDIRS} gmp"
CORE_LIBS="-leclgmp ${CORE_LIBS}"
if test ${enable_shared} = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
fi
fi
{ $as_echo "$as_me:$LINENO: checking for soname flags" >&5
$as_echo_n "checking for soname flags... " >&6; }
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'`
@ -13483,38 +13518,6 @@ $as_echo "$as_me: error: Not a valid argument for --enable-boehm $enable_boehm"
{ (exit 1); exit 1; }; };;
esac
if test "${with_gmp}" = "no" ; then
{ $as_echo "$as_me:$LINENO: Not using GMP library at all. Are you sure?" >&5
$as_echo "$as_me: Not using GMP library at all. Are you sure?" >&6;}
EXTRA_OBJS="${EXTRA_OBJS} big_ll.o"
ECL_GMP_HEADER='nofile'
else
cat >>confdefs.h <<\_ACEOF
#define WITH_GMP 1
_ACEOF
EXTRA_OBJS="${EXTRA_OBJS} big.o"
ECL_GMP_HEADER='gmp.h'
if test "${with_system_gmp}" = "no" ; then
{ $as_echo "$as_me:$LINENO: Configuring included GMP library:" >&5
$as_echo "$as_me: Configuring included GMP library:" >&6;}
test -d gmp && rm -rf gmp
if test -z "$gmp_build"; then
gmp_build="${build_alias}"
fi
if mkdir gmp; then
ECL_GMP_HEADER='ecl/gmp.h'
(destdir=`${PWDCMD}`; cd gmp; CC="${CC} ${PICFLAG}" \
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${gmp_build} --host=${host_alias} $with_gmp)
fi
fi
fi
ac_config_files="$ac_config_files bare.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp ../Makefile Makefile c/Makefile doc/Makefile doc/ecl.man doc/ecl-config.man ecl/configpre.h:h/config.h.in bin/ecl-config.pre:util/ecl-config lsp/config.pre:lsp/config.lsp.in compile.pre:compile.lsp.in cmp/cmpdefs.pre:cmp/cmpdefs.lsp"
ac_config_headers="$ac_config_headers ecl/config.h:ecl/configpre.h"

View file

@ -298,12 +298,6 @@ AC_PROG_INSTALL # sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
AC_PROG_LN_S # sets variable LN_S
AC_PROG_MAKE_SET # set $(MAKE) if needed
dnl -----------------------------------------------------------------------
dnl GMP-based search of C/C++ compiler and linker flags
if test "${enable_slow_config}" = "yes"; then
ECL_GMP_BASED_CONFIG
fi
dnl -----------------------------------------------------------------------
dnl Checks which do not come with autoconf (must be after AC_PROG_CC)
ECL_MAKE_ABSOLUTE_SRCDIR
@ -320,6 +314,74 @@ else
INFOEXT=info
fi
dnl ======================================================================
dnl GNU multiprecision library
dnl
dnl This a multi-stage process. First we have to detect whether we must build
dnl the GMP library. If this is the case, then we may have to detect the
dnl build flags for the library, because GMP may choose to build for 64
dnl or 32 bits executables and ECL has to be compiled / linked using precisely
dnl the same flags
dnl
if test "x${with_gmp}" != "xno"; then
CFLAGS="$CFLAGS $GMP_CFLAGS"
LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
if test ${with_system_gmp} = "auto"; then
AC_CHECK_LIB( [gmp], [__gmpz_init],
[with_system_gmp=yes], [with_system_gmp=no] )
fi
if test "${with_system_gmp}" = "yes"; then
AC_CHECK_LIB( [gmp], [__gmpz_init],
[FASL_LIBS="${FASL_LIBS} -lgmp"],
[AC_MSG_ERROR([System gmp library requested but not found.])])
else
SUBDIRS="${SUBDIRS} gmp"
CORE_LIBS="-leclgmp ${CORE_LIBS}"
if test ${enable_shared} = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
fi
fi
dnl ----------------------------------------------------------------------
dnl Configure local GMP if needed
AC_SUBST(ECL_GMP_HEADER)
if test "${with_gmp}" = "no" ; then
AC_MSG_NOTICE(Not using GMP library at all. Are you sure?)
EXTRA_OBJS="${EXTRA_OBJS} big_ll.o"
ECL_GMP_HEADER='nofile'
else
AC_DEFINE( [WITH_GMP], [1], [Use GMP for bignums] )
EXTRA_OBJS="${EXTRA_OBJS} big.o"
ECL_GMP_HEADER='gmp.h'
if test "${with_system_gmp}" = "no" ; then
AC_MSG_NOTICE(Configuring included GMP library:)
test -d gmp && rm -rf gmp
if test -z "$gmp_build"; then
gmp_build="${build_alias}"
fi
if mkdir gmp; then
ECL_GMP_HEADER='ecl/gmp.h'
dnl Notice we need -DPIC to force the assembler to generate PIC code
(destdir=`${PWDCMD}`; cd gmp; CC="${CC} ${PICFLAG}" \
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${gmp_build} --host=${host_alias} $with_gmp)
fi
fi
with_gmp="yes"
fi
dnl -----------------------------------------------------------------------
dnl GMP-based search of C/C++ compiler and linker flags
AC_MSG_CHECKING([GMP autoconf])
AC_MSG_RESULT(["${with_gmp}.${with_system_gmp}.${enable_slow_config}"])
if test "${with_gmp}.${with_system_gmp}.${enable_slow_config}" = "yes.no.yes"; then
ECL_GMP_BASED_CONFIG
fi
dnl =====================================================================
dnl Checks for libraries
@ -428,32 +490,6 @@ if test ${enable_smallcons} = "yes" ; then
AC_DEFINE(ECL_SMALL_CONS)
fi
dnl ----------------------------------------------------------------------
dnl GNU multiprecision library
if test "x${with_gmp}" != "xno"; then
CFLAGS="$CFLAGS $GMP_CFLAGS"
LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
if test ${with_system_gmp} = "auto"; then
AC_CHECK_LIB( [gmp], [__gmpz_init],
[with_system_gmp=yes], [with_system_gmp=no] )
fi
if test "${with_system_gmp}" = "yes"; then
AC_CHECK_LIB( [gmp], [__gmpz_init],
[FASL_LIBS="${FASL_LIBS} -lgmp"],
[AC_MSG_ERROR([System gmp library requested but not found.])])
else
SUBDIRS="${SUBDIRS} gmp"
CORE_LIBS="-leclgmp ${CORE_LIBS}"
if test ${enable_shared} = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
fi
fi
dnl ----------------------------------------------------------------------
dnl SONAME is only active when SONAME_LDFLAGS and SONAME are non nil
dnl
@ -782,35 +818,6 @@ case "${enable_boehm}" in
AC_MSG_ERROR([Not a valid argument for --enable-boehm $enable_boehm]);;
esac
dnl ----------------------------------------------------------------------
dnl Configure local GMP if needed
AC_SUBST(ECL_GMP_HEADER)
if test "${with_gmp}" = "no" ; then
AC_MSG_NOTICE(Not using GMP library at all. Are you sure?)
EXTRA_OBJS="${EXTRA_OBJS} big_ll.o"
ECL_GMP_HEADER='nofile'
else
AC_DEFINE( [WITH_GMP], [1], [Use GMP for bignums] )
EXTRA_OBJS="${EXTRA_OBJS} big.o"
ECL_GMP_HEADER='gmp.h'
if test "${with_system_gmp}" = "no" ; then
AC_MSG_NOTICE(Configuring included GMP library:)
test -d gmp && rm -rf gmp
if test -z "$gmp_build"; then
gmp_build="${build_alias}"
fi
if mkdir gmp; then
ECL_GMP_HEADER='ecl/gmp.h'
dnl Notice we need -DPIC to force the assembler to generate PIC code
(destdir=`${PWDCMD}`; cd gmp; CC="${CC} ${PICFLAG}" \
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${gmp_build} --host=${host_alias} $with_gmp)
fi
fi
fi
AC_CONFIG_FILES([
bare.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp
../Makefile Makefile c/Makefile doc/Makefile doc/ecl.man doc/ecl-config.man