Mercurial > hg > xemacs-beta
comparison configure @ 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 |
---|---|
1966 | 1966 |
1967 --with-modules Compile in experimental support for dynamically | 1967 --with-modules Compile in experimental support for dynamically |
1968 loaded libraries (Dynamic Shared Objects). | 1968 loaded libraries (Dynamic Shared Objects). |
1969 --with-bignum=TYPE Compile in support for bignums, ratios, or bigfloats | 1969 --with-bignum=TYPE Compile in support for bignums, ratios, or bigfloats |
1970 using library support. TYPE must be one of "gmp" | 1970 using library support. TYPE must be one of "gmp" |
1971 (for GNU MP), "mp" (for BSD MP), or "no" (disabled). | 1971 (for GNU MP), "mpir" (for MPIR), "mp" (for BSD MP), |
1972 or "no" (disabled). | |
1972 | 1973 |
1973 Platform Specific options | 1974 Platform Specific options |
1974 ------------------------- | 1975 ------------------------- |
1975 | 1976 |
1976 --with-workshop Support the Sun WorkShop (formerly Sparcworks) | 1977 --with-workshop Support the Sun WorkShop (formerly Sparcworks) |
5176 # Check whether --with-bignum or --without-bignum was given. | 5177 # Check whether --with-bignum or --without-bignum was given. |
5177 if test "${with_bignum+set}" = set; then | 5178 if test "${with_bignum+set}" = set; then |
5178 enableval="$with_bignum" | 5179 enableval="$with_bignum" |
5179 withval="$with_bignum" | 5180 withval="$with_bignum" |
5180 _bignum_bogus=yes | 5181 _bignum_bogus=yes |
5181 for x in no gmp mp ; do | 5182 for x in no gmp mpir mp ; do |
5182 if test $x = $with_bignum ; then | 5183 if test $x = $with_bignum ; then |
5183 _bignum_bogus=no | 5184 _bignum_bogus=no |
5184 fi | 5185 fi |
5185 done | 5186 done |
5186 if test "$_bignum_bogus" = "yes" ; then | 5187 if test "$_bignum_bogus" = "yes" ; then |
5187 (echo "$progname: Usage error:" | 5188 (echo "$progname: Usage error:" |
5188 echo " " "The --with-bignum option must have one of these values: \`no',\`gmp',\`mp'." | 5189 echo " " "The --with-bignum option must have one of these values: \`no',\`gmp',\`mpir',\`mp'." |
5189 echo " Use \`$progname --help' to show usage.") >&2 && exit 1 | 5190 echo " Use \`$progname --help' to show usage.") >&2 && exit 1 |
5190 fi | 5191 fi |
5191 unset _bignum_bogus | 5192 unset _bignum_bogus |
5192 | 5193 |
5193 | 5194 |
20777 | 20778 |
20778 LIBS="-lgmp $LIBS" && if test "$verbose" = "yes"; then echo " Prepending \"-lgmp\" to \$LIBS"; fi | 20779 LIBS="-lgmp $LIBS" && if test "$verbose" = "yes"; then echo " Prepending \"-lgmp\" to \$LIBS"; fi |
20779 else | 20780 else |
20780 { echo "Error:" "Required GMP numeric support cannot be provided." >&2; exit 1; } | 20781 { echo "Error:" "Required GMP numeric support cannot be provided." >&2; exit 1; } |
20781 fi | 20782 fi |
20783 elif test "$with_bignum" = "mpir"; then | |
20784 ac_fn_c_check_header_mongrel "$LINENO" "mpir.h" "ac_cv_header_mpir_h" "$ac_includes_default" | |
20785 if test "x$ac_cv_header_mpir_h" = xyes; then : | |
20786 | |
20787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lmpir" >&5 | |
20788 $as_echo_n "checking for __gmpz_init in -lmpir... " >&6; } | |
20789 if ${ac_cv_lib_mpir___gmpz_init+:} false; then : | |
20790 $as_echo_n "(cached) " >&6 | |
20791 else | |
20792 ac_check_lib_save_LIBS=$LIBS | |
20793 LIBS="-lmpir $LIBS" | |
20794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
20795 /* end confdefs.h. */ | |
20796 | |
20797 /* Override any GCC internal prototype to avoid an error. | |
20798 Use char because int might match the return type of a GCC | |
20799 builtin and then its argument prototype would still apply. */ | |
20800 #ifdef __cplusplus | |
20801 extern "C" | |
20802 #endif | |
20803 char __gmpz_init (); | |
20804 int | |
20805 main () | |
20806 { | |
20807 return __gmpz_init (); | |
20808 ; | |
20809 return 0; | |
20810 } | |
20811 _ACEOF | |
20812 if ac_fn_c_try_link "$LINENO"; then : | |
20813 ac_cv_lib_mpir___gmpz_init=yes | |
20814 else | |
20815 ac_cv_lib_mpir___gmpz_init=no | |
20816 fi | |
20817 rm -f core conftest.err conftest.$ac_objext \ | |
20818 conftest$ac_exeext conftest.$ac_ext | |
20819 LIBS=$ac_check_lib_save_LIBS | |
20820 fi | |
20821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpir___gmpz_init" >&5 | |
20822 $as_echo "$ac_cv_lib_mpir___gmpz_init" >&6; } | |
20823 if test "x$ac_cv_lib_mpir___gmpz_init" = xyes; then : | |
20824 have_mpz_init=yes | |
20825 fi | |
20826 | |
20827 fi | |
20828 | |
20829 | |
20830 if test "$have_mpz_init" = "yes"; then | |
20831 $as_echo "#define WITH_NUMBER_TYPES 1" >>confdefs.h | |
20832 | |
20833 $as_echo "#define WITH_MPIR 1" >>confdefs.h | |
20834 | |
20835 LIBS="-lmpir $LIBS" && if test "$verbose" = "yes"; then echo " Prepending \"-lmpir\" to \$LIBS"; fi | |
20836 else | |
20837 { echo "Error:" "Required MPIR numeric support cannot be provided." >&2; exit 1; } | |
20838 fi | |
20782 elif test "$with_bignum" = "mp"; then | 20839 elif test "$with_bignum" = "mp"; then |
20783 for library in "" "-lcrypto"; do | 20840 for library in "" "-lcrypto"; do |
20784 ac_fn_c_check_header_mongrel "$LINENO" "mp.h" "ac_cv_header_mp_h" "$ac_includes_default" | 20841 ac_fn_c_check_header_mongrel "$LINENO" "mp.h" "ac_cv_header_mp_h" "$ac_includes_default" |
20785 if test "x$ac_cv_header_mp_h" = xyes; then : | 20842 if test "x$ac_cv_header_mp_h" = xyes; then : |
20786 | 20843 |
21726 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." | 21783 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." |
21727 test "$with_socks" = yes && echo " Compiling in support for SOCKS." | 21784 test "$with_socks" = yes && echo " Compiling in support for SOCKS." |
21728 test "$with_dnet" = yes && echo " Compiling in support for DNET." | 21785 test "$with_dnet" = yes && echo " Compiling in support for DNET." |
21729 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." | 21786 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules." |
21730 test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library." | 21787 test "$with_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library." |
21788 test "$with_bignum" = "mpir" && echo " Compiling in support for more number types using the MPIR library." | |
21731 test "$with_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library." | 21789 test "$with_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library." |
21732 if test "$with_union_type" = yes ; then | 21790 if test "$with_union_type" = yes ; then |
21733 echo " Using the union type for Lisp_Objects." | 21791 echo " Using the union type for Lisp_Objects." |
21734 echo " WARNING: ---------------------------------------------------------" | 21792 echo " WARNING: ---------------------------------------------------------" |
21735 echo " WARNING: This tends to trigger compiler bugs, especially when" | 21793 echo " WARNING: This tends to trigger compiler bugs, especially when" |