Changeset bde08b in git


Ignore:
Timestamp:
Jun 11, 1997, 10:00:16 AM (27 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '45e267b9942dec9429fe249ce3e5e44ab80a6a3a')
Children:
9f226dc6cd66551d41131d682fa503350b14835f
Parents:
412b7cd9dea701ccb6e452448d4e87e4cecaf2b0
Message:
Wed Jun 11 09:56:05 1997  Olaf Bachmann
<obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>

	* longrat.[cc,h], tesths.cc, Makefile.in, configure.in:
	  added support for smallgmp

Tue Jun 10 17:25:28 1997  Olaf Bachmann
<obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>

	* sing_mp.cc: Got rid off warnings, when incomplete link specs


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

Legend:

Unmodified
Added
Removed
  • Singular/ChangeLog

    r412b7cd rbde08b  
     1Wed Jun 11 09:56:05 1997  Olaf Bachmann  <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>
     2
     3        * longrat.[cc,h], tesths.cc, Makefile.in, configure.in:
     4          added support for smallgmp
     5
     6Tue Jun 10 17:25:28 1997  Olaf Bachmann  <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>
     7
     8        * sing_mp.cc: Got rid off warnings, when incomplete link specs
     9
    110Thu Jun  5 15:16:19 1997  Olaf Bachmann  <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>
    211
  • Singular/Makefile.in

    r412b7cd rbde08b  
    248248        -rm -rf depend *.inc ${DIST_NAME} ${testdir}/out stamp-h
    249249        -rm mod2.h Makefile TAGS* config.status config.cache config.log
    250         cd ${docdir}; ${MAKE} clean
     250        cd ${docdir}; ${MAKE} distclean
    251251
    252252maintainer-clean: distclean
  • Singular/configure

    r412b7cd rbde08b  
    1515ac_help="$ac_help
    1616  --without-readline   do not use readline for fancy display"
    17 ac_help="$ac_help
    18   --without-gmp        do not use gmp library"
    1917ac_help="$ac_help
    2018  --without-MP         do not use MP (disables MP links)"
     
    2927ac_help="$ac_help
    3028  --without-libfac     do not use libfac (disables primary decompositions)"
     29ac_help="$ac_help
     30\
     31  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
     32                          where PACKAGE can be gmp, smallgmp, or buildin"
    3133
    3234# Initialize some variables set by options.
     
    684686#endif
    685687EOF
    686 if { 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
     688if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    687689  ac_cv_prog_gcc=yes
    688690else
     
    736738  # not just through cpp.
    737739  cat > conftest.$ac_ext <<EOF
    738 #line 739 "configure"
     740#line 741 "configure"
    739741#include "confdefs.h"
    740742#include <assert.h>
     
    742744EOF
    743745ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    744 { (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     746{ (eval echo configure:747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    745747ac_err=`grep -v '^ *+' conftest.out`
    746748if test -z "$ac_err"; then
     
    751753  CPP="${CC-cc} -E -traditional-cpp"
    752754  cat > conftest.$ac_ext <<EOF
    753 #line 754 "configure"
     755#line 756 "configure"
    754756#include "confdefs.h"
    755757#include <assert.h>
     
    757759EOF
    758760ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    759 { (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     761{ (eval echo configure:762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    760762ac_err=`grep -v '^ *+' conftest.out`
    761763if test -z "$ac_err"; then
     
    820822#endif
    821823EOF
    822 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     824if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    823825  ac_cv_prog_gxx=yes
    824826else
     
    956958
    957959
     960# Check whether --with-MP or --without-MP was given.
     961if test "${with_MP+set}" = set; then
     962  withval="$with_MP"
     963  :
     964fi
     965
     966
     967# Check whether --with-dbm or --without-dbm was given.
     968if test "${with_dbm+set}" = set; then
     969  withval="$with_dbm"
     970  :
     971fi
     972
     973# Check whether --with-info or --without-info was given.
     974if test "${with_info+set}" = set; then
     975  withval="$with_info"
     976  :
     977fi
     978
     979# Check whether --with-dld or --without-dld was given.
     980if test "${with_dld+set}" = set; then
     981  withval="$with_dld"
     982  :
     983fi
     984
     985
     986# Check whether --with-factory or --without-factory was given.
     987if test "${with_factory+set}" = set; then
     988  withval="$with_factory"
     989  :
     990fi
     991
     992
     993# Check whether --with-libfac or --without-libfac was given.
     994if test "${with_libfac+set}" = set; then
     995  withval="$with_libfac"
     996  :
     997fi
     998
    958999# Check whether --with-gmp or --without-gmp was given.
    9591000if test "${with_gmp+set}" = set; then
     
    9611002  :
    9621003fi
    963 
    964    
    965 # Check whether --with-MP or --without-MP was given.
    966 if test "${with_MP+set}" = set; then
    967   withval="$with_MP"
    968   :
    969 fi
    970 
    971 
    972 # Check whether --with-dbm or --without-dbm was given.
    973 if test "${with_dbm+set}" = set; then
    974   withval="$with_dbm"
    975   :
    976 fi
    977 
    978 # Check whether --with-info or --without-info was given.
    979 if test "${with_info+set}" = set; then
    980   withval="$with_info"
    981   :
    982 fi
    983 
    984 # Check whether --with-dld or --without-dld was given.
    985 if test "${with_dld+set}" = set; then
    986   withval="$with_dld"
    987   :
    988 fi
    989 
    990 
    991 # Check whether --with-factory or --without-factory was given.
    992 if test "${with_factory+set}" = set; then
    993   withval="$with_factory"
    994   :
    995 fi
    996 
    997 
    998 # Check whether --with-libfac or --without-libfac was given.
    999 if test "${with_libfac+set}" = set; then
    1000   withval="$with_libfac"
    1001   :
    1002 fi
    1003 
    10041004
    10051005
     
    15281528NEED_LIBS=$LIBS
    15291529
    1530 if test "$with_builtingmp" = yes; then
    1531   cat >> confdefs.h <<\EOF
    1532 #define HAVE_BUILTIN_GMP 1
    1533 EOF
    1534 
    1535   cat >> confdefs.h <<\EOF
    1536 #define HAVE_GMP 1
    1537 EOF
    1538 
    1539   ac_gmp_ok=yes
    1540 elif test "$with_gmp" != no; then
    1541   echo $ac_n "checking for -lgmp""... $ac_c" 1>&6
    1542 ac_lib_var=`echo gmp_mpz_init | tr '.-/+' '___p'`
     1530echo $ac_n "checking for -lgmp""... $ac_c" 1>&6
     1531ac_lib_var=`echo gmp_mpq_init | tr '.-/+' '___p'`
    15431532if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    15441533  echo $ac_n "(cached) $ac_c" 1>&6
     
    15471536LIBS="-lgmp  $LIBS"
    15481537cat > conftest.$ac_ext <<EOF
    1549 #line 1550 "configure"
     1538#line 1539 "configure"
    15501539#include "confdefs.h"
    15511540/* Override any gcc2 internal prototype to avoid an error.  */
    1552 char mpz_init();
     1541char mpq_init();
    15531542
    15541543int main() { return 0; }
    15551544int t() {
    1556 mpz_init()
     1545mpq_init()
    15571546; return 0; }
    15581547EOF
    1559 if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1548if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    15601549  rm -rf conftest*
    15611550  eval "ac_cv_lib_$ac_lib_var=yes"
     
    15811570fi
    15821571
    1583   ac_safe=`echo "gmp.h" | tr './\055' '___'`
    1584 echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
    1585 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    1586   echo $ac_n "(cached) $ac_c" 1>&6
    1587 else
    1588   cat > conftest.$ac_ext <<EOF
    1589 #line 1590 "configure"
    1590 #include "confdefs.h"
    1591 #include <gmp.h>
    1592 EOF
    1593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1594 { (eval echo configure:1595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    1595 ac_err=`grep -v '^ *+' conftest.out`
    1596 if test -z "$ac_err"; then
    1597   rm -rf conftest*
    1598   eval "ac_cv_header_$ac_safe=yes"
    1599 else
    1600   echo "$ac_err" >&5
    1601   rm -rf conftest*
    1602   eval "ac_cv_header_$ac_safe=no"
    1603 fi
    1604 rm -f conftest*
    1605 fi
    1606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
     1572echo $ac_n "checking for -lsmallgmp""... $ac_c" 1>&6
     1573ac_lib_var=`echo smallgmp_mpz_init | tr '.-/+' '___p'`
     1574if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     1575  echo $ac_n "(cached) $ac_c" 1>&6
     1576else
     1577  ac_save_LIBS="$LIBS"
     1578LIBS="-lsmallgmp  $LIBS"
     1579cat > conftest.$ac_ext <<EOF
     1580#line 1581 "configure"
     1581#include "confdefs.h"
     1582/* Override any gcc2 internal prototype to avoid an error.  */
     1583char mpz_init();
     1584
     1585int main() { return 0; }
     1586int t() {
     1587mpz_init()
     1588; return 0; }
     1589EOF
     1590if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1591  rm -rf conftest*
     1592  eval "ac_cv_lib_$ac_lib_var=yes"
     1593else
     1594  rm -rf conftest*
     1595  eval "ac_cv_lib_$ac_lib_var=no"
     1596fi
     1597rm -f conftest*
     1598LIBS="$ac_save_LIBS"
     1599
     1600fi
     1601if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    16071602  echo "$ac_t""yes" 1>&6
    1608   :
    1609 else
    1610   echo "$ac_t""no" 1>&6
    1611 fi
    1612 
    1613   if test "$ac_cv_lib_gmp_mpz_init" = yes && \
    1614    test "$ac_cv_header_gmp_h" = yes; then
    1615     cat >> confdefs.h <<\EOF
    1616 #define HAVE_GMP 1
    1617 EOF
    1618 
    1619     NEED_LIBS="-lgmp ${NEED_LIBS}"
    1620     ac_gmp_ok=yes
    1621   elif test "$enable_gmp" = yes; then
    1622     cat >> confdefs.h <<\EOF
    1623 #define HAVE_GMP 1
    1624 EOF
    1625 
    1626     NEED_LIBS="-lgmp ${NEED_LIBS}"
    1627     ac_gmp_ok=yes
    1628     echo "configure: warning: install gmp before making Singular or configure --without-gmp" 1>&2
    1629   else
    1630     echo "configure: warning: building without gmp: using build-in rational arithmetic" 1>&2
    1631   fi
    1632 fi
    1633 
    1634 WITH_MP=no
    1635 if test "$with_MP" != no; then
    1636   if test "$ac_gmp_ok" != yes; then
    1637     echo "configure: warning: building without MP: can not use MP without gmp" 1>&2
    1638   else
    1639     if test "$ac_cv_lib_gmp_mpz_init"=yes; then
    1640       echo $ac_n "checking for -lMP""... $ac_c" 1>&6
     1603    ac_tr_lib=HAVE_LIB`echo smallgmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
     1604  cat >> confdefs.h <<EOF
     1605#define $ac_tr_lib 1
     1606EOF
     1607
     1608  LIBS="-lsmallgmp $LIBS"
     1609
     1610else
     1611  echo "$ac_t""no" 1>&6
     1612fi
     1613
     1614echo $ac_n "checking for -lMP""... $ac_c" 1>&6
    16411615ac_lib_var=`echo MP_IMP_PutGmpInt | tr '.-/+' '___p'`
    16421616if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16461620LIBS="-lMP  $LIBS"
    16471621cat > conftest.$ac_ext <<EOF
    1648 #line 1649 "configure"
     1622#line 1623 "configure"
    16491623#include "confdefs.h"
    16501624/* Override any gcc2 internal prototype to avoid an error.  */
     
    16561630; return 0; }
    16571631EOF
    1658 if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1632if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    16591633  rm -rf conftest*
    16601634  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16801654fi
    16811655
    1682       echo $ac_n "checking for -lMPT""... $ac_c" 1>&6
     1656echo $ac_n "checking for -lMPT""... $ac_c" 1>&6
    16831657ac_lib_var=`echo MPT_MPT_GetTree | tr '.-/+' '___p'`
    16841658if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16881662LIBS="-lMPT  $LIBS"
    16891663cat > conftest.$ac_ext <<EOF
    1690 #line 1691 "configure"
     1664#line 1665 "configure"
    16911665#include "confdefs.h"
    16921666/* Override any gcc2 internal prototype to avoid an error.  */
     
    16981672; return 0; }
    16991673EOF
    1700 if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1674if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    17011675  rm -rf conftest*
    17021676  eval "ac_cv_lib_$ac_lib_var=yes"
     
    17221696fi
    17231697
    1724     fi
    1725     for ac_hdr in MP.h MPT.h
     1698echo $ac_n "checking for -lsingcf""... $ac_c" 1>&6
     1699ac_lib_var=`echo singcf_atof | tr '.-/+' '___p'`
     1700if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     1701  echo $ac_n "(cached) $ac_c" 1>&6
     1702else
     1703  ac_save_LIBS="$LIBS"
     1704LIBS="-lsingcf  $LIBS"
     1705cat > conftest.$ac_ext <<EOF
     1706#line 1707 "configure"
     1707#include "confdefs.h"
     1708/* Override any gcc2 internal prototype to avoid an error.  */
     1709char atof();
     1710
     1711int main() { return 0; }
     1712int t() {
     1713atof()
     1714; return 0; }
     1715EOF
     1716if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1717  rm -rf conftest*
     1718  eval "ac_cv_lib_$ac_lib_var=yes"
     1719else
     1720  rm -rf conftest*
     1721  eval "ac_cv_lib_$ac_lib_var=no"
     1722fi
     1723rm -f conftest*
     1724LIBS="$ac_save_LIBS"
     1725
     1726fi
     1727if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     1728  echo "$ac_t""yes" 1>&6
     1729    ac_tr_lib=HAVE_LIB`echo singcf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
     1730  cat >> confdefs.h <<EOF
     1731#define $ac_tr_lib 1
     1732EOF
     1733
     1734  LIBS="-lsingcf $LIBS"
     1735
     1736else
     1737  echo "$ac_t""no" 1>&6
     1738fi
     1739
     1740echo $ac_n "checking for -lsingfac""... $ac_c" 1>&6
     1741ac_lib_var=`echo singfac_atof | tr '.-/+' '___p'`
     1742if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     1743  echo $ac_n "(cached) $ac_c" 1>&6
     1744else
     1745  ac_save_LIBS="$LIBS"
     1746LIBS="-lsingfac  $LIBS"
     1747cat > conftest.$ac_ext <<EOF
     1748#line 1749 "configure"
     1749#include "confdefs.h"
     1750/* Override any gcc2 internal prototype to avoid an error.  */
     1751char atof();
     1752
     1753int main() { return 0; }
     1754int t() {
     1755atof()
     1756; return 0; }
     1757EOF
     1758if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1759  rm -rf conftest*
     1760  eval "ac_cv_lib_$ac_lib_var=yes"
     1761else
     1762  rm -rf conftest*
     1763  eval "ac_cv_lib_$ac_lib_var=no"
     1764fi
     1765rm -f conftest*
     1766LIBS="$ac_save_LIBS"
     1767
     1768fi
     1769if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     1770  echo "$ac_t""yes" 1>&6
     1771    ac_tr_lib=HAVE_LIB`echo singfac | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
     1772  cat >> confdefs.h <<EOF
     1773#define $ac_tr_lib 1
     1774EOF
     1775
     1776  LIBS="-lsingfac $LIBS"
     1777
     1778else
     1779  echo "$ac_t""no" 1>&6
     1780fi
     1781
     1782
     1783for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h
    17261784do
    17271785ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
     
    17311789else
    17321790  cat > conftest.$ac_ext <<EOF
    1733 #line 1734 "configure"
     1791#line 1792 "configure"
    17341792#include "confdefs.h"
    17351793#include <$ac_hdr>
    17361794EOF
    17371795ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1738 { (eval echo configure:1739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1796{ (eval echo configure:1797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    17391797ac_err=`grep -v '^ *+' conftest.out`
    17401798if test -z "$ac_err"; then
     
    17601818done
    17611819
    1762     if test "$ac_cv_lib_MPT_MPT_GetTree" = yes && \
    1763      test "$ac_cv_header_MP_h" = yes && \
    1764      test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
    1765      test "$ac_cv_header_MPT_h" = yes; then
    1766       cat >> confdefs.h <<\EOF
    1767 #define HAVE_MPSR 1
    1768 EOF
    1769 
    1770       NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     1820
     1821if test "$ac_cv_lib_gmp_mpq_init" = yes && \
     1822 test "$ac_cv_header_gmp_h" = yes; then
     1823    ac_gmp_ok=yes
     1824fi
     1825
     1826if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
     1827 test "$ac_cv_header_smallgmp_h" = yes && \
     1828 test "$ac_cv_header_gmp_h" = yes; then
     1829    ac_smallgmp_ok=yes
     1830fi
     1831
     1832if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
     1833 test "$ac_cv_lib_MPT_MPT_GetTree" && \
     1834 test "$ac_cv_header_MP_h" = yes && \
     1835 test "$ac_cv_header_MPT_h" = yes; then
     1836  ac_MP_ok=yes
     1837fi
     1838
     1839if test "$ac_cv_lib_singcf_atof" = yes && \
     1840 test "$ac_cv_header_factory_h" = yes; then
     1841  ac_factory_ok=yes
     1842fi
     1843
     1844if test "$ac_cv_lib_singfac_atof" = yes && \
     1845 test "$ac_cv_header_factor_h" = yes; then
     1846  ac_libfac_ok=yes
     1847fi
     1848
     1849if test "$with_apint" != buildin; then
     1850  if test "$with_apint" = gmp; then
     1851    if test "$ac_gmp_ok" = yes; then
     1852      ac_will_have_gmp=yes
     1853    elif test "$eanble_gmp" = yes; then
     1854      ac_will_have_gmp=yes
     1855      echo "configure: warning: install gmp before making Singular" 1>&2
     1856    else
     1857      { echo "configure: error: Can not use with gmp: lib/header not found" 1>&2; exit 1; }
     1858    fi
     1859  elif test "$with_apint" = smallgmp; then
     1860    if test "$ac_smallgmp_ok" = yes; then
     1861      ac_will_have_gmp=yes
     1862      ac_will have_smallgmp=yes
     1863    elif test "$enable_gmp" = yes; then
     1864      ac_will_have_gmp=yes
     1865      ac_will_have_smallgmp=yes
     1866      echo "configure: warning: install smallgmp before making Singular" 1>&2
     1867    else
     1868      { echo "configure: error: Can not use with smallgmp: lib/header not found" 1>&2; exit 1; }
     1869    fi
     1870  elif test "$ac_gmp_ok" = yes; then
     1871    ac_will_have_gmp=yes
     1872  elif test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then
     1873    ac_will_have_gmp=yes
     1874    ac_will_have_smallgmp=yes
     1875  elif test "$enable_gmp" = yes; then
     1876    ac_will_have_gmp=yes
     1877  fi
     1878fi
     1879echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
     1880if test "$ac_will_have_gmp" = yes; then
     1881  cat >> confdefs.h <<\EOF
     1882#define HAVE_GMP 1
     1883EOF
     1884
     1885  if test "$ac_will_have_smallgmp" = yes; then
     1886    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
     1887    echo "$ac_t""smallgmp" 1>&6
     1888    cat >> confdefs.h <<\EOF
     1889#define HAVE_SMALLGMP 1
     1890EOF
     1891
     1892  else
     1893    NEED_LIBS="-lgmp ${NEED_LIBS}"
     1894    echo "$ac_t""gmp" 1>&6
     1895  fi
     1896else
     1897  echo "$ac_t""buildin" 1>&6
     1898fi
     1899
     1900WITH_MP=no
     1901if test "$with_MP" != no; then
     1902  if test "$ac_will_have_gmp" != yes; then
     1903    echo "configure: warning: Need gmp to build with MP" 1>&2
     1904  else
     1905    if test "$ac_MP_ok" = yes; then
    17711906      WITH_MP=yes
    17721907    elif test "$enable_MP" = yes; then
    1773       cat >> confdefs.h <<\EOF
    1774 #define HAVE_MPSR 1
    1775 EOF
    1776 
    1777       NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
    17781908      WITH_MP=yes
    1779       echo "configure: warning: install MP before making Singular or configure --without-MP" 1>&2
     1909      echo "configure: warning: Install MP before making Singular" 1>&2
    17801910    else
    1781       echo "configure: warning: building without MP: disabling MP links" 1>&2
     1911      echo "configure: warning: Need MP library to build with MP" 1>&2
    17821912    fi
    17831913  fi
    17841914fi
    1785 
     1915echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
     1916
     1917if test "$WITH_MP" = yes; then
     1918  cat >> confdefs.h <<\EOF
     1919#define HAVE_MPSR 1
     1920EOF
     1921
     1922  NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     1923  echo "$ac_t""yes" 1>&6
     1924else
     1925  echo "$ac_t""no" 1>&6
     1926fi
    17861927
    17871928WITH_FACTORY=no
    17881929if test "$with_factory" != no; then
    1789   if test "$ac_gmp_ok" != yes; then
    1790     echo "configure: warning: building without factory: can not use factory without gmp" 1>&2
     1930  if test "$ac_will_have_gmp" != yes; then
     1931    echo "configure: warning: Need gmp to build with factory" 1>&2
    17911932  else
    1792     if test "$ac_cv_lib_gmp_mpz_init"=yes;then
    1793       echo $ac_n "checking for -lsingcf""... $ac_c" 1>&6
    1794 ac_lib_var=`echo singcf_atof | tr '.-/+' '___p'`
    1795 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    1796   echo $ac_n "(cached) $ac_c" 1>&6
    1797 else
    1798   ac_save_LIBS="$LIBS"
    1799 LIBS="-lsingcf  $LIBS"
    1800 cat > conftest.$ac_ext <<EOF
    1801 #line 1802 "configure"
    1802 #include "confdefs.h"
    1803 /* Override any gcc2 internal prototype to avoid an error.  */
    1804 char atof();
    1805 
    1806 int main() { return 0; }
    1807 int t() {
    1808 atof()
    1809 ; return 0; }
    1810 EOF
    1811 if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    1812   rm -rf conftest*
    1813   eval "ac_cv_lib_$ac_lib_var=yes"
    1814 else
    1815   rm -rf conftest*
    1816   eval "ac_cv_lib_$ac_lib_var=no"
    1817 fi
    1818 rm -f conftest*
    1819 LIBS="$ac_save_LIBS"
    1820 
    1821 fi
    1822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    1823   echo "$ac_t""yes" 1>&6
    1824     ac_tr_lib=HAVE_LIB`echo singcf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    1825   cat >> confdefs.h <<EOF
    1826 #define $ac_tr_lib 1
    1827 EOF
    1828 
    1829   LIBS="-lsingcf $LIBS"
    1830 
    1831 else
    1832   echo "$ac_t""no" 1>&6
    1833 fi
    1834 
    1835     fi
    1836     for ac_hdr in factory.h
    1837 do
    1838 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
    1839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1840 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    1841   echo $ac_n "(cached) $ac_c" 1>&6
    1842 else
    1843   cat > conftest.$ac_ext <<EOF
    1844 #line 1845 "configure"
    1845 #include "confdefs.h"
    1846 #include <$ac_hdr>
    1847 EOF
    1848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1849 { (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    1850 ac_err=`grep -v '^ *+' conftest.out`
    1851 if test -z "$ac_err"; then
    1852   rm -rf conftest*
    1853   eval "ac_cv_header_$ac_safe=yes"
    1854 else
    1855   echo "$ac_err" >&5
    1856   rm -rf conftest*
    1857   eval "ac_cv_header_$ac_safe=no"
    1858 fi
    1859 rm -f conftest*
    1860 fi
    1861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    1862   echo "$ac_t""yes" 1>&6
    1863     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
    1864   cat >> confdefs.h <<EOF
    1865 #define $ac_tr_hdr 1
    1866 EOF
    1867  
    1868 else
    1869   echo "$ac_t""no" 1>&6
    1870 fi
    1871 done
    1872 
    1873     if test "$ac_cv_lib_singcf_atof" = yes && \
    1874      test "$ac_cv_header_factory_h" = yes; then
    1875       cat >> confdefs.h <<\EOF
    1876 #define HAVE_FACTORY 1
    1877 EOF
    1878 
    1879       NEED_LIBS="-lsingcf ${NEED_LIBS}"
     1933    if test "$ac_factory_ok" = yes; then
    18801934      WITH_FACTORY=yes
    18811935    elif test "$enable_factory" = yes; then
    1882       NEED_LIBS="-lsingcf ${NEED_LIBS}"
    1883       cat >> confdefs.h <<\EOF
    1884 #define HAVE_FACTORY 1
    1885 EOF
    1886 
    18871936      WITH_FACTORY=yes
    1888       echo "configure: warning: install factory before making Singular or configure --without-factory" 1>&2
     1937      echo "configure: warning: Install factory before making Singular" 1>&2
    18891938    else
    1890       echo "configure: warning: building without factory: disabling poly factorization" 1>&2
     1939      echo "configure: warning: Need factory library to build with factory" 1>&2
    18911940    fi
    18921941  fi
    18931942fi
    1894 
     1943echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
     1944
     1945if test "$WITH_FACTORY" = yes; then
     1946  cat >> confdefs.h <<\EOF
     1947#define HAVE_FACTORY 1
     1948EOF
     1949
     1950  NEED_LIBS="-lsingcf ${NEED_LIBS}"
     1951  echo "$ac_t""yes" 1>&6
     1952else
     1953  echo "$ac_t""no" 1>&6
     1954fi
    18951955
    18961956WITH_LIBFAC=no
    18971957if test "$with_libfac" != no; then
    1898   if test "${WITH_FACTORY}" != yes; then
    1899     echo "configure: warning: building without libfac: can not use libfac without factory" 1>&2
     1958  if test "$WITH_FACTORY" != yes; then
     1959    echo "configure: warning: Need factory to build with libfac" 1>&2
    19001960  else
    1901     if test "$ac_cv_lib_singcf_atof" = yes; then
    1902       echo $ac_n "checking for -lsingfac""... $ac_c" 1>&6
    1903 ac_lib_var=`echo singfac_atof | tr '.-/+' '___p'`
    1904 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    1905   echo $ac_n "(cached) $ac_c" 1>&6
    1906 else
    1907   ac_save_LIBS="$LIBS"
    1908 LIBS="-lsingfac  $LIBS"
    1909 cat > conftest.$ac_ext <<EOF
    1910 #line 1911 "configure"
    1911 #include "confdefs.h"
    1912 /* Override any gcc2 internal prototype to avoid an error.  */
    1913 char atof();
    1914 
    1915 int main() { return 0; }
    1916 int t() {
    1917 atof()
    1918 ; return 0; }
    1919 EOF
    1920 if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    1921   rm -rf conftest*
    1922   eval "ac_cv_lib_$ac_lib_var=yes"
    1923 else
    1924   rm -rf conftest*
    1925   eval "ac_cv_lib_$ac_lib_var=no"
    1926 fi
    1927 rm -f conftest*
    1928 LIBS="$ac_save_LIBS"
    1929 
    1930 fi
    1931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    1932   echo "$ac_t""yes" 1>&6
    1933     ac_tr_lib=HAVE_LIB`echo singfac | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    1934   cat >> confdefs.h <<EOF
    1935 #define $ac_tr_lib 1
    1936 EOF
    1937 
    1938   LIBS="-lsingfac $LIBS"
    1939 
    1940 else
    1941   echo "$ac_t""no" 1>&6
    1942 fi
    1943 
    1944     fi
    1945     for ac_hdr in factor.h
    1946 do
    1947 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
    1948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1949 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    1950   echo $ac_n "(cached) $ac_c" 1>&6
    1951 else
    1952   cat > conftest.$ac_ext <<EOF
    1953 #line 1954 "configure"
    1954 #include "confdefs.h"
    1955 #include <$ac_hdr>
    1956 EOF
    1957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1958 { (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    1959 ac_err=`grep -v '^ *+' conftest.out`
    1960 if test -z "$ac_err"; then
    1961   rm -rf conftest*
    1962   eval "ac_cv_header_$ac_safe=yes"
    1963 else
    1964   echo "$ac_err" >&5
    1965   rm -rf conftest*
    1966   eval "ac_cv_header_$ac_safe=no"
    1967 fi
    1968 rm -f conftest*
    1969 fi
    1970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    1971   echo "$ac_t""yes" 1>&6
    1972     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
    1973   cat >> confdefs.h <<EOF
    1974 #define $ac_tr_hdr 1
    1975 EOF
    1976  
    1977 else
    1978   echo "$ac_t""no" 1>&6
    1979 fi
    1980 done
    1981 
    1982     if test "$ac_cv_lib_singfac_atof" = yes && \
    1983      test "$ac_cv_header_factor_h" = yes; then
    1984       NEED_LIBS="-lsingfac ${NEED_LIBS}"
    1985       cat >> confdefs.h <<\EOF
    1986 #define HAVE_LIBFAC_P 1
    1987 EOF
    1988 
     1961    if test "$ac_libfac_ok" = yes; then
    19891962      WITH_LIBFAC=yes
    19901963    elif test "$enable_libfac" = yes; then
    1991       NEED_LIBS="-lsingfac ${NEED_LIBS}"
    1992       cat >> confdefs.h <<\EOF
    1993 #define HAVE_LIBFAC_P 1
    1994 EOF
    1995 
    19961964      WITH_LIBFAC=yes
    1997       echo "configure: warning: install libfac before making Singular or configure --without-libfac" 1>&2
     1965      echo "configure: warning: Install libfac before making Singular" 1>&2
    19981966    else
    1999       echo "configure: warning: building without libfac: disabling char series" 1>&2
     1967      echo "configure: warning: Need libfac library to build with libfac" 1>&2
    20001968    fi
    20011969  fi
    20021970fi
    2003 
    2004 
     1971echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
     1972
     1973if test "$WITH_LIBFAC" = yes; then
     1974  cat >> confdefs.h <<\EOF
     1975#define HAVE_LIBFAC_P 1
     1976EOF
     1977
     1978  NEED_LIBS="-lsingfac ${NEED_LIBS}"
     1979  echo "$ac_t""yes" 1>&6
     1980else
     1981  echo "$ac_t""no" 1>&6
     1982fi
    20051983
    20061984
     
    20151993else
    20161994cat > conftest.$ac_ext <<EOF
    2017 #line 2018 "configure"
     1995#line 1996 "configure"
    20181996#include "confdefs.h"
    20191997main(){return(0);}
    20201998EOF
    2021 { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     1999{ (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    20222000if test -s conftest && (./conftest; exit) 2>/dev/null; then
    20232001  ac_cv_c_cross=no
     
    20372015else
    20382016  cat > conftest.$ac_ext <<EOF
    2039 #line 2040 "configure"
     2017#line 2018 "configure"
    20402018#include "confdefs.h"
    20412019#include <stdlib.h>
     
    20452023EOF
    20462024ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2047 { (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2025{ (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    20482026ac_err=`grep -v '^ *+' conftest.out`
    20492027if test -z "$ac_err"; then
     
    20602038  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    20612039cat > conftest.$ac_ext <<EOF
    2062 #line 2063 "configure"
     2040#line 2041 "configure"
    20632041#include "confdefs.h"
    20642042#include <string.h>
     
    20782056  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    20792057cat > conftest.$ac_ext <<EOF
    2080 #line 2081 "configure"
     2058#line 2059 "configure"
    20812059#include "confdefs.h"
    20822060#include <stdlib.h>
     
    20992077else
    21002078cat > conftest.$ac_ext <<EOF
    2101 #line 2102 "configure"
     2079#line 2080 "configure"
    21022080#include "confdefs.h"
    21032081#include <ctype.h>
     
    21102088
    21112089EOF
    2112 { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     2090{ (eval echo configure:2091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    21132091if test -s conftest && (./conftest; exit) 2>/dev/null; then
    21142092  :
     
    21382116else
    21392117  cat > conftest.$ac_ext <<EOF
    2140 #line 2141 "configure"
     2118#line 2119 "configure"
    21412119#include "confdefs.h"
    21422120#include <$ac_hdr>
    21432121EOF
    21442122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2145 { (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2123{ (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    21462124ac_err=`grep -v '^ *+' conftest.out`
    21472125if test -z "$ac_err"; then
     
    21772155else
    21782156  cat > conftest.$ac_ext <<EOF
    2179 #line 2180 "configure"
     2157#line 2158 "configure"
    21802158#include "confdefs.h"
    21812159#include <$ac_hdr>
    21822160EOF
    21832161ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2184 { (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2162{ (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    21852163ac_err=`grep -v '^ *+' conftest.out`
    21862164if test -z "$ac_err"; then
     
    22122190else
    22132191  cat > conftest.$ac_ext <<EOF
    2214 #line 2215 "configure"
     2192#line 2193 "configure"
    22152193#include "confdefs.h"
    22162194
     
    22622240; return 0; }
    22632241EOF
    2264 if { (eval echo configure:2265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2242if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    22652243  rm -rf conftest*
    22662244  ac_cv_c_const=yes
     
    22882266for ac_kw in inline __inline__ __inline; do
    22892267  cat > conftest.$ac_ext <<EOF
    2290 #line 2291 "configure"
     2268#line 2269 "configure"
    22912269#include "confdefs.h"
    22922270
     
    22962274; return 0; }
    22972275EOF
    2298 if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2276if { (eval echo configure:2277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    22992277  rm -rf conftest*
    23002278  ac_cv_c_inline=$ac_kw; break
     
    23242302else
    23252303  cat > conftest.$ac_ext <<EOF
    2326 #line 2327 "configure"
     2304#line 2305 "configure"
    23272305#include "confdefs.h"
    23282306#include <sys/types.h>
     
    23552333else
    23562334  cat > conftest.$ac_ext <<EOF
    2357 #line 2358 "configure"
     2335#line 2336 "configure"
    23582336#include "confdefs.h"
    23592337#include <sys/types.h>
     
    23652343; return 0; }
    23662344EOF
    2367 if { (eval echo configure:2368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2345if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    23682346  rm -rf conftest*
    23692347  ac_cv_header_time=yes
     
    23892367else
    23902368  cat > conftest.$ac_ext <<EOF
    2391 #line 2392 "configure"
     2369#line 2370 "configure"
    23922370#include "confdefs.h"
    23932371#include <sys/types.h>
     
    23982376; return 0; }
    23992377EOF
    2400 if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2378if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    24012379  rm -rf conftest*
    24022380  ac_cv_struct_tm=time.h
     
    24252403else
    24262404  cat > conftest.$ac_ext <<EOF
    2427 #line 2428 "configure"
     2405#line 2406 "configure"
    24282406#include "confdefs.h"
    24292407#include <alloca.h>
     
    24332411; return 0; }
    24342412EOF
    2435 if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2413if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    24362414  rm -rf conftest*
    24372415  ac_cv_header_alloca_h=yes
     
    24572435else
    24582436  cat > conftest.$ac_ext <<EOF
    2459 #line 2460 "configure"
     2437#line 2438 "configure"
    24602438#include "confdefs.h"
    24612439
     
    24812459; return 0; }
    24822460EOF
    2483 if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2461if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    24842462  rm -rf conftest*
    24852463  ac_cv_func_alloca=yes
     
    25162494else
    25172495  cat > conftest.$ac_ext <<EOF
    2518 #line 2519 "configure"
     2496#line 2497 "configure"
    25192497#include "confdefs.h"
    25202498#if defined(CRAY) && ! defined(CRAY2)
     
    25452523else
    25462524  cat > conftest.$ac_ext <<EOF
    2547 #line 2548 "configure"
     2525#line 2526 "configure"
    25482526#include "confdefs.h"
    25492527/* System header to define __stub macros and hopefully few prototypes,
     
    25672545; return 0; }
    25682546EOF
    2569 if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2547if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    25702548  rm -rf conftest*
    25712549  eval "ac_cv_func_$ac_func=yes"
     
    25992577else
    26002578cat > conftest.$ac_ext <<EOF
    2601 #line 2602 "configure"
     2579#line 2580 "configure"
    26022580#include "confdefs.h"
    26032581find_stack_direction ()
     
    26182596}
    26192597EOF
    2620 { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     2598{ (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    26212599if test -s conftest && (./conftest; exit) 2>/dev/null; then
    26222600  ac_cv_c_stack_direction=1
     
    26422620    ac_pattern="Autoconf.*'x'"
    26432621  cat > conftest.$ac_ext <<EOF
    2644 #line 2645 "configure"
     2622#line 2623 "configure"
    26452623#include "confdefs.h"
    26462624#include <sgtty.h>
     
    26602638  if test $ac_cv_prog_gcc_traditional = no; then
    26612639    cat > conftest.$ac_ext <<EOF
    2662 #line 2663 "configure"
     2640#line 2641 "configure"
    26632641#include "confdefs.h"
    26642642#include <termio.h>
     
    26882666else
    26892667  cat > conftest.$ac_ext <<EOF
    2690 #line 2691 "configure"
     2668#line 2669 "configure"
    26912669#include "confdefs.h"
    26922670/* System header to define __stub macros and hopefully few prototypes,
     
    27102688; return 0; }
    27112689EOF
    2712 if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2690if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    27132691  rm -rf conftest*
    27142692  eval "ac_cv_func_$ac_func=yes"
     
    27402718else
    27412719cat > conftest.$ac_ext <<EOF
    2742 #line 2743 "configure"
     2720#line 2721 "configure"
    27432721#include "confdefs.h"
    27442722
     
    28092787
    28102788EOF
    2811 { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     2789{ (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    28122790if test -s conftest && (./conftest; exit) 2>/dev/null; then
    28132791  ac_cv_func_mmap=yes
     
    28322810else
    28332811  cat > conftest.$ac_ext <<EOF
    2834 #line 2835 "configure"
     2812#line 2813 "configure"
    28352813#include "confdefs.h"
    28362814#include <sys/types.h>
     
    28502828; return 0; }
    28512829EOF
    2852 if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2830if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    28532831  rm -rf conftest*
    28542832  ac_cv_type_signal=void
     
    28722850else
    28732851  cat > conftest.$ac_ext <<EOF
    2874 #line 2875 "configure"
     2852#line 2853 "configure"
    28752853#include "confdefs.h"
    28762854/* System header to define __stub macros and hopefully few prototypes,
     
    28942872; return 0; }
    28952873EOF
    2896 if { (eval echo configure:2897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2874if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    28972875  rm -rf conftest*
    28982876  eval "ac_cv_func_vprintf=yes"
     
    29202898else
    29212899  cat > conftest.$ac_ext <<EOF
    2922 #line 2923 "configure"
     2900#line 2901 "configure"
    29232901#include "confdefs.h"
    29242902/* System header to define __stub macros and hopefully few prototypes,
     
    29422920; return 0; }
    29432921EOF
    2944 if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2922if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    29452923  rm -rf conftest*
    29462924  eval "ac_cv_func__doprnt=yes"
     
    29712949else
    29722950  cat > conftest.$ac_ext <<EOF
    2973 #line 2974 "configure"
     2951#line 2952 "configure"
    29742952#include "confdefs.h"
    29752953/* System header to define __stub macros and hopefully few prototypes,
     
    29932971; return 0; }
    29942972EOF
    2995 if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     2973if { (eval echo configure:2974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    29962974  rm -rf conftest*
    29972975  eval "ac_cv_func_$ac_func=yes"
     
    30253003else
    30263004cat > conftest.$ac_ext <<EOF
    3027 #line 3028 "configure"
     3005#line 3006 "configure"
    30283006#include "confdefs.h"
    30293007 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
    30303008EOF
    3031 { (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     3009{ (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    30323010if test -s conftest && (./conftest; exit) 2>/dev/null; then
    30333011  ac_cv_shift=yes
     
    30553033else
    30563034cat > conftest.$ac_ext <<EOF
    3057 #line 3058 "configure"
     3035#line 3036 "configure"
    30583036#include "confdefs.h"
    30593037 int main() {if (sizeof(int) == 4)  exit(0); else exit(1); }
    30603038EOF
    3061 { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     3039{ (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    30623040if test -s conftest && (./conftest; exit) 2>/dev/null; then
    30633041  ac_cv_sizeof_int_equals_four=yes
     
    30853063else
    30863064cat > conftest.$ac_ext <<EOF
    3087 #line 3088 "configure"
     3065#line 3066 "configure"
    30883066#include "confdefs.h"
    30893067 int main() {if (sizeof(long) == sizeof(void*))  exit(0); else exit(1); }
    30903068EOF
    3091 { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     3069{ (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    30923070if test -s conftest && (./conftest; exit) 2>/dev/null; then
    30933071  ac_cv_sizeof_long_equals_voidp=yes
     
    31143092else
    31153093cat > conftest.$ac_ext <<EOF
    3116 #line 3117 "configure"
     3094#line 3095 "configure"
    31173095#include "confdefs.h"
    31183096#include <stdio.h>
    31193097 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
    31203098EOF
    3121 { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     3099{ (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    31223100if test -s conftest && (./conftest; exit) 2>/dev/null; then
    31233101  ac_cv_returns_n_of_chars=yes
     
    31473125else
    31483126cat > conftest.$ac_ext <<EOF
    3149 #line 3150 "configure"
     3127#line 3128 "configure"
    31503128#include "confdefs.h"
    31513129#include <stdio.h>
     
    31583136}
    31593137EOF
    3160 { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
     3138{ (eval echo configure:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
    31613139if test -s conftest && (./conftest; exit) 2>/dev/null; then
    31623140  ac_cv_sizeof_voidp=`cat conftestval`
     
    31803158else
    31813159  cat > conftest.$ac_ext <<EOF
    3182 #line 3183 "configure"
     3160#line 3161 "configure"
    31833161#include "confdefs.h"
    31843162#ifdef _AIX
  • Singular/configure.in

    r412b7cd rbde08b  
    116116
    117117AC_ARG_WITH(
    118   gmp,
    119   [  --without-gmp        do not use gmp library])
    120    
    121 AC_ARG_WITH(
    122118  MP,
    123119  [  --without-MP         do not use MP (disables MP links)])
     
    140136  libfac,
    141137  [  --without-libfac     do not use libfac (disables primary decompositions)])
    142 
    143 dnl without info !
     138AC_ARG_WITH(apint, \
     139 [ --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
     140                          where PACKAGE can be gmp, smallgmp, or buildin])
    144141
    145142dnl
     
    195192NEED_LIBS=$LIBS
    196193
     194AC_CHECK_LIB(gmp, mpq_init)
     195AC_CHECK_LIB(smallgmp, mpz_init)
     196AC_CHECK_LIB(MP, IMP_PutGmpInt)
     197AC_CHECK_LIB(MPT, MPT_GetTree)
     198AC_CHECK_LIB(singcf, atof)
     199AC_CHECK_LIB(singfac, atof)
     200
     201AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h)
     202
     203if test "$ac_cv_lib_gmp_mpq_init" = yes && \
     204 test "$ac_cv_header_gmp_h" = yes; then
     205    ac_gmp_ok=yes
     206fi
     207
     208if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
     209 test "$ac_cv_header_smallgmp_h" = yes && \
     210 test "$ac_cv_header_gmp_h" = yes; then
     211    ac_smallgmp_ok=yes
     212fi
     213
     214if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
     215 test "$ac_cv_lib_MPT_MPT_GetTree" && \
     216 test "$ac_cv_header_MP_h" = yes && \
     217 test "$ac_cv_header_MPT_h" = yes; then
     218  ac_MP_ok=yes
     219fi
     220
     221if test "$ac_cv_lib_singcf_atof" = yes && \
     222 test "$ac_cv_header_factory_h" = yes; then
     223  ac_factory_ok=yes
     224fi
     225
     226if test "$ac_cv_lib_singfac_atof" = yes && \
     227 test "$ac_cv_header_factor_h" = yes; then
     228  ac_libfac_ok=yes
     229fi
     230
    197231dnl Check gmp
    198 if test "$with_builtingmp" = yes; then
    199   AC_DEFINE(HAVE_BUILTIN_GMP)
     232if test "$with_apint" != buildin; then
     233  if test "$with_apint" = gmp; then
     234    if test "$ac_gmp_ok" = yes; then
     235      ac_will_have_gmp=yes
     236    elif test "$enable_gmp" = yes; then
     237      ac_will_have_gmp=yes
     238      AC_MSG_WARN(install gmp before making Singular)
     239    else
     240      AC_MSG_ERROR(Can not use with gmp: lib/header not found)
     241    fi
     242  elif test "$with_apint" = smallgmp; then
     243    if test "$ac_smallgmp_ok" = yes; then
     244      ac_will_have_gmp=yes
     245      ac_will have_smallgmp=yes
     246    elif test "$enable_gmp" = yes; then
     247      ac_will_have_gmp=yes
     248      ac_will_have_smallgmp=yes
     249      AC_MSG_WARN(install smallgmp before making Singular)
     250    else
     251      AC_MSG_ERROR(Can not use with smallgmp: lib/header not found)
     252    fi
     253  elif test "$ac_gmp_ok" = yes; then
     254    ac_will_have_gmp=yes
     255  elif test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then
     256    ac_will_have_gmp=yes
     257    ac_will_have_smallgmp=yes
     258  elif test "$enable_gmp" = yes; then
     259    ac_will_have_gmp=yes
     260  fi
     261fi
     262AC_MSG_CHECKING(which apint package to use)
     263if test "$ac_will_have_gmp" = yes; then
    200264  AC_DEFINE(HAVE_GMP)
    201   ac_gmp_ok=yes
    202 elif test "$with_gmp" != no; then
    203   AC_CHECK_LIB(gmp, mpz_init)
    204   AC_CHECK_HEADER(gmp.h)
    205   if test "$ac_cv_lib_gmp_mpz_init" = yes && \
    206    test "$ac_cv_header_gmp_h" = yes; then
    207     AC_DEFINE(HAVE_GMP)
     265  if test "$ac_will_have_smallgmp" = yes; then
     266    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
     267    AC_MSG_RESULT(smallgmp)
     268    AC_DEFINE(HAVE_SMALLGMP)
     269  else
    208270    NEED_LIBS="-lgmp ${NEED_LIBS}"
    209     ac_gmp_ok=yes
    210   elif test "$enable_gmp" = yes; then
    211     AC_DEFINE(HAVE_GMP)
    212     NEED_LIBS="-lgmp ${NEED_LIBS}"
    213     ac_gmp_ok=yes
    214     AC_MSG_WARN(install gmp before making Singular or configure --without-gmp)
    215   else
    216     AC_MSG_WARN(building without gmp: using build-in rational arithmetic)
    217   fi
     271    AC_MSG_RESULT(gmp)
     272  fi
     273else
     274  AC_MSG_RESULT(buildin)
    218275fi
    219276
     
    221278WITH_MP=no
    222279if test "$with_MP" != no; then
    223   if test "$ac_gmp_ok" != yes; then
    224     AC_MSG_WARN(building without MP: can not use MP without gmp)
    225   else
    226     if test "$ac_cv_lib_gmp_mpz_init"=yes; then
    227       AC_CHECK_LIB(MP, IMP_PutGmpInt)
    228       AC_CHECK_LIB(MPT, MPT_GetTree)
    229     fi
    230     AC_CHECK_HEADERS(MP.h MPT.h)
    231     if test "$ac_cv_lib_MPT_MPT_GetTree" = yes && \
    232      test "$ac_cv_header_MP_h" = yes && \
    233      test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
    234      test "$ac_cv_header_MPT_h" = yes; then
    235       AC_DEFINE(HAVE_MPSR)
    236       NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     280  if test "$ac_will_have_gmp" != yes; then
     281    AC_MSG_WARN(Need gmp to build with MP)
     282  else
     283    if test "$ac_MP_ok" = yes; then
    237284      WITH_MP=yes
    238285    elif test "$enable_MP" = yes; then
    239       AC_DEFINE(HAVE_MPSR)
    240       NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
    241286      WITH_MP=yes
    242       AC_MSG_WARN(install MP before making Singular or configure --without-MP)
    243     else
    244       AC_MSG_WARN(building without MP: disabling MP links)
    245     fi
    246   fi
    247 fi
     287      AC_MSG_WARN(Install MP before making Singular)
     288    else
     289      AC_MSG_WARN(Need MP library to build with MP)
     290    fi
     291  fi
     292fi
     293AC_MSG_CHECKING(whether to use with MP)
    248294AC_SUBST(WITH_MP)
     295if test "$WITH_MP" = yes; then
     296  AC_DEFINE(HAVE_MPSR)
     297  NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     298  AC_MSG_RESULT(yes)
     299else
     300  AC_MSG_RESULT(no)
     301fi
    249302
    250303dnl Check factory
    251304WITH_FACTORY=no
    252305if test "$with_factory" != no; then
    253   if test "$ac_gmp_ok" != yes; then
    254     AC_MSG_WARN(building without factory: can not use factory without gmp)
    255   else
    256     if test "$ac_cv_lib_gmp_mpz_init"=yes;then
    257       AC_CHECK_LIB(singcf,atof)
    258     fi
    259     AC_CHECK_HEADERS(factory.h)
    260     if test "$ac_cv_lib_singcf_atof" = yes && \
    261      test "$ac_cv_header_factory_h" = yes; then
    262       AC_DEFINE(HAVE_FACTORY)
    263       NEED_LIBS="-lsingcf ${NEED_LIBS}"
     306  if test "$ac_will_have_gmp" != yes; then
     307    AC_MSG_WARN(Need gmp to build with factory)
     308  else
     309    if test "$ac_factory_ok" = yes; then
    264310      WITH_FACTORY=yes
    265311    elif test "$enable_factory" = yes; then
    266       NEED_LIBS="-lsingcf ${NEED_LIBS}"
    267       AC_DEFINE(HAVE_FACTORY)
    268312      WITH_FACTORY=yes
    269       AC_MSG_WARN(install factory before making Singular or configure --without-factory)
    270     else
    271       AC_MSG_WARN(building without factory: disabling poly factorization)
    272     fi
    273   fi
    274 fi
     313      AC_MSG_WARN(Install factory before making Singular)
     314    else
     315      AC_MSG_WARN(Need factory library to build with factory)
     316    fi
     317  fi
     318fi
     319AC_MSG_CHECKING(whether to use with factory)
    275320AC_SUBST(WITH_FACTORY)
     321if test "$WITH_FACTORY" = yes; then
     322  AC_DEFINE(HAVE_FACTORY)
     323  NEED_LIBS="-lsingcf ${NEED_LIBS}"
     324  AC_MSG_RESULT(yes)
     325else
     326  AC_MSG_RESULT(no)
     327fi
    276328
    277329dnl Check libfac
    278330WITH_LIBFAC=no
    279331if test "$with_libfac" != no; then
    280   if test "${WITH_FACTORY}" != yes; then
    281     AC_MSG_WARN(building without libfac: can not use libfac without factory)
    282   else
    283     if test "$ac_cv_lib_singcf_atof" = yes; then
    284       AC_CHECK_LIB(singfac,atof)
    285     fi
    286     AC_CHECK_HEADERS(factor.h)
    287     if test "$ac_cv_lib_singfac_atof" = yes && \
    288      test "$ac_cv_header_factor_h" = yes; then
    289       NEED_LIBS="-lsingfac ${NEED_LIBS}"
    290       AC_DEFINE(HAVE_LIBFAC_P)
     332  if test "$WITH_FACTORY" != yes; then
     333    AC_MSG_WARN(Need factory to build with libfac)
     334  else
     335    if test "$ac_libfac_ok" = yes; then
    291336      WITH_LIBFAC=yes
    292337    elif test "$enable_libfac" = yes; then
    293       NEED_LIBS="-lsingfac ${NEED_LIBS}"
    294       AC_DEFINE(HAVE_LIBFAC_P)
    295338      WITH_LIBFAC=yes
    296       AC_MSG_WARN(install libfac before making Singular or configure --without-libfac)
    297     else
    298       AC_MSG_WARN(building without libfac: disabling char series)
    299     fi
    300   fi
    301 fi
     339      AC_MSG_WARN(Install libfac before making Singular)
     340    else
     341      AC_MSG_WARN(Need libfac library to build with libfac)
     342    fi
     343  fi
     344fi
     345AC_MSG_CHECKING(whether to use with libfac)
    302346AC_SUBST(WITH_LIBFAC)
    303 
     347if test "$WITH_LIBFAC" = yes; then
     348  AC_DEFINE(HAVE_LIBFAC_P)
     349  NEED_LIBS="-lsingfac ${NEED_LIBS}"
     350  AC_MSG_RESULT(yes)
     351else
     352  AC_MSG_RESULT(no)
     353fi
    304354AC_SUBST(NEED_LIBS)
    305355
  • Singular/longrat.cc

    r412b7cd rbde08b  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longrat.cc,v 1.8 1997-05-05 15:15:13 Singular Exp $ */
     4/* $Id: longrat.cc,v 1.9 1997-06-11 08:00:09 obachman Exp $ */
    55/*
    66* ABSTRACT: computation with long rational numbers (Hubert Grassmann)
     
    9797#define SR_TO_INT(SR)   (((long)SR) >> 2)
    9898
    99 #ifdef macintosh
    100 #define MP_SMALL 2
    101 #else
    10299#define MP_SMALL 1
    103 #endif
    104100//#define mpz_isNeg(A) (mpz_cmp_si(A,(long)0)<0)
    105101#ifdef HAVE_LIBGMP1
     
    114110#define mpz_limb_d(A) ((A)->_mp_d)
    115111#define MPZ_DIV(A,B,C) mpz_tdiv_q((A),(B),(C))
     112#ifdef HAVE_SMALLGMP
     113#define MPZ_EXACTDIV(A,B,C) mpz_tdiv_q((A),(B),(C))
     114#else
    116115#define MPZ_EXACTDIV(A,B,C) mpz_divexact((A),(B),(C))
     116#endif
    117117#define nlGmpSimple(A)
    118118#endif
  • Singular/longrat.h

    r412b7cd rbde08b  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: longrat.h,v 1.5 1997-05-05 15:15:12 Singular Exp $ */
     6/* $Id: longrat.h,v 1.6 1997-06-11 08:00:10 obachman Exp $ */
    77/*
    88* ABSTRACT: computation with long rational numbers
     
    1212#ifdef HAVE_GMP
    1313extern "C" {
    14 #ifdef macintosh
    15 #include "b_gmp.h"
     14#include <gmp.h>
     15}
     16#ifdef HAVE_SMALLGMP
     17#  define HAVE_LIBGMP2
    1618#else
    17 #include "gmp.h"
    18 #endif
    19 }
    2019#if (__GNU_MP_VERSION > 1) && (__GNU_MP_VERSION_MINOR >= 0)
    2120#  define HAVE_LIBGMP2
     
    2322#  define HAVE_LIBGMP1
    2423#endif
     24#endif
    2525
    2626typedef MP_INT lint;
  • Singular/mod2.h.in

    r412b7cd rbde08b  
    2424/* Define to use gmp for rational arithmetic */
    2525#undef HAVE_GMP
    26 /* Define to have built in gmp */
    27 #undef HAVE_BUILTIN_GMP
     26/* Define to have smallgmp */
     27#undef HAVE_SMALLGMP
    2828/* Define to have MP links */
    2929#undef HAVE_MPSR
  • Singular/sing_mp.cc

    r412b7cd rbde08b  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sing_mp.cc,v 1.13 1997-06-05 16:41:21 obachman Exp $ */
     4/* $Id: sing_mp.cc,v 1.14 1997-06-11 08:00:15 obachman Exp $ */
    55
    66/*
     
    173173
    174174
    175   if (port == NULL)
    176     Warn("No port number specified for MPtcp:connect; Used %s", argv[5]);
    177   else argv[5] = port;
     175  if (port != NULL) argv[5] = port;
    178176
    179177  if (host == NULL)
    180178  {
    181     Warn("No host specified for MPtcp:connect; Used localhost");
    182179    argv[7] = mp_Env->thishost;
    183180  }
     
    193190  char *port = IMP_GetCmdlineArg(n_argc, n_argv, "-MPport");
    194191
    195   if (port == NULL)
    196     Warn("No port number specified for MPtcp:listen; Used %s", argv[5]);
    197   else argv[5] = port;
     192  if (port != NULL) argv[5] = port;
    198193
    199194  return MP_OpenLink(mp_Env, 6, argv);
     
    208203
    209204
    210   if (appl == NULL)
    211     Warn("No application specified for MPtcp:launch; Used %s", argv[7]);
    212   else argv[7] = appl;
     205  if (appl != NULL) argv[7] = appl;
    213206
    214207  if (host == NULL)
    215208  {
    216     Warn("No host specified for MPtcp:launch; Used localhost");
    217209    argv[5] = mp_Env->thishost;
    218210  }
  • Singular/tesths.cc

    r412b7cd rbde08b  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: tesths.cc,v 1.15 1997-05-21 13:05:16 obachman Exp $ */
     4/* $Id: tesths.cc,v 1.16 1997-06-11 08:00:16 obachman Exp $ */
    55
    66/*
     
    153153#if defined (__GNU_MP_VERSION) && defined (__GNU_MP_VERSION_MINOR)
    154154              printf("\tGMP(%d.%d),\n",__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR);
    155 #else
     155#elif defined (HAVE_SMALLGMP)
     156              printf("\tSmallGMP(2.0.2.0),\n");
     157#else               
    156158              printf("\tGMP(1.3),\n");
    157159#endif             
Note: See TracChangeset for help on using the changeset viewer.