comparison configure.ac @ 5739:a2912073be85

Support bignums with MPIR. Add documentation on the bignum, ratio, and bigfloat implementations. See xemacs-patches message with ID <CAHCOHQkytZao7Uk9ggeo1HKKJtN1bqO054X2mPsGYyQFjbHrZA@mail.gmail.com> and following messages.
author Jerry James <james@xemacs.org>
date Wed, 19 Jun 2013 09:30:30 -0600
parents 3192994c49ca
children 9c17f7be0b92
comparison
equal deleted inserted replaced
5738:f6af091ac654 5739:a2912073be85
962 loaded libraries (Dynamic Shared Objects).]), 962 loaded libraries (Dynamic Shared Objects).]),
963 [], []) 963 [], [])
964 XE_KEYWORD_ARG([bignum], 964 XE_KEYWORD_ARG([bignum],
965 AS_HELP_STRING([--with-bignum=TYPE],[Compile in support for bignums, ratios, or bigfloats 965 AS_HELP_STRING([--with-bignum=TYPE],[Compile in support for bignums, ratios, or bigfloats
966 using library support. TYPE must be one of "gmp" 966 using library support. TYPE must be one of "gmp"
967 (for GNU MP), "mp" (for BSD MP), or "no" (disabled).]), 967 (for GNU MP), "mpir" (for MPIR), "mp" (for BSD MP),
968 [], [with_bignum="no"],[no,gmp,mp]) 968 or "no" (disabled).]),
969 [], [with_bignum="no"],[no,gmp,mpir,mp])
969 dnl 970 dnl
970 XE_HELP_SUBSECTION([Platform Specific options]) 971 XE_HELP_SUBSECTION([Platform Specific options])
971 XE_MERGED_ARG([workshop], 972 XE_MERGED_ARG([workshop],
972 AS_HELP_STRING([--with-workshop],[Support the Sun WorkShop (formerly Sparcworks) 973 AS_HELP_STRING([--with-workshop],[Support the Sun WorkShop (formerly Sparcworks)
973 development environment.]), 974 development environment.]),
5262 AC_DEFINE(WITH_GMP) 5263 AC_DEFINE(WITH_GMP)
5263 XE_PREPEND(-lgmp, LIBS) 5264 XE_PREPEND(-lgmp, LIBS)
5264 else 5265 else
5265 XE_DIE("Required GMP numeric support cannot be provided.") 5266 XE_DIE("Required GMP numeric support cannot be provided.")
5266 fi 5267 fi
5268 elif test "$with_bignum" = "mpir"; then
5269 AC_CHECK_HEADER(mpir.h, [
5270 AC_CHECK_LIB(mpir, __gmpz_init, have_mpz_init=yes)])
5271 if test "$have_mpz_init" = "yes"; then
5272 AC_DEFINE(WITH_NUMBER_TYPES)
5273 AC_DEFINE(WITH_MPIR)
5274 XE_PREPEND(-lmpir, LIBS)
5275 else
5276 XE_DIE("Required MPIR numeric support cannot be provided.")
5277 fi
5267 elif test "$with_bignum" = "mp"; then 5278 elif test "$with_bignum" = "mp"; then
5268 for library in "" "-lcrypto"; do 5279 for library in "" "-lcrypto"; do
5269 AC_CHECK_HEADER(mp.h, [ 5280 AC_CHECK_HEADER(mp.h, [
5270 AC_CHECK_LIB(mp, mp_mfree, have_mp_mfree=yes; break, [ 5281 AC_CHECK_LIB(mp, mp_mfree, have_mp_mfree=yes; break, [
5271 AC_CHECK_LIB(mp, mfree, have_mfree=yes; break, , $library)], 5282 AC_CHECK_LIB(mp, mfree, have_mfree=yes; break, , $library)],
5930 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." 5941 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
5931 test "$with_socks" = yes && echo " Compiling in support for SOCKS." 5942 test "$with_socks" = yes && echo " Compiling in support for SOCKS."
5932 test "$with_dnet" = yes && echo " Compiling in support for DNET." 5943 test "$with_dnet" = yes && echo " Compiling in support for DNET."
5933 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." 5944 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules."
5934 test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library." 5945 test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library."
5946 test "$with_bignum" = "mpir" && echo " Compiling in support for more number types using the MPIR library."
5935 test "$with_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library." 5947 test "$with_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library."
5936 if test "$with_union_type" = yes ; then 5948 if test "$with_union_type" = yes ; then
5937 echo " Using the union type for Lisp_Objects." 5949 echo " Using the union type for Lisp_Objects."
5938 echo " WARNING: ---------------------------------------------------------" 5950 echo " WARNING: ---------------------------------------------------------"
5939 echo " WARNING: This tends to trigger compiler bugs, especially when" 5951 echo " WARNING: This tends to trigger compiler bugs, especially when"