Changeset 78364c in git


Ignore:
Timestamp:
Jun 11, 1997, 9:58:10 AM (27 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
412b7cd9dea701ccb6e452448d4e87e4cecaf2b0
Parents:
2343621f398e488cc5c19b3ef2a2b67a1030013c
Message:
Wed Jun 11 09:56:05 1997  Olaf Bachmann
<obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>
	  * added support for smallgmp


git-svn-id: file:///usr/local/Singular/svn/trunk@380 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure

    r234362 r78364c  
    1717  --enable-PACKAGE        configure and build PACKAGE
    1818  --disable-PACKAGE       do not configure and build PACKAGE
    19   --with-PACKAGE          use PACKAGE, provide dependent functionality
    20   --without-PACKAGE       do not use PACKAGE, disable dependent functionality
    2119 where PACKAGE can be:
    22      gmp                  GNU multiple precision library"
     20     smallgmp             minimal version of gmp written in C only"
    2321ac_help="$ac_help
    2422\
     
    3230ac_help="$ac_help
    3331\
    34      Singular,            CAS for commutative algebra"
     32     Singular             CAS for commutative algebra"
     33ac_help="$ac_help
     34\
     35  --with-PACKAGE          use PACKAGE, provide dependent functionality
     36  --without-PACKAGE       do not use PACKAGE, disable dependent functionality
     37 where PACKAGE can be:
     38     MP                    Multi Protocol"
     39ac_help="$ac_help
     40\
     41     factory              polynomial factorization library"
     42ac_help="$ac_help
     43\
     44     libfac               char set and modp poly factorization library"
     45ac_help="$ac_help
     46\
     47  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
     48                          where PACKAGE can be gmp, smallgmp, or buildin"
    3549
    3650# Initialize some variables set by options.
     
    670684#endif
    671685EOF
    672 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     686if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    673687  ac_cv_prog_gcc=yes
    674688else
     
    722736  # not just through cpp.
    723737  cat > conftest.$ac_ext <<EOF
    724 #line 725 "configure"
     738#line 739 "configure"
    725739#include "confdefs.h"
    726740#include <assert.h>
     
    728742EOF
    729743ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    730 { (eval echo configure:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     744{ (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    731745ac_err=`grep -v '^ *+' conftest.out`
    732746if test -z "$ac_err"; then
     
    737751  CPP="${CC-cc} -E -traditional-cpp"
    738752  cat > conftest.$ac_ext <<EOF
    739 #line 740 "configure"
     753#line 754 "configure"
    740754#include "confdefs.h"
    741755#include <assert.h>
     
    743757EOF
    744758ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    745 { (eval echo configure:746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     759{ (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    746760ac_err=`grep -v '^ *+' conftest.out`
    747761if test -z "$ac_err"; then
     
    765779echo $ac_n "checking for AIX""... $ac_c" 1>&6
    766780cat > conftest.$ac_ext <<EOF
    767 #line 768 "configure"
     781#line 782 "configure"
    768782#include "confdefs.h"
    769783#ifdef _AIX
     
    820834else
    821835  cat > conftest.$ac_ext <<EOF
    822 #line 823 "configure"
     836#line 837 "configure"
    823837#include "confdefs.h"
    824838#ifdef _AIX
     
    854868LIBS="-lm  $LIBS"
    855869cat > conftest.$ac_ext <<EOF
    856 #line 857 "configure"
     870#line 871 "configure"
    857871#include "confdefs.h"
    858872/* Override any gcc2 internal prototype to avoid an error.  */
     
    864878; return 0; }
    865879EOF
    866 if { (eval echo configure:867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     880if { (eval echo configure:881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    867881  rm -rf conftest*
    868882  eval "ac_cv_lib_$ac_lib_var=yes"
     
    889903
    890904echo $ac_n "checking for -lgmp""... $ac_c" 1>&6
    891 ac_lib_var=`echo gmp_mpz_init | tr '.-/+' '___p'`
     905ac_lib_var=`echo gmp_mpq_init | tr '.-/+' '___p'`
    892906if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    893907  echo $ac_n "(cached) $ac_c" 1>&6
     
    896910LIBS="-lgmp  $LIBS"
    897911cat > conftest.$ac_ext <<EOF
    898 #line 899 "configure"
     912#line 913 "configure"
    899913#include "confdefs.h"
    900914/* Override any gcc2 internal prototype to avoid an error.  */
    901 char mpz_init();
     915char mpq_init();
    902916
    903917int main() { return 0; }
    904918int t() {
    905 mpz_init()
     919mpq_init()
    906920; return 0; }
    907921EOF
    908 if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     922if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    909923  rm -rf conftest*
    910924  eval "ac_cv_lib_$ac_lib_var=yes"
     
    930944fi
    931945
     946echo $ac_n "checking for -lsmallgmp""... $ac_c" 1>&6
     947ac_lib_var=`echo smallgmp_mpz_init | tr '.-/+' '___p'`
     948if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     949  echo $ac_n "(cached) $ac_c" 1>&6
     950else
     951  ac_save_LIBS="$LIBS"
     952LIBS="-lsmallgmp  $LIBS"
     953cat > conftest.$ac_ext <<EOF
     954#line 955 "configure"
     955#include "confdefs.h"
     956/* Override any gcc2 internal prototype to avoid an error.  */
     957char mpz_init();
     958
     959int main() { return 0; }
     960int t() {
     961mpz_init()
     962; return 0; }
     963EOF
     964if { (eval echo configure:965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     965  rm -rf conftest*
     966  eval "ac_cv_lib_$ac_lib_var=yes"
     967else
     968  rm -rf conftest*
     969  eval "ac_cv_lib_$ac_lib_var=no"
     970fi
     971rm -f conftest*
     972LIBS="$ac_save_LIBS"
     973
     974fi
     975if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     976  echo "$ac_t""yes" 1>&6
     977    ac_tr_lib=HAVE_LIB`echo smallgmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
     978  cat >> confdefs.h <<EOF
     979#define $ac_tr_lib 1
     980EOF
     981
     982  LIBS="-lsmallgmp $LIBS"
     983
     984else
     985  echo "$ac_t""no" 1>&6
     986fi
     987
    932988echo $ac_n "checking for -lMP""... $ac_c" 1>&6
    933989ac_lib_var=`echo MP_IMP_PutGmpInt | tr '.-/+' '___p'`
     
    938994LIBS="-lMP  $LIBS"
    939995cat > conftest.$ac_ext <<EOF
    940 #line 941 "configure"
     996#line 997 "configure"
    941997#include "confdefs.h"
    942998/* Override any gcc2 internal prototype to avoid an error.  */
     
    9481004; return 0; }
    9491005EOF
    950 if { (eval echo configure:951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1006if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    9511007  rm -rf conftest*
    9521008  eval "ac_cv_lib_$ac_lib_var=yes"
     
    9801036LIBS="-lMPT  $LIBS"
    9811037cat > conftest.$ac_ext <<EOF
    982 #line 983 "configure"
     1038#line 1039 "configure"
    9831039#include "confdefs.h"
    9841040/* Override any gcc2 internal prototype to avoid an error.  */
     
    9901046; return 0; }
    9911047EOF
    992 if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1048if { (eval echo configure:1049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    9931049  rm -rf conftest*
    9941050  eval "ac_cv_lib_$ac_lib_var=yes"
     
    10221078LIBS="-lsingcf  $LIBS"
    10231079cat > conftest.$ac_ext <<EOF
    1024 #line 1025 "configure"
     1080#line 1081 "configure"
    10251081#include "confdefs.h"
    10261082/* Override any gcc2 internal prototype to avoid an error.  */
     
    10321088; return 0; }
    10331089EOF
    1034 if { (eval echo configure:1035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1090if { (eval echo configure:1091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    10351091  rm -rf conftest*
    10361092  eval "ac_cv_lib_$ac_lib_var=yes"
     
    10641120LIBS="-lsingfac  $LIBS"
    10651121cat > conftest.$ac_ext <<EOF
    1066 #line 1067 "configure"
     1122#line 1123 "configure"
    10671123#include "confdefs.h"
    10681124/* Override any gcc2 internal prototype to avoid an error.  */
     
    10741130; return 0; }
    10751131EOF
    1076 if { (eval echo configure:1077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1132if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    10771133  rm -rf conftest*
    10781134  eval "ac_cv_lib_$ac_lib_var=yes"
     
    10991155
    11001156
    1101 for ac_hdr in gmp.h MP.h  MPT.h factory.h factor.h
     1157for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h
    11021158do
    11031159ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
     
    11071163else
    11081164  cat > conftest.$ac_ext <<EOF
    1109 #line 1110 "configure"
     1165#line 1166 "configure"
    11101166#include "confdefs.h"
    11111167#include <$ac_hdr>
    11121168EOF
    11131169ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1114 { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1170{ (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    11151171ac_err=`grep -v '^ *+' conftest.out`
    11161172if test -z "$ac_err"; then
     
    11371193
    11381194
    1139 if test "$ac_cv_lib_gmp_mpz_init" = yes && \
     1195if test "$ac_cv_lib_gmp_mpq_init" = yes && \
    11401196 test "$ac_cv_header_gmp_h" = yes; then
    11411197    ac_gmp_ok=yes
     1198fi
     1199
     1200if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
     1201 test "$ac_cv_header_smallgmp_h" = yes && \
     1202 test "$ac_cv_header_gmp_h" = yes; then
     1203    ac_smallgmp_ok=yes
    11421204fi
    11431205
     
    11611223
    11621224 
    1163 # Check whether --enable-gmp or --disable-gmp was given.
    1164 if test "${enable_gmp+set}" = set; then
    1165   enableval="$enable_gmp"
     1225# Check whether --enable-smallgmp or --disable-smallgmp was given.
     1226if test "${enable_smallgmp+set}" = set; then
     1227  enableval="$enable_smallgmp"
    11661228  :
    11671229fi
     
    11921254
    11931255
    1194 echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6
    1195 if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
    1196   if test "$with_gmp" != no && test "$ac_gmp_ok" != yes; then
    1197     enable_gmp=yes
     1256# Check whether --with-MP or --without-MP was given.
     1257if test "${with_MP+set}" = set; then
     1258  withval="$with_MP"
     1259  :
     1260fi
     1261
     1262# Check whether --with-factory or --without-factory was given.
     1263if test "${with_factory+set}" = set; then
     1264  withval="$with_factory"
     1265  :
     1266fi
     1267
     1268# Check whether --with-libfac or --without-libfac was given.
     1269if test "${with_libfac+set}" = set; then
     1270  withval="$with_libfac"
     1271  :
     1272fi
     1273
     1274# Check whether --with-gmp or --without-gmp was given.
     1275if test "${with_gmp+set}" = set; then
     1276  withval="$with_gmp"
     1277  :
     1278fi
     1279
     1280
     1281echo $ac_n "checking whether to configure and build smallgmp lib""... $ac_c" 1>&6
     1282if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then
     1283  if test "$ac_smallgmp_ok" != yes && \
     1284   test "$ac_gmp_ok" != yes && \
     1285   (test "$with_apint" = smallgmp || test "${with_apint+set}" != set); then
     1286    enable_smallgmp=yes
    11981287  else
    1199     enable_gmp=no
    1200   fi
    1201 fi
    1202 if test "$enable_gmp" = yes && test -d gmp; then
    1203   if test "$ac_cv_is_aix" = yes && test "$GCC" = yes; then
    1204     echo "$ac_t""no" 1>&6
    1205     echo "configure: warning: Building gmp v2 with gcc results in a gmp lib with bugs" 1>&2
    1206     echo "configure: warning: Install gmp v2 with another compiler first or use gmp v1.3" 1>&2
    1207     echo "configure: warning: For the time being gmp is neither configured/built nor used" 1>&2
    1208     enable_gmp=no
     1288    enable_smallgmp=no
     1289  fi
     1290fi
     1291if test "$enable_smallgmp" = yes && test -d smallgmp; then
     1292  echo "$ac_t""yes" 1>&6
     1293  CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp"
     1294  enable_smallgmp=yes
     1295  ac_will_have_gmp=yes
     1296else
     1297  echo "$ac_t""no" 1>&6
     1298  if test "$enable_smallgmp" = yes && test ! -d smallgmp; then
     1299    echo "configure: warning: Did not find smallgmp subdir" 1>&2
     1300  fi
     1301  enable_smallgmp=no
     1302fi
     1303if test "$ac_gmp_ok" != yes && \
     1304  test "$ac_smallgmp_ok" != yes && \
     1305  test "$enable_smallgmp" != yes; then
     1306    echo "configure: warning: Would rather have gmp or smallgmp to build libs and Singular" 1>&2
    12091307    ac_configure_args="$ac_configure_args --disable-gmp"
    1210   else
    1211     echo "$ac_t""yes" 1>&6
    1212     CONFIG_SUBDIRS="gmp"
    1213     ac_configure_args="$ac_configure_args --enable-gmp"
    1214   fi
    1215 else
    1216   echo "$ac_t""no" 1>&6
    1217   if  test "$enable_gmp" = yes && test ! -d gmp; then
    1218     echo "configure: warning: Did not find gmp subdirectory" 1>&2
    1219   fi
    1220   enable_gmp=no
    1221   ac_configure_args="$ac_configure_args --disable-gmp"
     1308else
     1309  ac_configure_args="$ac_configure_args --enable-gmp"
    12221310fi
    12231311
     
    12311319fi
    12321320if test "$enable_MP" = yes && test -d MP; then
    1233   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
     1321  if test "$ac_will_have_gmp" = yes || test "$ac_gmp_ok" = yes; then
    12341322    echo "$ac_t""yes" 1>&6
    12351323    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
     
    12371325  else
    12381326    echo "$ac_t""no" 1>&6
    1239     echo "configure: warning: Can not build MP for Singular without having gmp" 1>&2
    1240     enable_MP=no
     1327    echo "configure: warning: Can not build MP without having gmp" 1>&2
     1328    enabl_MP=no
    12411329    ac_configure_args="$ac_configure_args --disable-MP"
    12421330  fi
     
    12481336  enable_MP=no
    12491337  ac_configure_args="$ac_configure_args --disable-MP"
    1250 fi
    1251 
    1252 if test "$with_builtingmp" = yes; then
    1253   enable_gmp=yes
    1254   ac_configure_args="$ac_configure_args --enable-gmp"
    12551338fi
    12561339
     
    12641347fi
    12651348if test "$enable_factory" = yes && test -d factory; then
    1266   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
    1267   echo "$ac_t""yes" 1>&6
    1268   CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
    1269   ac_configure_args="$ac_configure_args --enable-factory"
     1349  if test "$ac_will_have_gmp" = yes  || test "$ac_gmp_ok" = yes; then
     1350    echo "$ac_t""yes" 1>&6
     1351    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
     1352    ac_configure_args="$ac_configure_args --enable-factory"
    12701353  else
    12711354    echo "$ac_t""no" 1>&6
     
    13331416
    13341417
    1335 echo $ac_n "checking whether to use with gmp""... $ac_c" 1>&6
    1336 if test "$with_gmp" != no && test "$with_gmp" != yes; then
    1337   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
    1338     with_gmp=yes
    1339   else
    1340     with_gmp=no
    1341   fi
    1342   ac_configure_args="$ac_configure_args --with-gmp=$with_gmp"
    1343 fi
    1344 if test "$with_gmp" = yes; then
    1345   echo "$ac_t""yes" 1>&6
    1346 else
    1347   echo "$ac_t""no" 1>&6
    1348 fi
     1418echo $ac_n "checking wich apint package to use""... $ac_c" 1>&6
     1419if test "$with_apint" != gmp && \
     1420  test "$with_apint" != smallgmp && \
     1421  test "$with_apint" != buildin; then
     1422   if test "$ac_gmp_ok" = yes; then
     1423     with_apint=gmp
     1424   elif test "$ac_enable_smallgmp" = yes; then
     1425     with_apint=smallgmp
     1426   else
     1427     with_apint=buildin
     1428   fi
     1429  ac_configure_args="$ac_configure_args --with-apint=$with_apint"
     1430fi
     1431echo "$ac_t""${with_apint}" 1>&6
    13491432
    13501433echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
     
    13631446fi
    13641447
     1448if test "$enable_MP" = yes; then
     1449  if test "${with_apint}" = smallgmp; then
     1450    ac_configure_args="$ac_configure_args --with-default_apreal=none"
     1451  elif test "${with_apint}" = buildin; then
     1452    ac_configure_args="$ac_configure_args --with-default_apreal=none --with-default-apint=none"
     1453  fi
     1454fi
     1455
    13651456echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
    13661457if test "$with_factory" != no && test "$with_factory" != yes; then
     
    14091500fi
    14101501
    1411 if test -d gmp; then
    1412   SUBDIRS="gmp"
     1502if test -d smallgmp; then
     1503  SUBDIRS="smallgmp"
    14131504fi
    14141505if test -d MP; then
  • configure.in

    r234362 r78364c  
    6262dnl
    6363AC_CHECK_LIB(m, atof)
    64 AC_CHECK_LIB(gmp, mpz_init)
     64AC_CHECK_LIB(gmp, mpq_init)
     65AC_CHECK_LIB(smallgmp, mpz_init)
    6566AC_CHECK_LIB(MP, IMP_PutGmpInt)
    6667AC_CHECK_LIB(MPT, MPT_GetTree)
     
    6869AC_CHECK_LIB(singfac, atof)
    6970
    70 AC_CHECK_HEADERS(gmp.h MP.h  MPT.h factory.h factor.h)
    71 
    72 if test "$ac_cv_lib_gmp_mpz_init" = yes && \
     71AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h)
     72
     73if test "$ac_cv_lib_gmp_mpq_init" = yes && \
    7374 test "$ac_cv_header_gmp_h" = yes; then
    7475    ac_gmp_ok=yes
     76fi
     77
     78if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
     79 test "$ac_cv_header_smallgmp_h" = yes && \
     80 test "$ac_cv_header_gmp_h" = yes; then
     81    ac_smallgmp_ok=yes
    7582fi
    7683
     
    97104dnl Check whether or not to built various packages
    98105dnl
    99 AC_ARG_ENABLE(gmp, \
     106AC_ARG_ENABLE(smallgmp, \
    100107 [ --enable-PACKAGE        configure and build PACKAGE
    101108  --disable-PACKAGE       do not configure and build PACKAGE
    102   --with-PACKAGE          use PACKAGE, provide dependent functionality
    103   --without-PACKAGE       do not use PACKAGE, disable dependent functionality
    104109 where PACKAGE can be:
    105      gmp                  GNU multiple precision library])
     110     smallgmp             minimal version of gmp written in C only])
    106111AC_ARG_ENABLE(MP, \
    107112 [    MP                   Multi Protocol library])
     
    111116 [    libfac               char set and modp poly factorization library])
    112117AC_ARG_ENABLE(Singular, \
    113  [    Singular,            CAS for commutative algebra])
    114 
    115 AC_MSG_CHECKING(whether to configure and build gmp lib)
    116 if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
    117   if test "$with_gmp" != no && test "$ac_gmp_ok" != yes; then
    118     enable_gmp=yes
    119   else
    120     enable_gmp=no
    121   fi
    122 fi
    123 if test "$enable_gmp" = yes && test -d gmp; then
    124   if test "$ac_cv_is_aix" = yes && test "$GCC" = yes; then
    125     AC_MSG_RESULT(no)
    126     AC_MSG_WARN(Building gmp v2 with gcc results in a gmp lib with bugs)
    127     AC_MSG_WARN(Install gmp v2 with another compiler first or use gmp v1.3)
    128     AC_MSG_WARN(For the time being gmp is neither configured/built nor used)
    129     enable_gmp=no
     118 [    Singular             CAS for commutative algebra])
     119
     120AC_ARG_WITH(MP,\
     121 [ --with-PACKAGE          use PACKAGE, provide dependent functionality
     122  --without-PACKAGE       do not use PACKAGE, disable dependent functionality
     123 where PACKAGE can be:
     124     MP                    Multi Protocol])
     125AC_ARG_WITH(factory, \
     126 [    factory              polynomial factorization library])
     127AC_ARG_WITH(libfac, \
     128 [    libfac               char set and modp poly factorization library])
     129AC_ARG_WITH(gmp, \
     130 [ --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
     131                          where PACKAGE can be gmp, smallgmp, or buildin])
     132
     133AC_MSG_CHECKING(whether to configure and build smallgmp lib)
     134if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then
     135  if test "$ac_smallgmp_ok" != yes && \
     136   test "$ac_gmp_ok" != yes && \
     137   (test "$with_apint" = smallgmp || test "${with_apint+set}" != set); then
     138    enable_smallgmp=yes
     139  else
     140    enable_smallgmp=no
     141  fi
     142fi
     143if test "$enable_smallgmp" = yes && test -d smallgmp; then
     144  AC_MSG_RESULT(yes)
     145  CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp"
     146  enable_smallgmp=yes
     147  ac_will_have_gmp=yes
     148else
     149  AC_MSG_RESULT(no)
     150  if test "$enable_smallgmp" = yes && test ! -d smallgmp; then
     151    AC_MSG_WARN(Did not find smallgmp subdir)
     152  fi
     153  enable_smallgmp=no
     154fi
     155if test "$ac_gmp_ok" != yes && \
     156  test "$ac_smallgmp_ok" != yes && \
     157  test "$enable_smallgmp" != yes; then
     158    AC_MSG_WARN(Would rather have gmp or smallgmp to build libs and Singular)
    130159    ac_configure_args="$ac_configure_args --disable-gmp"
    131   else
    132     AC_MSG_RESULT(yes)
    133     CONFIG_SUBDIRS="gmp"
    134     ac_configure_args="$ac_configure_args --enable-gmp"
    135   fi
    136 else
    137   AC_MSG_RESULT(no)
    138   if  test "$enable_gmp" = yes && test ! -d gmp; then
    139     AC_MSG_WARN(Did not find gmp subdirectory)
    140   fi
    141   enable_gmp=no
    142   ac_configure_args="$ac_configure_args --disable-gmp"
     160else
     161  ac_configure_args="$ac_configure_args --enable-gmp"
    143162fi
    144163
     
    152171fi
    153172if test "$enable_MP" = yes && test -d MP; then
    154   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
     173  if test "$ac_will_have_gmp" = yes || test "$ac_gmp_ok" = yes; then
    155174    AC_MSG_RESULT(yes)
    156175    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
     
    158177  else
    159178    AC_MSG_RESULT(no)
    160     AC_MSG_WARN(Can not build MP for Singular without having gmp)
    161     enable_MP=no
     179    AC_MSG_WARN(Can not build MP without having gmp)
     180    enabl_MP=no
    162181    ac_configure_args="$ac_configure_args --disable-MP"
    163182  fi
     
    169188  enable_MP=no
    170189  ac_configure_args="$ac_configure_args --disable-MP"
    171 fi
    172 
    173 if test "$with_builtingmp" = yes; then
    174   enable_gmp=yes
    175   ac_configure_args="$ac_configure_args --enable-gmp"
    176190fi
    177191
     
    185199fi
    186200if test "$enable_factory" = yes && test -d factory; then
    187   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
    188   AC_MSG_RESULT(yes)
    189   CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
    190   ac_configure_args="$ac_configure_args --enable-factory"
     201  if test "$ac_will_have_gmp" = yes  || test "$ac_gmp_ok" = yes; then
     202    AC_MSG_RESULT(yes)
     203    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
     204    ac_configure_args="$ac_configure_args --enable-factory"
    191205  else
    192206    AC_MSG_RESULT(no)
     
    257271dnl Check whether or not to use various packages
    258272dnl
    259 AC_MSG_CHECKING(whether to use with gmp)
    260 if test "$with_gmp" != no && test "$with_gmp" != yes; then
    261   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
    262     with_gmp=yes
    263   else
    264     with_gmp=no
    265   fi
    266   ac_configure_args="$ac_configure_args --with-gmp=$with_gmp"
    267 fi
    268 if test "$with_gmp" = yes; then
    269   AC_MSG_RESULT(yes)
    270 else
    271   AC_MSG_RESULT(no)
    272 fi
     273AC_MSG_CHECKING(wich apint package to use)
     274if test "$with_apint" != gmp && \
     275  test "$with_apint" != smallgmp && \
     276  test "$with_apint" != buildin; then
     277   if test "$ac_gmp_ok" = yes; then
     278     with_apint=gmp
     279   elif test "$ac_enable_smallgmp" = yes; then
     280     with_apint=smallgmp
     281   else
     282     with_apint=buildin
     283   fi
     284  ac_configure_args="$ac_configure_args --with-apint=$with_apint"
     285fi
     286AC_MSG_RESULT(${with_apint})
    273287
    274288AC_MSG_CHECKING(whether to use with MP)
     
    287301fi
    288302
     303if test "$enable_MP" = yes; then
     304  if test "${with_apint}" = smallgmp; then
     305    ac_configure_args="$ac_configure_args --with-default_apreal=none"
     306  elif test "${with_apint}" = buildin; then
     307    ac_configure_args="$ac_configure_args --with-default_apreal=none --with-default-apint=none"
     308  fi
     309fi
     310
    289311AC_MSG_CHECKING(whether to use with factory)
    290312if test "$with_factory" != no && test "$with_factory" != yes; then
     
    336358dnl Check for known subdirs
    337359dnl
    338 if test -d gmp; then
    339   SUBDIRS="gmp"
     360if test -d smallgmp; then
     361  SUBDIRS="smallgmp"
    340362fi
    341363if test -d MP; then
Note: See TracChangeset for help on using the changeset viewer.