Changeset 6b32990 in git


Ignore:
Timestamp:
Dec 12, 2000, 9:44:55 AM (22 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
de7793b9aaa39c2f00b6e30ee4ad5c82915497aa
Parents:
52ea3f939ec0aa2915d2d6a747bab3976eb9bfb7
Message:
* dynamic kernel modules for MP and DBM links
* p_Procs improvements


git-svn-id: file:///usr/local/Singular/svn/trunk@4865 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
5 added
1 deleted
31 edited
1 moved

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tst.lib

    r52ea3f r6b32990  
    1 // $Id: tst.lib,v 1.27 2000-09-25 10:44:50 obachman Exp $
     1// $Id: tst.lib,v 1.28 2000-12-12 08:44:55 obachman Exp $
    22//(obachman, last modified 6/30/98)
    33/////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: tst.lib,v 1.27 2000-09-25 10:44:50 obachman Exp $";
     5version="$Id: tst.lib,v 1.28 2000-12-12 08:44:55 obachman Exp $";
    66info="
    77LIBRARY:  tst.lib      PROCEDURES FOR RUNNING AUTOMATIC TST TESTS
     
    3434  s = read(tmpfile);
    3535  errno = system("sh", "rm -f " + tmpfile);
    36   if (size(#) > 0)
    37   {
    38       s = s[1, size(s) -1];
     36  if (size(#) > 0 && size(s) > 1)
     37  {
     38    s = s[1, size(s) -1];
    3939  }
    4040  return (s);
  • Singular/Makefile.in

    r52ea3f r6b32990  
    6161STATIC_LDFLAGS  = @STATIC_LDFLAGS@
    6262LIBS            = -lm @NEED_LIBS@
     63MP_LIBS         = @MP_LIBS@
    6364DL_KERNEL       = @DL_KERNEL@
     65HAVE_MPSR       = @HAVE_MPSR@
    6466
    6567ifdef LD_STATIC
    6668LDFLAGS  := ${STATIC_LDFLAGS} ${LDFLAGS}
    6769SING_EXEC = Singular-static
     70LIBS := ${MP_LIBS} ${LIBS}
    6871DL_KERNEL =
    6972else
     
    7275endif
    7376
     77# CXXFLAGS =  -g -Wall -Wno-unused
     78# CFLAGS =  -g -Wall -Wno-unused
    7479##
    7580## End configuration dependend stuff
     
    95100    fglm.cc fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \
    96101    numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc \
    97     ring.cc shortfl.cc silink.cc sing_mp.cc\
    98     sing_dbm.cc kspoly.cc \
     102    ring.cc shortfl.cc silink.cc kspoly.cc \
    99103    subexpr.cc syz.cc syz0.cc syz1.cc syz2.cc syz3.cc\
    100104    timer.cc weight.cc \
    101     mpsr_Put.cc mpsr_PutPoly.cc mpsr_GetPoly.cc \
    102     mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc \
    103105    GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc \
    104     ndbm.cc  libparse.cc mod_raw.cc \
     106    libparse.cc mod_raw.cc \
    105107    pcv.cc kbuckets.cc\
    106108    mpr_inout.cc mpr_base.cc mpr_numeric.cc \
     
    109111    pShallowCopyDelete.cc
    110112
     113# stuff for MP
     114MPSR_SOURCES = mpsr_Put.cc mpsr_PutPoly.cc mpsr_GetPoly.cc mpsr_sl.cc\
     115        mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc \
     116
     117# stuff for dbm
     118DBMSR_SOURCES =  ndbm.cc sing_dbm.cc
     119
    111120# normal C source files
    112121CSOURCES=weight0.c fegetopt.c fereadl.c page.c feOpenWinntUrl.c dError.c mmstd.c
    113122
    114 
    115123# C++ sources which are used if part of the kernel are dynamically linked
    116 DL_KERNEL_SOURCES=p_Procs_Dynamic.cc
     124DL_KERNEL_SOURCES=p_Procs_Dynamic.cc slInit_Dynamic.cc
    117125
    118126# C++ sources which are used for dynamic libraries if part of the kernel is
    119127# dynamically linked
    120 DL_LIB_SOURCES=p_Procs_Lib.cc
     128DL_LIB_SOURCES=p_Procs_Lib.cc 
    121129
    122130# C++ sources which are used if no parts of the kernel are dynamically linked
    123 STATIC_SOURCES=p_Procs_Static.cc
     131STATIC_SOURCES=p_Procs_Static.cc slInit_Static.cc
     132
     133# C++ sources for which both, shared and static object files are needed
     134COMMON_SOURCES = $(MPSR_SOURCES) $(DBMSR_SOURCES)
    124135
    125136# special C++ source files (need extra compiling and/or linking), for which
    126137# dependencies should be generated
    127 ESOURCES=mmalloc.cc iparith.cc \
    128         $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES)
    129 
    130 SOURCES=${CSOURCES} ${CXXSOURCES} ${ESOURCES} \
     138ESOURCES=mmalloc.cc iparith.cc $(COMMON_SOURCES) \
     139        $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES) 
     140
     141SOURCES=${CSOURCES} ${CXXSOURCES} \
    131142        grammar.y scanner.l libparse.l syz2.cc prCopyTemplate.cc \
    132143        p_Delete__Template.cc p_ShallowCopyDelete__Template.cc \
     
    149160        ffields.h khstd.h silink.h sparsmat.h gnumpfl.h gnumpc.h \
    150161        fglm.h kstd1.h modulop.h sing_dbm.h weight.h \
    151         fglmgauss.h fglmvec.h mpsr.h sing_mp.h \
     162        fglmgauss.h fglmvec.h mpsr.h mpsr_sl.h\
    152163        kstdfac.h mpsr_Get.h kmatrix.h\
    153164        kutil.h mpsr_Put.h\
    154         ndbm.h polys-impl.h libparse.h \
     165        ndbm.h dbm_sl.h polys-impl.h libparse.h \
    155166        GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h \
    156167        pcv.h mod_raw.h kbuckets.h \
     
    174185endif
    175186
     187P_PROCS_MODULES = FieldZp FieldIndep FieldQ FieldGeneral
     188
    176189ifeq ($(DL_KERNEL),1)
    177 OBJS := $(OBJS) $(DL_KERNEL_SOURCES:.cc=.o)
    178 DL_LIBS=p_Procs.so
     190OBJS    := $(OBJS) $(DL_KERNEL_SOURCES:.cc=.o)
     191DBMSR_SO= dbmsr.so
     192DL_LIBS := $(P_PROCS_MODULES:%=p_Procs_%.so) $(DBMSR_SO)
     193ifeq ($(HAVE_MPSR), 1)
     194MPSR_SO =       mpsr.so
     195DL_LIBS :=      $(DL_LIBS) $(MPSR_SO)
     196endif
    179197else
    180 OBJS := $(OBJS) $(STATIC_SOURCES:.cc=.o)
     198ifndef LD_STATIC
     199LIBS := $(MP_LIBS) $(LIBS)
     200endif
     201OBJS := $(OBJS) $(STATIC_SOURCES:.cc=.o) $(COMMON_SOURCES:.c=.o)
    181202DL_LIBS=
    182203endif
     
    225246
    226247# building objects for shared libraries
     248p_Procs_Lib_%.dl_o : p_Procs_Lib.cc p_Procs_Dynamic.o
     249        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
     250
    227251%.dl_o : %.cc
    228252        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -c $< -o $@
     
    231255all:    $(SING_EXEC)
    232256
    233 Singular-static: mod2.h Makefile version.h scanner.cc \
    234           ${OBJS} iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o
     257Singular-static: version.h
    235258        sleep 1
    236259        echo "#define HAVE_STATIC" > static.h
    237         ${MAKE} LD_STATIC=1 Singular
     260        ${MAKE} LD_STATIC=1 S_EXT="-static" Singular-static
    238261        echo "#undef HAVE_STATIC" > static.h
    239         ${INSTALL_PROGRAM} Singular Singular-static
    240 
    241 Singular: mod2.h Makefile version.h scanner.cc  ${OBJS} mmalloc.o \
     262
     263Singular${S_EXT}: mod2.h Makefile version.h scanner.cc  ${OBJS} mmalloc.o \
    242264          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS)
    243265        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \
    244           -o Singular \
     266          -o Singular${S_EXT} \
    245267          tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
    246268          ${OBJS} ${LDFLAGS} ${LIBS} -lomalloc_ndebug mmalloc.o
    247269
    248270%.static: version.h
    249         test -r $* && cp $* save_$*
    250         ${MAKE} DL_KERNEL=0 $*
    251         ${INSTALL_PROGRAM} $* $*.static
    252         rm -f $*
    253         test -r save_$* && mv save_$* $*
     271        ${MAKE} DL_KERNEL=0 S_EXT=".static" $@
    254272
    255273iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc
     
    325343p_Procs_Static.o: p_Procs_Static.inc
    326344p_Procs_Static.inc: p_Procs_Static.h
    327 p_Procs_Dynamic.o: p_Procs_Dynamic.inc
    328 p_Procs_Lib.o: p_Procs_Lib.inc
     345p_Procs_Dynamic.o p_Procs_Lib.o: p_Procs_Dynamic.inc
    329346p_Procs_Dynamic.inc p_Procs_Lib.inc: p_Procs_Dynamic.h
    330347
    331 # here is how p_Procs_[Static|Dynamic|Lib].inc is generated
    332 p_Procs_%.inc:
     348# here is how p_Procs_[Static|Dynamic].inc is generated
     349p_Procs_%.inc: p_Procs_Generate.cc p_Procs_Impl.h mod2.h
    333350        $(CXX) -g -Wall -Dp_Procs_$* p_Procs_Generate.cc -o p_Procs_$*
    334351        ./p_Procs_$* > p_Procs_$*.inc
    335352
    336353
    337 p_Procs.so: p_Procs_Lib.dl_o
     354p_Procs_%.so: p_Procs_Lib_%.dl_o
    338355        ${CXX} ${CXXFLAGS} ${SFLAGS} ${SLDFLAGS} $< -o $@
     356
     357mpsr.so: $(MPSR_SOURCES:.cc=.dl_o)
     358        ${CXX} ${CXXFLAGS} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     359
     360dbmsr.so: $(DBMSR_SOURCES:.cc=.dl_o)
     361        ${CXX} ${CXXFLAGS} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
    339362
    340363src: scanner.cc grammar.h grammar.cc libparse.cc
     
    511534OBJA=$(OBJA1) $(OBJA2)
    512535
     536DL_TAILG=\"sog\"
     537DL_TAILP=\"sop\"
     538DL_TAILB=\"sob\"
     539DL_TAILT=\"sot\"
     540DL_TAILA=\"soa\"
     541
     542
    513543ifeq ($(DL_KERNEL),1)
    514544
    515545OBJG := $(OBJG) $(DL_KERNEL_SOURCES:.cc=.og)
    516 DL_LIBSG=p_Procs.sog
    517 DL_TAILG=\"sog\"
     546DL_LIBSG := $(P_PROCS_MODULES:%=p_Procs_%.sog) $(MPSR_SO:%.so=%.sog) $(DBMSR_SO:%.so=%.sog)
    518547
    519548OBJP := $(OBJP) $(DL_KERNEL_SOURCES:.cc=.op)
    520 DL_LIBSP=p_Procs.sop
    521 DL_TAILP=\"sop\"
     549DL_LIBSP := $(P_PROCS_MODULES:%=p_Procs_%.sop) $(MPSR_SO:%.so=%.sop) $(DBMSR_SO:%.so=%.sop)
    522550
    523551OBJB := $(OBJB) $(DL_KERNEL_SOURCES:.cc=.ob)
    524 DL_LIBSB=p_Procs.sob
    525 DL_TAILB=\"sob\"
     552DL_LIBSB := $(P_PROCS_MODULES:%=p_Procs_%.sob) $(MPSR_SO:%.so=%.sob) $(DBMSR_SO:%.so=%.sob)
    526553
    527554OBJT := $(OBJT) $(DL_KERNEL_SOURCES:.cc=.ot)
    528 DL_LIBST=p_Procs.sot
    529 DL_TAILT=\"sot\"
     555DL_LIBST := $(P_PROCS_MODULES:%=p_Procs_%.sot) $(MPSR_SO:%.so=%.sot) $(DBMSR_SO:%.so=%.sot)
    530556
    531557OBJA := $(OBJA) $(DL_KERNEL_SOURCES:.cc=.oa)
    532 DL_LIBSA=p_Procs.soa
    533 DL_TAILA=\"soa\"
     558DL_LIBSA := $(P_PROCS_MODULES:%=p_Procs_%.soa) $(MPSR_SO:%.so=%.soa) $(DBMSR_SO:%.so=%.soa)
    534559
    535560else
    536561
    537 OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og)
     562OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) $(COMMON_SOURCES:.cc=.og)
    538563DL_LIBSG=
    539564
    540 OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op)
     565OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) $(COMMON_SOURCES:.cc=.op)
    541566DL_LIBSP=
    542567
    543 OBJB := $(OBJB) $(STATIC_SOURCES:.cc=.ob)
     568OBJB := $(OBJB) $(STATIC_SOURCES:.cc=.ob) $(COMMON_SOURCES:.cc=.ob)
    544569DL_LIBSB=
    545570
    546 OBJT := $(OBJT) $(STATIC_SOURCES:.cc=.ot)
     571OBJT := $(OBJT) $(STATIC_SOURCES:.cc=.ot) $(COMMON_SOURCES:.cc=.ot)
    547572DL_LIBST=
    548573
    549 OBJA := $(OBJA) $(STATIC_SOURCES:.cc=.oa)
     574OBJA := $(OBJA) $(STATIC_SOURCES:.cc=.oa) $(COMMON_SOURCES:.cc=.oa)
    550575DL_LIBST=
    551576
     
    571596##
    572597
    573 p_Procs.sog: p_Procs_Lib.dl_og
     598p_Procs_%.sog: p_Procs_Lib_%.dl_og
    574599        ${CXXG} ${CXXFLAGSG} ${SFLAGS} ${SLDFLAGS} $< -o $@
    575600
     601p_Procs_Lib_%.dl_og : p_Procs_Lib.cc  p_Procs_Dynamic.og
     602        ${CXX} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    576603
    577604%.dl_og: %.cc
    578605        ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} ${SFLAGS} -c $< -o $@
    579606
     607mpsr.sog: $(MPSR_SOURCES:.cc=.dl_og)
     608        ${CXXG} ${CXXFLAGSG} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     609
     610dbmsr.sog: $(DBMSR_SOURCES:.cc=.dl_og)
     611        ${CXXG} ${CXXFLAGSG} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     612
    580613claptmpl.og: claptmpl.cc mod2.h
    581614        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
     
    587620        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
    588621
    589 Singularg: scanner.cc  $(OBJG)  mmalloc.og $(DL_LIBSG)\
     622Singularg${S_EXT}: scanner.cc  $(OBJG)  mmalloc.og $(DL_LIBSG)\
    590623           iparith.og mpsr_Tok.og claptmpl.og tesths.cc version.h
    591         $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg \
     624        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg${S_EXT} \
    592625        tesths.cc iparith.og mpsr_Tok.og claptmpl.og $(OBJG) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.og \
    593626        ${LD_DYN_FLAGS} ${LD_LIBC}
     
    644677
    645678## for gprof
    646 p_Procs.sop: p_Procs_Lib.dl_op
     679p_Procs_%.sop: p_Procs_Lib_%.dl_op
    647680        ${CXXP} ${CXXFLAGSP} ${SFLAGS} ${SLDFLAGS} $< -o $@
     681
     682p_Procs_Lib_%.dl_op : p_Procs_Lib.cc p_Procs_Dynamic.op
     683        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    648684
    649685%.dl_op: %.cc
     
    651687
    652688
     689mpsr.sop: $(MPSR_SOURCES:.cc=.dl_op)
     690        ${CXXP} ${CXXFLAGSP} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     691
     692dbmsr.sop: $(DBMSR_SOURCES:.cc=.dl_op)
     693        ${CXXP} ${CXXFLAGSP} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     694
    653695claptmpl.op: claptmpl.cc mod2.h
    654696        $(CXXP)  ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
     
    660702        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
    661703
    662 Singularp: scanner.cc   $(OBJP) mmalloc.op\
     704Singularp${S_EXT}: scanner.cc   $(OBJP) mmalloc.op\
    663705           iparith.op mpsr_Tok.op claptmpl.op tesths.cc version.h $(DL_LIBSP)
    664         $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp \
     706        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp${S_EXT} \
    665707        tesths.cc iparith.op mpsr_Tok.op claptmpl.op $(OBJP) ${LDFLAGSP} ${LIBS} -lomalloc_p mmalloc.op\
    666708        ${LD_DYN_FLAGS}
     
    674716
    675717## for bprof
    676 p_Procs.sob: p_Procs_Lib.dl_ob
     718p_Procs_%.sob: p_Procs_Lib_%.dl_ob
    677719        ${CXXP} ${CXXFLAGSB} ${SFLAGS} ${SLDFLAGS} $< -o $@
    678720
     721p_Procs_Lib_%.dl_ob : p_Procs_Lib.cc  p_Procs_Dynamic.ob
     722        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    679723
    680724%.dl_ob: %.cc
    681725        ${CXXP} ${CXXFLAGSB} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSB} ${SFLAGS} -c $< -o $@
    682726
     727mpsr.sob: $(MPSR_SOURCES:.cc=.dl_ob)
     728        ${CXXP} ${CXXFLAGSB} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     729
     730dbmsr.sob: $(DBMSR_SOURCES:.cc=.dl_ob)
     731        ${CXXP} ${CXXFLAGSB} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
    683732
    684733claptmpl.ob: claptmpl.cc mod2.h
     
    691740        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
    692741
    693 Singularb: scanner.cc   $(OBJB) iparith.ob mpsr_Tok.ob claptmpl.ob tesths.cc version.h mmalloc.ob
    694         $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSB} -o Singularb \
     742Singularb${S_EXT}: scanner.cc   $(OBJB) iparith.ob mpsr_Tok.ob claptmpl.ob tesths.cc version.h mmalloc.ob
     743        $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSB} -o Singularb${S_EXT} \
    695744        tesths.cc iparith.ob mpsr_Tok.ob claptmpl.ob $(OBJB) $(BPROFOBJ) \
    696745        ${LDFLAGSP} ${LIBS} -lomalloc_ndebug mmalloc.ob ${LD_DYN_FLAGS}
     
    705754# for mtrack
    706755#
    707 p_Procs.sot: p_Procs_Lib.dl_ot
    708         ${CXXP} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} $< -o $@
     756p_Procs_%.sot: p_Procs_Lib_%.dl_ot
     757        ${CXX} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} $< -o $@
     758
     759p_Procs_Lib_%.dl_ot : p_Procs_Lib.cc p_Procs_Dynamic.ot
     760        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    709761
    710762%.dl_ot: %.cc
    711763        ${CXXP} ${CXXFLAGST} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFST} ${SFLAGS} -c $< -o $@
    712764
     765mpsr.sot: $(MPSR_SOURCES:.cc=.dl_ot)
     766        ${CXX} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     767
     768dbmsr.sot: $(DBMSR_SOURCES:.cc=.dl_ot)
     769        ${CXX} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
    713770
    714771claptmpl.ot: claptmpl.cc mod2.h
     
    721778        $(CCP)  ${CFLAGST} ${CPPFLAGS} ${DEFST} -c $< -o $@
    722779
    723 Singulart: scanner.cc   $(OBJT) iparith.ot mpsr_Tok.ot claptmpl.ot tesths.cc version.h  mmalloc.ot
    724         $(CXXP) ${CXXFLAGST} ${CPPFLAGS} ${DEFST} -o Singulart \
     780Singulart${S_EXT}: scanner.cc   $(OBJT) iparith.ot mpsr_Tok.ot claptmpl.ot tesths.cc version.h  mmalloc.ot
     781        $(CXXP) ${CXXFLAGST} ${CPPFLAGS} ${DEFST} -o Singulart${S_EXT} \
    725782        tesths.cc iparith.ot mpsr_Tok.ot claptmpl.ot $(OBJT) ${LDFLAGST} ${LIBS} -lomalloc mmalloc.ot \
    726783        ${LD_DYN_FLAGS}
     
    740797CXXFLAGSA       = -g  -O -Wall -Wno-unused ${PIPE}
    741798
    742 p_Procs.soa: p_Procs_Lib.dl_oa
     799p_Procs_%.soa: p_Procs_Lib_%.dl_oa
    743800        ${CXX} ${CXXFLAGSA} ${SFLAGS} ${SLDFLAGS} $< -o $@
     801
     802p_Procs_Lib_%.dl_oa : p_Procs_Lib.cc p_Procs_Dynamic.oa
     803        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    744804
    745805%.dl_oa: %.cc
    746806        ${CXX} ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} ${SFLAGS} -c $< -o $@
    747807
     808mpsr.soa: $(MPSR_SOURCES:.cc=.dl_oa)
     809        ${CXX} ${CXXFLAGSA} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     810
     811dbmsr.soa: $(DBMSR_SOURCES:.cc=.dl_oa)
     812        ${CXX} ${CXXFLAGSA} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     813
     814
    748815claptmpl.oa: claptmpl.cc mod2.h
    749816        $(CXX)  ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@
     
    755822        $(CCP)  ${CFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@
    756823
    757 Singulara: scanner.cc   $(OBJA) iparith.oa mpsr_Tok.oa claptmpl.oa tesths.cc version.h  mmalloc.oa $(DL_LIBSA)
    758         $(CXXP) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara \
     824Singulara${S_EXT}: scanner.cc   $(OBJA) iparith.oa mpsr_Tok.oa claptmpl.oa tesths.cc version.h  mmalloc.oa $(DL_LIBSA)
     825        $(CXXP) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara${S_EXT} \
    759826        tesths.cc iparith.oa mpsr_Tok.oa claptmpl.oa $(OBJA) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.oa \
    760827        ${LD_DYN_FLAGS}
     
    808875
    809876%.d: %.c mod2.h
    810         echo $(@:.d=.og) $(@:.d=.od) $(@:.dd=_d.c) $(@:.d=.op) $(@:.d=.ob) $(@:.d=.ot) $(@:.dd=.oa)" " \\ > $@
     877        echo $(@:.d=.og) $(@:.d=.od) $(@:.dd=_d.c) $(@:.d=.op) $(@:.d=.ob) $(@:.d=.ot) $(@:.d=.oa)" " \\ > $@
    811878        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
    812879
  • Singular/configure

    r52ea3f r6b32990  
    15931593fi
    15941594
     1595SAVE_LIBS=${LIBS}
     1596LIBS=
    15951597echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
    1596 echo "configure:1597: checking for socket in -lbsd" >&5
     1598echo "configure:1599: checking for socket in -lbsd" >&5
    15971599ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
    15981600if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16021604LIBS="-lbsd  $LIBS"
    16031605cat > conftest.$ac_ext <<EOF
    1604 #line 1605 "configure"
     1606#line 1607 "configure"
    16051607#include "confdefs.h"
    16061608/* Override any gcc2 internal prototype to avoid an error.  */
     
    16131615; return 0; }
    16141616EOF
    1615 if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1617if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16161618  rm -rf conftest*
    16171619  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16411643
    16421644echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
    1643 echo "configure:1644: checking for listen in -lsocket" >&5
     1645echo "configure:1646: checking for listen in -lsocket" >&5
    16441646ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
    16451647if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16491651LIBS="-lsocket  $LIBS"
    16501652cat > conftest.$ac_ext <<EOF
    1651 #line 1652 "configure"
     1653#line 1654 "configure"
    16521654#include "confdefs.h"
    16531655/* Override any gcc2 internal prototype to avoid an error.  */
     
    16601662; return 0; }
    16611663EOF
    1662 if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1664if { (eval echo configure:1665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16631665  rm -rf conftest*
    16641666  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16881690
    16891691echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
    1690 echo "configure:1691: checking for gethostbyname in -lnsl" >&5
     1692echo "configure:1693: checking for gethostbyname in -lnsl" >&5
    16911693ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
    16921694if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16961698LIBS="-lnsl  $LIBS"
    16971699cat > conftest.$ac_ext <<EOF
    1698 #line 1699 "configure"
     1700#line 1701 "configure"
    16991701#include "confdefs.h"
    17001702/* Override any gcc2 internal prototype to avoid an error.  */
     
    17071709; return 0; }
    17081710EOF
    1709 if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1711if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    17101712  rm -rf conftest*
    17111713  eval "ac_cv_lib_$ac_lib_var=yes"
     
    17351737
    17361738echo $ac_n "checking for index in -lucb""... $ac_c" 1>&6
    1737 echo "configure:1738: checking for index in -lucb" >&5
     1739echo "configure:1740: checking for index in -lucb" >&5
    17381740ac_lib_var=`echo ucb'_'index | sed 'y%./+-%__p_%'`
    17391741if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    17431745LIBS="-lucb  $LIBS"
    17441746cat > conftest.$ac_ext <<EOF
    1745 #line 1746 "configure"
     1747#line 1748 "configure"
    17461748#include "confdefs.h"
    17471749/* Override any gcc2 internal prototype to avoid an error.  */
     
    17541756; return 0; }
    17551757EOF
    1756 if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1758if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    17571759  rm -rf conftest*
    17581760  eval "ac_cv_lib_$ac_lib_var=yes"
     
    17811783fi
    17821784
     1785MP_LIBS=${LIBS}
     1786LIBS=
    17831787
    17841788# check for dl lib
     
    17861790        HPUX*)
    17871791          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
    1788 echo "configure:1789: checking for shl_load in -ldld" >&5
     1792echo "configure:1793: checking for shl_load in -ldld" >&5
    17891793ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
    17901794if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    17941798LIBS="-ldld  $LIBS"
    17951799cat > conftest.$ac_ext <<EOF
    1796 #line 1797 "configure"
     1800#line 1801 "configure"
    17971801#include "confdefs.h"
    17981802/* Override any gcc2 internal prototype to avoid an error.  */
     
    18051809; return 0; }
    18061810EOF
    1807 if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1811if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    18081812  rm -rf conftest*
    18091813  eval "ac_cv_lib_$ac_lib_var=yes"
     
    18411845        *Linux*)
    18421846          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
    1843 echo "configure:1844: checking for dlopen in -ldl" >&5
     1847echo "configure:1848: checking for dlopen in -ldl" >&5
    18441848ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
    18451849if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    18491853LIBS="-ldl  $LIBS"
    18501854cat > conftest.$ac_ext <<EOF
    1851 #line 1852 "configure"
     1855#line 1856 "configure"
    18521856#include "confdefs.h"
    18531857/* Override any gcc2 internal prototype to avoid an error.  */
     
    18601864; return 0; }
    18611865EOF
    1862 if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1866if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    18631867  rm -rf conftest*
    18641868  eval "ac_cv_lib_$ac_lib_var=yes"
     
    18981902
    18991903
     1904LIBS=${SAVE_LIBS}
    19001905
    19011906# heder file checks
    19021907echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    1903 echo "configure:1904: checking for ANSI C header files" >&5
     1908echo "configure:1909: checking for ANSI C header files" >&5
    19041909if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    19051910  echo $ac_n "(cached) $ac_c" 1>&6
    19061911else
    19071912  cat > conftest.$ac_ext <<EOF
    1908 #line 1909 "configure"
     1913#line 1914 "configure"
    19091914#include "confdefs.h"
    19101915#include <stdlib.h>
     
    19141919EOF
    19151920ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1916 { (eval echo configure:1917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1921{ (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    19171922ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    19181923if test -z "$ac_err"; then
     
    19311936  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    19321937cat > conftest.$ac_ext <<EOF
    1933 #line 1934 "configure"
     1938#line 1939 "configure"
    19341939#include "confdefs.h"
    19351940#include <string.h>
     
    19491954  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    19501955cat > conftest.$ac_ext <<EOF
    1951 #line 1952 "configure"
     1956#line 1957 "configure"
    19521957#include "confdefs.h"
    19531958#include <stdlib.h>
     
    19701975else
    19711976  cat > conftest.$ac_ext <<EOF
    1972 #line 1973 "configure"
     1977#line 1978 "configure"
    19731978#include "confdefs.h"
    19741979#include <ctype.h>
     
    19811986
    19821987EOF
    1983 if { (eval echo configure:1984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1988if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    19841989then
    19851990  :
     
    20082013ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    20092014echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    2010 echo "configure:2011: checking for $ac_hdr" >&5
     2015echo "configure:2016: checking for $ac_hdr" >&5
    20112016if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    20122017  echo $ac_n "(cached) $ac_c" 1>&6
    20132018else
    20142019  cat > conftest.$ac_ext <<EOF
    2015 #line 2016 "configure"
     2020#line 2021 "configure"
    20162021#include "confdefs.h"
    20172022#include <$ac_hdr>
    20182023EOF
    20192024ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2020 { (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2025{ (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    20212026ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    20222027if test -z "$ac_err"; then
     
    20502055ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    20512056echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    2052 echo "configure:2053: checking for $ac_hdr" >&5
     2057echo "configure:2058: checking for $ac_hdr" >&5
    20532058if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    20542059  echo $ac_n "(cached) $ac_c" 1>&6
    20552060else
    20562061  cat > conftest.$ac_ext <<EOF
    2057 #line 2058 "configure"
     2062#line 2063 "configure"
    20582063#include "confdefs.h"
    20592064#include <$ac_hdr>
    20602065EOF
    20612066ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2062 { (eval echo configure:2063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2067{ (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    20632068ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    20642069if test -z "$ac_err"; then
     
    20892094# typedefs, structures
    20902095echo $ac_n "checking for working const""... $ac_c" 1>&6
    2091 echo "configure:2092: checking for working const" >&5
     2096echo "configure:2097: checking for working const" >&5
    20922097if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    20932098  echo $ac_n "(cached) $ac_c" 1>&6
    20942099else
    20952100  cat > conftest.$ac_ext <<EOF
    2096 #line 2097 "configure"
     2101#line 2102 "configure"
    20972102#include "confdefs.h"
    20982103
     
    21432148; return 0; }
    21442149EOF
    2145 if { (eval echo configure:2146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2150if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    21462151  rm -rf conftest*
    21472152  ac_cv_c_const=yes
     
    21642169
    21652170echo $ac_n "checking for inline""... $ac_c" 1>&6
    2166 echo "configure:2167: checking for inline" >&5
     2171echo "configure:2172: checking for inline" >&5
    21672172if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
    21682173  echo $ac_n "(cached) $ac_c" 1>&6
     
    21712176for ac_kw in inline __inline__ __inline; do
    21722177  cat > conftest.$ac_ext <<EOF
    2173 #line 2174 "configure"
     2178#line 2179 "configure"
    21742179#include "confdefs.h"
    21752180
     
    21782183; return 0; }
    21792184EOF
    2180 if { (eval echo configure:2181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2185if { (eval echo configure:2186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    21812186  rm -rf conftest*
    21822187  ac_cv_c_inline=$ac_kw; break
     
    22042209
    22052210echo $ac_n "checking for size_t""... $ac_c" 1>&6
    2206 echo "configure:2207: checking for size_t" >&5
     2211echo "configure:2212: checking for size_t" >&5
    22072212if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    22082213  echo $ac_n "(cached) $ac_c" 1>&6
    22092214else
    22102215  cat > conftest.$ac_ext <<EOF
    2211 #line 2212 "configure"
     2216#line 2217 "configure"
    22122217#include "confdefs.h"
    22132218#include <sys/types.h>
     
    22372242
    22382243echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
    2239 echo "configure:2240: checking whether time.h and sys/time.h may both be included" >&5
     2244echo "configure:2245: checking whether time.h and sys/time.h may both be included" >&5
    22402245if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    22412246  echo $ac_n "(cached) $ac_c" 1>&6
    22422247else
    22432248  cat > conftest.$ac_ext <<EOF
    2244 #line 2245 "configure"
     2249#line 2250 "configure"
    22452250#include "confdefs.h"
    22462251#include <sys/types.h>
     
    22512256; return 0; }
    22522257EOF
    2253 if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2258if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    22542259  rm -rf conftest*
    22552260  ac_cv_header_time=yes
     
    22722277
    22732278echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
    2274 echo "configure:2275: checking whether struct tm is in sys/time.h or time.h" >&5
     2279echo "configure:2280: checking whether struct tm is in sys/time.h or time.h" >&5
    22752280if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    22762281  echo $ac_n "(cached) $ac_c" 1>&6
    22772282else
    22782283  cat > conftest.$ac_ext <<EOF
    2279 #line 2280 "configure"
     2284#line 2285 "configure"
    22802285#include "confdefs.h"
    22812286#include <sys/types.h>
     
    22852290; return 0; }
    22862291EOF
    2287 if { (eval echo configure:2288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2292if { (eval echo configure:2293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    22882293  rm -rf conftest*
    22892294  ac_cv_struct_tm=time.h
     
    23102315# for constant arguments.  Useless!
    23112316echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
    2312 echo "configure:2313: checking for working alloca.h" >&5
     2317echo "configure:2318: checking for working alloca.h" >&5
    23132318if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    23142319  echo $ac_n "(cached) $ac_c" 1>&6
    23152320else
    23162321  cat > conftest.$ac_ext <<EOF
    2317 #line 2318 "configure"
     2322#line 2323 "configure"
    23182323#include "confdefs.h"
    23192324#include <alloca.h>
     
    23222327; return 0; }
    23232328EOF
    2324 if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2329if { (eval echo configure:2330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    23252330  rm -rf conftest*
    23262331  ac_cv_header_alloca_h=yes
     
    23432348
    23442349echo $ac_n "checking for alloca""... $ac_c" 1>&6
    2345 echo "configure:2346: checking for alloca" >&5
     2350echo "configure:2351: checking for alloca" >&5
    23462351if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    23472352  echo $ac_n "(cached) $ac_c" 1>&6
    23482353else
    23492354  cat > conftest.$ac_ext <<EOF
    2350 #line 2351 "configure"
     2355#line 2356 "configure"
    23512356#include "confdefs.h"
    23522357
     
    23762381; return 0; }
    23772382EOF
    2378 if { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2383if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    23792384  rm -rf conftest*
    23802385  ac_cv_func_alloca_works=yes
     
    24082413
    24092414echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
    2410 echo "configure:2411: checking whether alloca needs Cray hooks" >&5
     2415echo "configure:2416: checking whether alloca needs Cray hooks" >&5
    24112416if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    24122417  echo $ac_n "(cached) $ac_c" 1>&6
    24132418else
    24142419  cat > conftest.$ac_ext <<EOF
    2415 #line 2416 "configure"
     2420#line 2421 "configure"
    24162421#include "confdefs.h"
    24172422#if defined(CRAY) && ! defined(CRAY2)
     
    24382443for ac_func in _getb67 GETB67 getb67; do
    24392444  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2440 echo "configure:2441: checking for $ac_func" >&5
     2445echo "configure:2446: checking for $ac_func" >&5
    24412446if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    24422447  echo $ac_n "(cached) $ac_c" 1>&6
    24432448else
    24442449  cat > conftest.$ac_ext <<EOF
    2445 #line 2446 "configure"
     2450#line 2451 "configure"
    24462451#include "confdefs.h"
    24472452/* System header to define __stub macros and hopefully few prototypes,
     
    24662471; return 0; }
    24672472EOF
    2468 if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2473if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    24692474  rm -rf conftest*
    24702475  eval "ac_cv_func_$ac_func=yes"
     
    24932498
    24942499echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
    2495 echo "configure:2496: checking stack direction for C alloca" >&5
     2500echo "configure:2501: checking stack direction for C alloca" >&5
    24962501if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    24972502  echo $ac_n "(cached) $ac_c" 1>&6
     
    25012506else
    25022507  cat > conftest.$ac_ext <<EOF
    2503 #line 2504 "configure"
     2508#line 2509 "configure"
    25042509#include "confdefs.h"
    25052510find_stack_direction ()
     
    25202525}
    25212526EOF
    2522 if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2527if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    25232528then
    25242529  ac_cv_c_stack_direction=1
     
    25432548if test $ac_cv_prog_gcc = yes; then
    25442549    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
    2545 echo "configure:2546: checking whether ${CC-cc} needs -traditional" >&5
     2550echo "configure:2551: checking whether ${CC-cc} needs -traditional" >&5
    25462551if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    25472552  echo $ac_n "(cached) $ac_c" 1>&6
     
    25492554    ac_pattern="Autoconf.*'x'"
    25502555  cat > conftest.$ac_ext <<EOF
    2551 #line 2552 "configure"
     2556#line 2557 "configure"
    25522557#include "confdefs.h"
    25532558#include <sgtty.h>
     
    25672572  if test $ac_cv_prog_gcc_traditional = no; then
    25682573    cat > conftest.$ac_ext <<EOF
    2569 #line 2570 "configure"
     2574#line 2575 "configure"
    25702575#include "confdefs.h"
    25712576#include <termio.h>
     
    25922597ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    25932598echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    2594 echo "configure:2595: checking for $ac_hdr" >&5
     2599echo "configure:2600: checking for $ac_hdr" >&5
    25952600if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    25962601  echo $ac_n "(cached) $ac_c" 1>&6
    25972602else
    25982603  cat > conftest.$ac_ext <<EOF
    2599 #line 2600 "configure"
     2604#line 2605 "configure"
    26002605#include "confdefs.h"
    26012606#include <$ac_hdr>
    26022607EOF
    26032608ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2604 { (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2609{ (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    26052610ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    26062611if test -z "$ac_err"; then
     
    26312636do
    26322637echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2633 echo "configure:2634: checking for $ac_func" >&5
     2638echo "configure:2639: checking for $ac_func" >&5
    26342639if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    26352640  echo $ac_n "(cached) $ac_c" 1>&6
    26362641else
    26372642  cat > conftest.$ac_ext <<EOF
    2638 #line 2639 "configure"
     2643#line 2644 "configure"
    26392644#include "confdefs.h"
    26402645/* System header to define __stub macros and hopefully few prototypes,
     
    26592664; return 0; }
    26602665EOF
    2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2666if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    26622667  rm -rf conftest*
    26632668  eval "ac_cv_func_$ac_func=yes"
     
    26842689
    26852690echo $ac_n "checking for working mmap""... $ac_c" 1>&6
    2686 echo "configure:2687: checking for working mmap" >&5
     2691echo "configure:2692: checking for working mmap" >&5
    26872692if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
    26882693  echo $ac_n "(cached) $ac_c" 1>&6
     
    26922697else
    26932698  cat > conftest.$ac_ext <<EOF
    2694 #line 2695 "configure"
     2699#line 2700 "configure"
    26952700#include "confdefs.h"
    26962701
     
    28322837
    28332838EOF
    2834 if { (eval echo configure:2835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2839if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    28352840then
    28362841  ac_cv_func_mmap_fixed_mapped=yes
     
    28552860
    28562861echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
    2857 echo "configure:2858: checking return type of signal handlers" >&5
     2862echo "configure:2863: checking return type of signal handlers" >&5
    28582863if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    28592864  echo $ac_n "(cached) $ac_c" 1>&6
    28602865else
    28612866  cat > conftest.$ac_ext <<EOF
    2862 #line 2863 "configure"
     2867#line 2868 "configure"
    28632868#include "confdefs.h"
    28642869#include <sys/types.h>
     
    28772882; return 0; }
    28782883EOF
    2879 if { (eval echo configure:2880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2884if { (eval echo configure:2885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    28802885  rm -rf conftest*
    28812886  ac_cv_type_signal=void
     
    28962901
    28972902echo $ac_n "checking for vprintf""... $ac_c" 1>&6
    2898 echo "configure:2899: checking for vprintf" >&5
     2903echo "configure:2904: checking for vprintf" >&5
    28992904if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
    29002905  echo $ac_n "(cached) $ac_c" 1>&6
    29012906else
    29022907  cat > conftest.$ac_ext <<EOF
    2903 #line 2904 "configure"
     2908#line 2909 "configure"
    29042909#include "confdefs.h"
    29052910/* System header to define __stub macros and hopefully few prototypes,
     
    29242929; return 0; }
    29252930EOF
    2926 if { (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2931if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    29272932  rm -rf conftest*
    29282933  eval "ac_cv_func_vprintf=yes"
     
    29482953if test "$ac_cv_func_vprintf" != yes; then
    29492954echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
    2950 echo "configure:2951: checking for _doprnt" >&5
     2955echo "configure:2956: checking for _doprnt" >&5
    29512956if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
    29522957  echo $ac_n "(cached) $ac_c" 1>&6
    29532958else
    29542959  cat > conftest.$ac_ext <<EOF
    2955 #line 2956 "configure"
     2960#line 2961 "configure"
    29562961#include "confdefs.h"
    29572962/* System header to define __stub macros and hopefully few prototypes,
     
    29762981; return 0; }
    29772982EOF
    2978 if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2983if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    29792984  rm -rf conftest*
    29802985  eval "ac_cv_func__doprnt=yes"
     
    30033008do
    30043009echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    3005 echo "configure:3006: checking for $ac_func" >&5
     3010echo "configure:3011: checking for $ac_func" >&5
    30063011if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    30073012  echo $ac_n "(cached) $ac_c" 1>&6
    30083013else
    30093014  cat > conftest.$ac_ext <<EOF
    3010 #line 3011 "configure"
     3015#line 3016 "configure"
    30113016#include "confdefs.h"
    30123017/* System header to define __stub macros and hopefully few prototypes,
     
    30313036; return 0; }
    30323037EOF
    3033 if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3038if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    30343039  rm -rf conftest*
    30353040  eval "ac_cv_func_$ac_func=yes"
     
    30593064# arithmetic shifts
    30603065echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
    3061 echo "configure:3062: checking whether your machine has correct arithmetic shifts" >&5
     3066echo "configure:3067: checking whether your machine has correct arithmetic shifts" >&5
    30623067if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
    30633068  echo $ac_n "(cached) $ac_c" 1>&6
     
    30723077else
    30733078  cat > conftest.$ac_ext <<EOF
    3074 #line 3075 "configure"
     3079#line 3080 "configure"
    30753080#include "confdefs.h"
    30763081 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
    30773082EOF
    3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3083if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    30793084then
    30803085  ac_cv_shift=yes
     
    31013106# check for a peculiar constructor initialization
    31023107echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
    3103 echo "configure:3104: checking whether explicit C++ constructor calls are allowed" >&5
     3108echo "configure:3109: checking whether explicit C++ constructor calls are allowed" >&5
    31043109
    31053110ac_ext=C
     
    31143119else
    31153120  cat > conftest.$ac_ext <<EOF
    3116 #line 3117 "configure"
     3121#line 3122 "configure"
    31173122#include "confdefs.h"
    31183123
     
    31323137; return 0; }
    31333138EOF
    3134 if { (eval echo configure:3135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3139if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    31353140  rm -rf conftest*
    31363141  ac_cv_explicit_const=yes
     
    31613166# sprintf returns number of printed chars
    31623167echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
    3163 echo "configure:3164: checking whether vsprintf returns number of printed chars" >&5
     3168echo "configure:3169: checking whether vsprintf returns number of printed chars" >&5
    31643169if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
    31653170  echo $ac_n "(cached) $ac_c" 1>&6
     
    31693174else
    31703175  cat > conftest.$ac_ext <<EOF
    3171 #line 3172 "configure"
     3176#line 3177 "configure"
    31723177#include "confdefs.h"
    31733178#include <stdio.h>
    31743179 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
    31753180EOF
    3176 if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3181if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    31773182then
    31783183  ac_cv_returns_n_of_chars=yes
     
    32003205# determine ALIGN_8
    32013206echo $ac_n "checking size of char""... $ac_c" 1>&6
    3202 echo "configure:3203: checking size of char" >&5
     3207echo "configure:3208: checking size of char" >&5
    32033208if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
    32043209  echo $ac_n "(cached) $ac_c" 1>&6
     
    32083213else
    32093214  cat > conftest.$ac_ext <<EOF
    3210 #line 3211 "configure"
     3215#line 3216 "configure"
    32113216#include "confdefs.h"
    32123217#include <stdio.h>
     
    32193224}
    32203225EOF
    3221 if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3226if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    32223227then
    32233228  ac_cv_sizeof_char=`cat conftestval`
     
    32393244
    32403245echo $ac_n "checking size of short""... $ac_c" 1>&6
    3241 echo "configure:3242: checking size of short" >&5
     3246echo "configure:3247: checking size of short" >&5
    32423247if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
    32433248  echo $ac_n "(cached) $ac_c" 1>&6
     
    32473252else
    32483253  cat > conftest.$ac_ext <<EOF
    3249 #line 3250 "configure"
     3254#line 3255 "configure"
    32503255#include "confdefs.h"
    32513256#include <stdio.h>
     
    32583263}
    32593264EOF
    3260 if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3265if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    32613266then
    32623267  ac_cv_sizeof_short=`cat conftestval`
     
    32783283
    32793284echo $ac_n "checking size of int""... $ac_c" 1>&6
    3280 echo "configure:3281: checking size of int" >&5
     3285echo "configure:3286: checking size of int" >&5
    32813286if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
    32823287  echo $ac_n "(cached) $ac_c" 1>&6
     
    32863291else
    32873292  cat > conftest.$ac_ext <<EOF
    3288 #line 3289 "configure"
     3293#line 3294 "configure"
    32893294#include "confdefs.h"
    32903295#include <stdio.h>
     
    32973302}
    32983303EOF
    3299 if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3304if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    33003305then
    33013306  ac_cv_sizeof_int=`cat conftestval`
     
    33173322
    33183323echo $ac_n "checking size of long""... $ac_c" 1>&6
    3319 echo "configure:3320: checking size of long" >&5
     3324echo "configure:3325: checking size of long" >&5
    33203325if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
    33213326  echo $ac_n "(cached) $ac_c" 1>&6
     
    33253330else
    33263331  cat > conftest.$ac_ext <<EOF
    3327 #line 3328 "configure"
     3332#line 3333 "configure"
    33283333#include "confdefs.h"
    33293334#include <stdio.h>
     
    33363341}
    33373342EOF
    3338 if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3343if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    33393344then
    33403345  ac_cv_sizeof_long=`cat conftestval`
     
    33563361
    33573362echo $ac_n "checking size of void*""... $ac_c" 1>&6
    3358 echo "configure:3359: checking size of void*" >&5
     3363echo "configure:3364: checking size of void*" >&5
    33593364if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
    33603365  echo $ac_n "(cached) $ac_c" 1>&6
     
    33643369else
    33653370  cat > conftest.$ac_ext <<EOF
    3366 #line 3367 "configure"
     3371#line 3372 "configure"
    33673372#include "confdefs.h"
    33683373#include <stdio.h>
     
    33753380}
    33763381EOF
    3377 if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3382if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    33783383then
    33793384  ac_cv_sizeof_voidp=`cat conftestval`
     
    33953400
    33963401echo $ac_n "checking size of double""... $ac_c" 1>&6
    3397 echo "configure:3398: checking size of double" >&5
     3402echo "configure:3403: checking size of double" >&5
    33983403if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
    33993404  echo $ac_n "(cached) $ac_c" 1>&6
     
    34033408else
    34043409  cat > conftest.$ac_ext <<EOF
    3405 #line 3406 "configure"
     3410#line 3411 "configure"
    34063411#include "confdefs.h"
    34073412#include <stdio.h>
     
    34143419}
    34153420EOF
    3416 if { (eval echo configure:3417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3421if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    34173422then
    34183423  ac_cv_sizeof_double=`cat conftestval`
     
    34343439
    34353440echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
    3436 echo "configure:3437: checking whether byte ordering is bigendian" >&5
     3441echo "configure:3442: checking whether byte ordering is bigendian" >&5
    34373442if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    34383443  echo $ac_n "(cached) $ac_c" 1>&6
     
    34413446# See if sys/param.h defines the BYTE_ORDER macro.
    34423447cat > conftest.$ac_ext <<EOF
    3443 #line 3444 "configure"
     3448#line 3449 "configure"
    34443449#include "confdefs.h"
    34453450#include <sys/types.h>
     
    34523457; return 0; }
    34533458EOF
    3454 if { (eval echo configure:3455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3459if { (eval echo configure:3460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    34553460  rm -rf conftest*
    34563461  # It does; now see whether it defined to BIG_ENDIAN or not.
    34573462cat > conftest.$ac_ext <<EOF
    3458 #line 3459 "configure"
     3463#line 3464 "configure"
    34593464#include "confdefs.h"
    34603465#include <sys/types.h>
     
    34673472; return 0; }
    34683473EOF
    3469 if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3474if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    34703475  rm -rf conftest*
    34713476  ac_cv_c_bigendian=yes
     
    34873492else
    34883493  cat > conftest.$ac_ext <<EOF
    3489 #line 3490 "configure"
     3494#line 3495 "configure"
    34903495#include "confdefs.h"
    34913496main () {
     
    35003505}
    35013506EOF
    3502 if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3507if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    35033508then
    35043509  ac_cv_c_bigendian=no
     
    36183623
    36193624echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
    3620 echo "configure:3621: checking whether to use dynamic linking" >&5
     3625echo "configure:3626: checking whether to use dynamic linking" >&5
    36213626if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
    36223627  cat >> confdefs.h <<\EOF
     
    36313636
    36323637echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
    3633 echo "configure:3634: checking for tgetent in -lncurses" >&5
     3638echo "configure:3639: checking for tgetent in -lncurses" >&5
    36343639ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
    36353640if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    36393644LIBS="-lncurses  $LIBS"
    36403645cat > conftest.$ac_ext <<EOF
    3641 #line 3642 "configure"
     3646#line 3647 "configure"
    36423647#include "confdefs.h"
    36433648/* Override any gcc2 internal prototype to avoid an error.  */
     
    36503655; return 0; }
    36513656EOF
    3652 if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3657if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    36533658  rm -rf conftest*
    36543659  eval "ac_cv_lib_$ac_lib_var=yes"
     
    36773682\
    36783683 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
    3679 echo "configure:3680: checking for tgetent in -lcurses" >&5
     3684echo "configure:3685: checking for tgetent in -lcurses" >&5
    36803685ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
    36813686if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    36853690LIBS="-lcurses  $LIBS"
    36863691cat > conftest.$ac_ext <<EOF
    3687 #line 3688 "configure"
     3692#line 3693 "configure"
    36883693#include "confdefs.h"
    36893694/* Override any gcc2 internal prototype to avoid an error.  */
     
    36963701; return 0; }
    36973702EOF
    3698 if { (eval echo configure:3699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3703if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    36993704  rm -rf conftest*
    37003705  eval "ac_cv_lib_$ac_lib_var=yes"
     
    37233728\
    37243729  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
    3725 echo "configure:3726: checking for tgetent in -ltermcap" >&5
     3730echo "configure:3731: checking for tgetent in -ltermcap" >&5
    37263731ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
    37273732if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    37313736LIBS="-ltermcap  $LIBS"
    37323737cat > conftest.$ac_ext <<EOF
    3733 #line 3734 "configure"
     3738#line 3739 "configure"
    37343739#include "confdefs.h"
    37353740/* Override any gcc2 internal prototype to avoid an error.  */
     
    37423747; return 0; }
    37433748EOF
    3744 if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3749if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    37453750  rm -rf conftest*
    37463751  eval "ac_cv_lib_$ac_lib_var=yes"
     
    37753780
    37763781# readline
    3777 if test "$with_readline" = dynamic && test "$ac_cv_have_dl" != yes; then
     3782if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
    37783783  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
    37793784  with_readline=static
     
    37913796
    37923797   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
    3793 echo "configure:3794: checking for rl_abort in -lreadline" >&5
     3798echo "configure:3799: checking for rl_abort in -lreadline" >&5
    37943799ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
    37953800if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    37993804LIBS="-lreadline  $LIBS"
    38003805cat > conftest.$ac_ext <<EOF
    3801 #line 3802 "configure"
     3806#line 3807 "configure"
    38023807#include "confdefs.h"
    38033808/* Override any gcc2 internal prototype to avoid an error.  */
     
    38133818; return 0; }
    38143819EOF
    3815 if { (eval echo configure:3816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3820if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    38163821  rm -rf conftest*
    38173822  eval "ac_cv_lib_$ac_lib_var=yes"
     
    38413846
    38423847   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
    3843 echo "configure:3844: checking how to run the C++ preprocessor" >&5
     3848echo "configure:3849: checking how to run the C++ preprocessor" >&5
    38443849if test -z "$CXXCPP"; then
    38453850if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
     
    38543859  CXXCPP="${CXX-g++} -E"
    38553860  cat > conftest.$ac_ext <<EOF
    3856 #line 3857 "configure"
     3861#line 3862 "configure"
    38573862#include "confdefs.h"
    38583863#include <stdlib.h>
    38593864EOF
    38603865ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3861 { (eval echo configure:3862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3866{ (eval echo configure:3867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    38623867ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    38633868if test -z "$ac_err"; then
     
    38873892ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    38883893echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    3889 echo "configure:3890: checking for $ac_hdr" >&5
     3894echo "configure:3895: checking for $ac_hdr" >&5
    38903895if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    38913896  echo $ac_n "(cached) $ac_c" 1>&6
    38923897else
    38933898  cat > conftest.$ac_ext <<EOF
    3894 #line 3895 "configure"
     3899#line 3900 "configure"
    38953900#include "confdefs.h"
    38963901#include <$ac_hdr>
    38973902EOF
    38983903ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3899 { (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3904{ (eval echo configure:3905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    39003905ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    39013906if test -z "$ac_err"; then
     
    39263931      test "$ac_cv_header_readline_readline_h" = yes; then
    39273932     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
    3928 echo "configure:3929: checking whether readline.h is ok" >&5
     3933echo "configure:3934: checking whether readline.h is ok" >&5
    39293934     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
    39303935  echo $ac_n "(cached) $ac_c" 1>&6
    39313936else
    39323937  cat > conftest.$ac_ext <<EOF
    3933 #line 3934 "configure"
     3938#line 3939 "configure"
    39343939#include "confdefs.h"
    39353940#include<unistd.h>
     
    39563961; return 0; }
    39573962EOF
    3958 if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3963if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    39593964  rm -rf conftest*
    39603965  ac_cv_header_readline_readline_h_ok="yes"
     
    39723977#not ok -- try once more with explicitly declaring everything
    39733978      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
    3974 echo "configure:3975: checking whether or not we nevertheless can use readline" >&5
     3979echo "configure:3980: checking whether or not we nevertheless can use readline" >&5
    39753980      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
    39763981  echo $ac_n "(cached) $ac_c" 1>&6
    39773982else
    39783983  cat > conftest.$ac_ext <<EOF
    3979 #line 3980 "configure"
     3984#line 3985 "configure"
    39803985#include "confdefs.h"
    39813986#include <stdio.h>
     
    40114016; return 0; }
    40124017EOF
    4013 if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4018if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    40144019  rm -rf conftest*
    40154020  ac_cv_have_readline="yes"
     
    40504055
    40514056echo $ac_n "checking which readline to use""... $ac_c" 1>&6
    4052 echo "configure:4053: checking which readline to use" >&5
     4057echo "configure:4058: checking which readline to use" >&5
    40534058if test "$ac_cv_with_readline" = dynamic; then
    40544059  echo "$ac_t""dynamic" 1>&6
     
    40684073# gmp, smallgmp, MP, MPT, factory, libfac
    40694074echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
    4070 echo "configure:4071: checking for main in -lgmp" >&5
     4075echo "configure:4076: checking for main in -lgmp" >&5
    40714076ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
    40724077if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    40764081LIBS="-lgmp  $LIBS"
    40774082cat > conftest.$ac_ext <<EOF
    4078 #line 4079 "configure"
     4083#line 4084 "configure"
    40794084#include "confdefs.h"
    40804085
     
    40834088; return 0; }
    40844089EOF
    4085 if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4090if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    40864091  rm -rf conftest*
    40874092  eval "ac_cv_lib_$ac_lib_var=yes"
     
    41114116
    41124117if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then
    4113   LIBS=NEED_LIBS
     4118  LIBS=${NEED_LIBS}
    41144119fi
    41154120echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6
    4116 echo "configure:4117: checking for main in -lsmallgmp" >&5
     4121echo "configure:4122: checking for main in -lsmallgmp" >&5
    41174122ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'`
    41184123if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    41224127LIBS="-lsmallgmp  $LIBS"
    41234128cat > conftest.$ac_ext <<EOF
    4124 #line 4125 "configure"
     4129#line 4130 "configure"
    41254130#include "confdefs.h"
    41264131
     
    41294134; return 0; }
    41304135EOF
    4131 if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4136if { (eval echo configure:4137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    41324137  rm -rf conftest*
    41334138  eval "ac_cv_lib_$ac_lib_var=yes"
     
    41564161fi
    41574162
     4163SAVE_LIBS=$LIBS
    41584164echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
    4159 echo "configure:4160: checking for IMP_PutGmpInt in -lMP" >&5
     4165echo "configure:4166: checking for IMP_PutGmpInt in -lMP" >&5
    41604166ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
    41614167if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    41634169else
    41644170  ac_save_LIBS="$LIBS"
    4165 LIBS="-lMP $LIBS"
     4171LIBS="-lMP $MP_LIBS $LIBS"
    41664172cat > conftest.$ac_ext <<EOF
    4167 #line 4168 "configure"
     4173#line 4174 "configure"
    41684174#include "confdefs.h"
    41694175/* Override any gcc2 internal prototype to avoid an error.  */
     
    41764182; return 0; }
    41774183EOF
    4178 if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4184if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    41794185  rm -rf conftest*
    41804186  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42034209fi
    42044210
    4205 echo $ac_n "checking for MPT_GetTre in -lMPT""... $ac_c" 1>&6
    4206 echo "configure:4207: checking for MPT_GetTre in -lMPT" >&5
    4207 ac_lib_var=`echo MPT'_'MPT_GetTre | sed 'y%./+-%__p_%'`
     4211echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
     4212echo "configure:4213: checking for MPT_GetTree in -lMPT" >&5
     4213ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
    42084214if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    42094215  echo $ac_n "(cached) $ac_c" 1>&6
    42104216else
    42114217  ac_save_LIBS="$LIBS"
    4212 LIBS="-lMPT $LIBS"
     4218LIBS="-lMPT $MP_LIBS $LIBS"
    42134219cat > conftest.$ac_ext <<EOF
    4214 #line 4215 "configure"
     4220#line 4221 "configure"
    42154221#include "confdefs.h"
    42164222/* Override any gcc2 internal prototype to avoid an error.  */
    42174223/* We use char because int might match the return type of a gcc2
    42184224    builtin and then its argument prototype would still apply.  */
    4219 char MPT_GetTre();
     4225char MPT_GetTree();
    42204226
    42214227int main() {
    4222 MPT_GetTre()
     4228MPT_GetTree()
    42234229; return 0; }
    42244230EOF
    4225 if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4231if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    42264232  rm -rf conftest*
    42274233  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42504256fi
    42514257
     4258LIBS=$SAVE_LIBS
    42524259echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
    4253 echo "configure:4254: checking for atof in -lsingcf" >&5
     4260echo "configure:4261: checking for atof in -lsingcf" >&5
    42544261ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
    42554262if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    42594266LIBS="-lsingcf  $LIBS"
    42604267cat > conftest.$ac_ext <<EOF
    4261 #line 4262 "configure"
     4268#line 4269 "configure"
    42624269#include "confdefs.h"
    42634270/* Override any gcc2 internal prototype to avoid an error.  */
     
    42704277; return 0; }
    42714278EOF
    4272 if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4279if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    42734280  rm -rf conftest*
    42744281  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42984305
    42994306echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
    4300 echo "configure:4301: checking for atof in -lsingfac" >&5
     4307echo "configure:4308: checking for atof in -lsingfac" >&5
    43014308ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
    43024309if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    43064313LIBS="-lsingfac  $LIBS"
    43074314cat > conftest.$ac_ext <<EOF
    4308 #line 4309 "configure"
     4315#line 4316 "configure"
    43094316#include "confdefs.h"
    43104317/* Override any gcc2 internal prototype to avoid an error.  */
     
    43174324; return 0; }
    43184325EOF
    4319 if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4326if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    43204327  rm -rf conftest*
    43214328  eval "ac_cv_lib_$ac_lib_var=yes"
     
    43454352
    43464353echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
    4347 echo "configure:4348: checking for omTestAddr in -lomalloc" >&5
     4354echo "configure:4355: checking for omTestAddr in -lomalloc" >&5
    43484355ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
    43494356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    43534360LIBS="-lomalloc  $LIBS"
    43544361cat > conftest.$ac_ext <<EOF
    4355 #line 4356 "configure"
     4362#line 4363 "configure"
    43564363#include "confdefs.h"
    43574364/* Override any gcc2 internal prototype to avoid an error.  */
     
    43644371; return 0; }
    43654372EOF
    4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4373if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    43674374  rm -rf conftest*
    43684375  eval "ac_cv_lib_$ac_lib_var=yes"
     
    43924399
    43934400echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
    4394 echo "configure:4395: checking for main in -lomalloc_ndebug" >&5
     4401echo "configure:4402: checking for main in -lomalloc_ndebug" >&5
    43954402ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
    43964403if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    44004407LIBS="-lomalloc_ndebug  $LIBS"
    44014408cat > conftest.$ac_ext <<EOF
    4402 #line 4403 "configure"
     4409#line 4410 "configure"
    44034410#include "confdefs.h"
    44044411
     
    44074414; return 0; }
    44084415EOF
    4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4416if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    44104417  rm -rf conftest*
    44114418  eval "ac_cv_lib_$ac_lib_var=yes"
     
    44394446ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    44404447echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    4441 echo "configure:4442: checking for $ac_hdr" >&5
     4448echo "configure:4449: checking for $ac_hdr" >&5
    44424449if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    44434450  echo $ac_n "(cached) $ac_c" 1>&6
    44444451else
    44454452  cat > conftest.$ac_ext <<EOF
    4446 #line 4447 "configure"
     4453#line 4454 "configure"
    44474454#include "confdefs.h"
    44484455#include <$ac_hdr>
    44494456EOF
    44504457ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    4451 { (eval echo configure:4452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     4458{ (eval echo configure:4459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    44524459ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    44534460if test -z "$ac_err"; then
     
    45184525
    45194526echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
    4520 echo "configure:4521: checking which apint package to use" >&5
     4527echo "configure:4528: checking which apint package to use" >&5
    45214528if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
    45224529  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
     
    45604567#
    45614568echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
    4562 echo "configure:4563: checking whether to have MP" >&5
     4569echo "configure:4570: checking whether to have MP" >&5
    45634570if test "${with_MP}" != yes && test "${with_MP}" != no; then
    45644571  if (test "${will_have_gmp}" = yes) && \
     
    45694576EOF
    45704577
    4571     NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     4578    HAVE_MPSR=1
     4579    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
    45724580  else
    45734581    echo "$ac_t""no" 1>&6
     
    45814589EOF
    45824590
    4583     NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     4591    HAVE_MPSR=1
     4592    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
    45844593  else
    45854594    echo "$ac_t""no" 1>&6
     
    45904599fi
    45914600
     4601
     4602
    45924603echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
    4593 echo "configure:4594: checking whether to have factory" >&5
     4604echo "configure:4605: checking whether to have factory" >&5
    45944605if test "${with_factory}" != yes && test "${with_factory}" != no; then
    45954606  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
     
    46224633
    46234634echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
    4624 echo "configure:4625: checking whether to have libfac" >&5
     4635echo "configure:4636: checking whether to have libfac" >&5
    46254636if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
    46264637  if (test "${will_have_factory}" = yes) && \
     
    46564667
    46574668echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
    4658 echo "configure:4659: checking whether to have dbm links" >&5
     4669echo "configure:4670: checking whether to have dbm links" >&5
    46594670if test "$with_dbm" != no; then
    46604671  cat >> confdefs.h <<\EOF
     
    46684679
    46694680echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
    4670 echo "configure:4671: checking whether to have namespaces" >&5
     4681echo "configure:4682: checking whether to have namespaces" >&5
    46714682if test "$with_namespaces" != yes; then
    46724683  echo "$ac_t""no" 1>&6
     
    46804691
    46814692echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
    4682 echo "configure:4683: checking whether to have dynamic modules" >&5
     4693echo "configure:4694: checking whether to have dynamic modules" >&5
    46834694if test "$with_dynamic_modules" != yes || test "$ac_have_dl" != yes; then
    46844695  echo "$ac_t""no" 1>&6
     
    46924703
    46934704echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
    4694 echo "configure:4695: checking whether to have dynamic kernel" >&5
     4705echo "configure:4706: checking whether to have dynamic kernel" >&5
    46954706if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
    46964707  DL_KERNEL=1
     
    47004711
    47014712echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
    4702 echo "configure:4703: checking whether to have Plural" >&5
     4713echo "configure:4714: checking whether to have Plural" >&5
    47034714if test "$with_plural" != yes; then
    47044715  echo "$ac_t""no" 1>&6
     
    48804891s%@ALLOCA@%$ALLOCA%g
    48814892s%@CXXCPP@%$CXXCPP%g
     4893s%@HAVE_MPSR@%$HAVE_MPSR%g
     4894s%@MP_LIBS@%$MP_LIBS%g
    48824895s%@NEED_LIBS@%$NEED_LIBS%g
    48834896s%@DL_KERNEL@%$DL_KERNEL%g
  • Singular/configure.in

    r52ea3f r6b32990  
    250250# lib checks
    251251AC_CHECK_LIB(m, atof)
     252SAVE_LIBS=${LIBS}
     253LIBS=
    252254AC_CHECK_LIB(bsd, socket)
    253255AC_CHECK_LIB(socket, listen)
    254256AC_CHECK_LIB(nsl, gethostbyname)
    255257AC_CHECK_LIB(ucb, index)
     258MP_LIBS=${LIBS}
     259LIBS=
    256260
    257261# check for dl lib
     
    279283AC_SUBST(SFLAGS)
    280284AC_SUBST(SLDFLAGS)
     285LIBS=${SAVE_LIBS}
    281286
    282287# heder file checks
     
    453458
    454459# readline
    455 if test "$with_readline" = dynamic && test "$ac_cv_have_dl" != yes; then
     460if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
    456461  AC_MSG_WARN(can not build dynamic readline without dynamic linking)
    457462  with_readline=static
     
    559564AC_CHECK_LIB(gmp, main)
    560565if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then
    561   LIBS=NEED_LIBS
     566  LIBS=${NEED_LIBS}
    562567fi
    563568AC_CHECK_LIB(smallgmp, main)
    564 AC_CHECK_LIB(MP, IMP_PutGmpInt)
    565 AC_CHECK_LIB(MPT, MPT_GetTre)
     569SAVE_LIBS=$LIBS
     570AC_CHECK_LIB(MP, IMP_PutGmpInt,,,$MP_LIBS)
     571AC_CHECK_LIB(MPT, MPT_GetTree,,,$MP_LIBS)
     572LIBS=$SAVE_LIBS
    566573AC_CHECK_LIB(singcf, atof)
    567574AC_CHECK_LIB(singfac, atof)
     
    656663    AC_MSG_RESULT(yes)
    657664    AC_DEFINE(HAVE_MPSR)
    658     NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     665    HAVE_MPSR=1
     666    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
    659667  else
    660668    AC_MSG_RESULT(no)
     
    665673    AC_MSG_RESULT(yes)
    666674    AC_DEFINE(HAVE_MPSR)
    667     NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
     675    HAVE_MPSR=1
     676    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
    668677  else
    669678    AC_MSG_RESULT(no)
     
    673682  AC_MSG_RESULT(no)
    674683fi
     684AC_SUBST(HAVE_MPSR)
     685AC_SUBST(MP_LIBS)
    675686
    676687AC_MSG_CHECKING(whether to have factory)
  • Singular/extra.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.151 2000-12-07 15:42:30 obachman Exp $ */
     4/* $Id: extra.cc,v 1.152 2000-12-12 08:44:43 obachman Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    7878
    7979#include "silink.h"
    80 #ifdef HAVE_MPSR
    81 #include "mpsr.h"
    82 #include "MPT_GP.h"
    83 #endif
    8480#include "walk.h"
    8581
     
    10891085    else
    10901086#endif
    1091 /*==================== gp =================*/
    1092 #ifdef HAVE_MPSR
    1093     if (strcmp(sys_cmd, "gp") == 0)
    1094     {
    1095       if (h->Typ() != LINK_CMD)
    1096       {
    1097         WerrorS("No Link arg");
    1098         return FALSE;
    1099       }
    1100       si_link l = (si_link) h->Data();
    1101       if (strcmp(l->m->type, "MPfile") != 0)
    1102       {
    1103         WerrorS("No MPfile link");
    1104         return TRUE;
    1105       }
    1106       if( ! SI_LINK_R_OPEN_P(l)) // open r ?
    1107       {
    1108         if (slOpen(l, SI_LINK_READ)) return TRUE;
    1109       }
    1110 
    1111       MP_Link_pt link = (MP_Link_pt) l->data;
    1112       if (MP_InitMsg(link) != MP_Success)
    1113       {
    1114         WerrorS("Can not Init");
    1115       }
    1116       MPT_Tree_pt tree = NULL;
    1117       if (MPT_GetTree(link, &tree) != MPT_Success)
    1118       {
    1119         WerrorS("Can not get tree");
    1120         return TRUE;
    1121       }
    1122       MPT_GP_pt gp_tree = MPT_GetGP(tree);
    1123       if (gp_tree == NULL || ! gp_tree->IsOk(gp_tree))
    1124       {
    1125         WerrorS("gp error");
    1126         return TRUE;
    1127       }
    1128       delete gp_tree;
    1129       MPT_DeleteTree(tree);
    1130       return FALSE;
    1131     }
    1132     else
    1133 #endif
    11341087/*==================== sdb_flags =================*/
    11351088    if (strcmp(sys_cmd, "sdb_flags") == 0)
  • Singular/hilb.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: hilb.cc,v 1.16 2000-11-08 15:34:55 obachman Exp $ */
     4/* $Id: hilb.cc,v 1.17 2000-12-12 08:44:44 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Hilbert series
     
    223223  }
    224224  if (wdegree == NULL)
    225     hWeight();
     225  {
     226    // hWeight();
     227  }
    226228  else
    227229    hWDegree(wdegree);
  • Singular/ideals.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.116 2000-12-06 11:03:10 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.117 2000-12-12 08:44:44 obachman Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    22982298  //pChangeRing(pVariables,currRing->OrdSgn,ord,block0,block1,wv);
    22992299  rChangeCurrRing(&tmpR);
    2300   currRing = &tmpR;
    23012300  h = idInit(IDELEMS(h1),h1->rank);
    23022301  // fetch data from the old ring
  • Singular/khstd.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: khstd.cc,v 1.12 2000-11-08 15:34:57 obachman Exp $ */
     4/* $Id: khstd.cc,v 1.13 2000-12-12 08:44:45 obachman Exp $ */
    55/*
    66* ABSTRACT:utils for hilbert driven kStd
     
    1616#include "kstd1.h"
    1717#include "khstd.h"
     18
    1819
    1920/*2
     
    5152    // then pFDeg == degp == kHomModDeg (see kStd)
    5253    if ((degp!=kModDeg) && (degp!=kHomModDeg)) degp=pTotaldegree;
     54    // degp = pWDegree;
    5355    l = hilb->length()-1;
    5456    mw = (*hilb)[l];
  • Singular/kstd1.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.68 2000-11-28 11:50:52 obachman Exp $ */
     4/* $Id: kstd1.cc,v 1.69 2000-12-12 08:44:45 obachman Exp $ */
    55/*
    66* ABSTRACT:
     
    1010// #define NO_LDEG
    1111
    12 // define if buckets should be use
    13 #define MORA_USE_BUCKETS
     12// define if buckets should be used
     13// #define MORA_USE_BUCKETS
     14
     15// define if tailrings should be used
     16// #define HAVE_TAIL_RING
    1417
    1518#include "mod2.h"
     
    204207                                        strat->T[i].length < li))
    205208            &&
    206             pLmShortDivisibleBy(strat->T[i].p, strat->sevT[i], h->p, ~h->sev))
     209            p_LmShortDivisibleBy(strat->T[i].GetLmTailRing(), strat->sevT[i], h->GetLmTailRing(), ~h->sev, strat->tailRing))
    207210#else
    208211          j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h, i);
     
    475478      if (H.p==NULL) return NULL;
    476479    }
    477     if (pLmShortDivisibleBy(strat->T[j].p, strat->sevT[j], H.p, not_sev))
     480    if (p_LmShortDivisibleBy(strat->T[j].GetLmTailRing(), strat->sevT[j], H.GetLmTailRing(), not_sev, strat->tailRing))
    478481    {
    479482      //if (strat->interpt) test_int_std(strat->kIdeal);
     
    11061109  strat->use_buckets = kMoraUseBucket(strat);
    11071110  /*- compute-------------------------------------------*/
     1111
     1112#ifdef HAVE_TAIL_RING
     1113  kStratInitChangeTailRing(strat);
     1114#endif 
     1115 
    11081116  while (strat->Ll >= 0)
    11091117  {
     
    15221530long kModDeg(poly p, ring r)
    15231531{
    1524   long o=pWDegree(p, r);
     1532  // Hmm obachman: on 1-2, this is pTotalDegree
     1533  // I think that I had changed this to pWDegree sometime in 10/2000
     1534  // However, this breaks eliminate, etc
     1535  // long o=pWDegree(p, r);
     1536  long o=pTotaldegree(p, r);
    15251537  long i=p_GetComp(p, r);
    15261538  if (i==0) return o;
  • Singular/kstd2.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.65 2000-12-07 15:03:55 obachman Exp $ */
     4/* $Id: kstd2.cc,v 1.66 2000-12-12 08:44:46 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    647647      strat->enterS(strat->P, pos, strat, strat->tl);
    648648      if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
     649//      Print("[%d]",hilbeledeg);
    649650      if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);
    650651      if (strat->sl>srmax) srmax = strat->sl;
  • Singular/kutil.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.81 2000-11-28 11:50:53 obachman Exp $ */
     4/* $Id: kutil.cc,v 1.82 2000-12-12 08:44:46 obachman Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    2020#define KDEBUG 2
    2121#endif
     22
    2223// define if enterL, enterT should use memmove instead of doing it manually
    23 // on topgun, this is slightly faster (see monodromy_l.tst)
     24// on topgun, this is slightly faster (see monodromy_l.tst, homog_gonnet.sing)
    2425#define ENTER_USE_MEMMOVE
     26
     27// define, if the my_memmove inlines should be used instead of
     28// system memmove -- it does not seem to pay off, though
     29// #define ENTER_USE_MYMEMMOVE
    2530
    2631#include "tok.h"
     
    4449#endif
    4550
     51#ifdef ENTER_USE_MYMEMMOVE
     52inline void _my_memmove_d_gt_s(unsigned long* d, unsigned long* s, long l)
     53{
     54  register unsigned long* _dl = (unsigned long*) d;
     55  register unsigned long* _sl = (unsigned long*) s;
     56  register long _i = l - 1;
     57
     58  do
     59  {
     60    _dl[_i] = _sl[_i];
     61    _i--;
     62  }
     63  while (_i >= 0);
     64}
     65
     66inline void _my_memmove_d_lt_s(unsigned long* d, unsigned long* s, long l)
     67{
     68  register long _ll = l;
     69  register unsigned long* _dl = (unsigned long*) d;
     70  register unsigned long* _sl = (unsigned long*) s;
     71  register long _i = 0;
     72
     73  do
     74  {
     75    _dl[_i] = _sl[_i];
     76    _i++;
     77  }
     78  while (_i < _ll);
     79}
     80
     81inline void _my_memmove(void* d, void* s, long l)
     82{
     83  unsigned long _d = (unsigned long) d;
     84  unsigned long _s = (unsigned long) s;
     85  unsigned long _l = ((l) + SIZEOF_LONG - 1) >> LOG_SIZEOF_LONG;
     86
     87  if (_d > _s) _my_memmove_d_gt_s(_d, _s, _l);
     88  else _my_memmove_d_lt_s(_d, _s, _l);
     89}
     90
     91#undef memmove
     92#define memmove(d,s,l) _my_memmove(d, s, l)
     93#endif
     94
    4695
    4796static poly redMora (poly h,int maxIndex,kStrategy strat);
     
    427476}
    428477
     478int kFindInT(poly p, kStrategy strat)
     479{
     480  int i;
     481  do
     482  {
     483    i = kFindInT(p, strat->T, strat->tl);
     484    if (i >= 0) return i;
     485    strat = strat->next;
     486  }
     487  while (strat != NULL);
     488  return -1;
     489}
     490 
    429491#ifdef KDEBUG
    430492
     
    750812void deleteInL (LSet set, int *length, int j,kStrategy strat)
    751813{
    752   int i;
    753 
    754814  if (set[j].lcm!=NULL)
    755815    pLmFree(set[j].lcm);
     
    764824    {
    765825      // search p in T, if it is there, do not delete it
    766       int i=strat->tl;
    767       poly p=set[j].p;
    768       if (p!=NULL)
    769       loop
    770       {
    771         if (i < 0)
    772         {
    773           if (strat->next!=NULL)
    774           {
    775             strat=strat->next;
    776             i=strat->tl;
    777           }
    778           else
    779           {
    780             /* not found : */
    781             if (set[j].bucket != NULL)
    782             {
    783               kBucketDeleteAndDestroy(&set[j].bucket);
    784               pNext(p) = NULL;
    785               if (set[j].t_p != NULL) pNext(set[j].t_p) = NULL;
    786             }
    787             if (set[j].t_p != NULL)
    788             {
    789               p_Delete(&(set[j].t_p), set[j].tailRing);
    790               p_LmFree(p, currRing);
    791             }
    792             else
    793             {
    794               pDelete(&p);
    795             }
    796             break;
    797           }
    798         }
    799         else
    800         {
    801           if (strat->T[i].p==p)
    802           {
    803             /* found : */
    804             p=NULL;
    805             break;
    806           }
    807           i--;
    808         }
    809       }
    810     }
    811     set[j].p=NULL;
    812   }
    813   if ((*length)>0)
    814   {
     826      if (pOrdSgn != -1 || kFindInT(set[j].p, strat) < 0)
     827      {
     828        // assure that for global ordereings kFindInT fails
     829        assume(pOrdSgn == -1 || kFindInT(set[j].p, strat) < 0);
     830        set[j].Delete();
     831      }
     832    }
     833  }
     834  if (*length > 0 && j < *length)
     835  {
     836#ifdef ENTER_USE_MEMMOVE
     837    memmove(&(set[j]), &(set[j+1]), (*length - j)*sizeof(LObject));
     838#else   
     839    int i;
    815840    for (i=j; i < (*length); i++)
    816841      set[i] = set[i+1];
     842#endif
    817843  }
    818844#ifdef KDEBUG
     
    40584084                                  // Hmmm .. the condition pFDeg == pDeg
    40594085                                  // might be too strong
    4060                                   (strat->homog && pFDeg == pDeg),
     4086                                  (strat->homog && pFDeg == pDeg && pOrdSgn == 1),
    40614087                                  !strat->ak,
    40624088                                  expbound);
  • Singular/misc.cc

    r52ea3f r6b32990  
    106106  memset(&sLastPrinted,0,sizeof(sleftv));
    107107  sLastPrinted.rtyp=NONE;
    108 #ifdef HAVE_MPSR
    109   extern void mpsr_Init();
    110   mpsr_Init();
    111 #endif
    112108  return t;
    113109}
  • Singular/mod2.h.in

    r52ea3f r6b32990  
    66 *          DO NOT EDIT!
    77 *
    8  *  Version: $Id: mod2.h.in,v 1.94 2000-12-07 15:03:56 obachman Exp $
     8 *  Version: $Id: mod2.h.in,v 1.95 2000-12-12 08:44:47 obachman Exp $
    99 *******************************************************************/
    1010#ifndef MOD2_H
     
    312312#endif
    313313
     314/* define LINKAGE to "extern C" if compiling for shared libs */
     315#ifndef LINKAGE
     316#if defined(PIC)
     317#define LINKAGE extern "C"
     318#else
     319#define LINKAGE
     320#endif
     321#endif
     322
    314323
    315324/*******************************************************************
  • Singular/mod_raw.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mod_raw.cc,v 1.9 2000-12-07 15:03:57 obachman Exp $ */
     4/* $Id: mod_raw.cc,v 1.10 2000-12-12 08:44:48 obachman Exp $ */
    55/*
    66 * ABSTRACT: machine depend code for dynamic modules
     
    1212*/
    1313
     14#include <stdio.h>
     15
    1416#include "mod2.h"
    1517#include "static.h"
     
    3638#endif
    3739
    38 void* dynl_open_binary_warn(char* binary_name)
     40void* dynl_open_binary_warn(char* binary_name, const char* msg)
    3941{
    4042  void* handle = NULL;
     
    5052      Warn("Could not open dynamic library: %s", path_name);
    5153      Warn("Error message from system: %s", dynl_error());
    52       Warn("Singular will work properly, but much slower.");
     54      if (msg != NULL) Warn("%s", msg);
    5355      Warn("See the INSTALL section in the Singular manual for details.");
    5456      warn_handle = TRUE;
     
    5860}
    5961
    60 void* dynl_sym_warn(void* handle, char* proc)
     62void* dynl_sym_warn(void* handle, char* proc, const char* msg)
    6163{
    6264  void *proc_ptr = NULL;
     
    6870      Warn("Could load a procedure from a dynamic library");
    6971      Warn("Error message from system: %s", dynl_error());
    70       Warn("Singular will work properly, but much slower.");
     72      if (msg != NULL) Warn("%s", msg);
    7173      Warn("See the INSTALL section in the Singular manual for details.");
    7274      warn_proc = TRUE;
     
    8385#include <dlfcn.h>
    8486
     87static void* kernel_handle = NULL;
    8588void *dynl_open(
    8689  char *filename    /* I: filename to load */
     
    9295void *dynl_sym(void *handle, char *symbol)
    9396{
     97  if (handle == DYNL_KERNEL_HANDLE)
     98  {
     99    if (kernel_handle == NULL)
     100      kernel_handle = dynl_open(NULL);
     101    handle = kernel_handle;
     102  }
    94103  return(dlsym(handle, symbol));
    95104}
  • Singular/mod_raw.h

    r52ea3f r6b32990  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: mod_raw.h,v 1.5 2000-12-07 15:03:57 obachman Exp $ */
     6/* $Id: mod_raw.h,v 1.6 2000-12-12 08:44:48 obachman Exp $ */
    77/*
    88 * ABSTRACT: machine depend code for dynamic modules
     
    1515
    1616#if defined(HAVE_DL)
    17 void* dynl_open_binary_warn(char* binary_name);
    18 void* dynl_sym_warn(void* handle, char* proc);
     17
     18void* dynl_open_binary_warn(char* binary_name, const char* msg = NULL);
     19void* dynl_sym_warn(void* handle, char* proc, const char* msg = NULL);
    1920
    2021void *       dynl_open(char *filename);
     22// if handle == DYNL_KERNEL_HANDLE, then symbol is searched for
     23// in kernel of program
     24#define DYNL_KERNEL_HANDLE ((void*) 0x1)
    2125void *       dynl_sym(void *handle, char *symbol);
    2226int          dynl_close (void *handle);
  • Singular/mpsr_GetMisc.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mpsr_GetMisc.cc,v 1.23 2000-12-06 11:03:22 Singular Exp $ */
     4/* $Id: mpsr_GetMisc.cc,v 1.24 2000-12-12 08:44:48 obachman Exp $ */
    55
    66/***************************************************************
     
    444444#include "mmalloc.h"
    445445
    446 void mpsr_Init()
    447 {
     446static int mpsr_is_initialized = 0;
     447
     448LINKAGE void mpsr_Init()
     449{
     450  if (mpsr_is_initialized) return;
    448451#ifndef EXTERNAL_MALLOC_H
    449452  // memory management functions of MP (and MPT)
  • Singular/mpsr_Tok.cc

    r52ea3f r6b32990  
    33****************************************/
    44
    5 /* $Id: mpsr_Tok.cc,v 1.26 2000-05-16 08:50:49 Singular Exp $ */
     5/* $Id: mpsr_Tok.cc,v 1.27 2000-12-12 08:44:48 obachman Exp $ */
    66
    77/***************************************************************
     
    8888  }
    8989  else
    90     return mpsr_SetError(mpsr_UnknownSingularToken);
     90    return mpsr_UnknownSingularToken;
    9191}
    9292
     
    9797
    9898  if (sr_dict == MAX_SR_DICT)
    99     return mpsr_SetError(mpsr_UnknownDictionary);
     99    return mpsr_UnknownDictionary;
    100100
    101101  tok = mp2tok[sr_dict][cop];
    102102  if (tok == MAX_TOK)
    103     return mpsr_SetError(mpsr_UnkownOperator);
     103    return mpsr_UnkownOperator;
    104104
    105105  *o_tok = tok;
  • Singular/mpsr_sl.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sing_mp.cc,v 1.34 2000-11-21 15:35:46 Singular Exp $ */
    5 
    6 /*
    7 * ABSTRACT: interface to MP links
    8 */
     4/***************************************************************
     5 *  File:    mpsr_sl.cc
     6 *  Purpose: implementation of sl_link routines for MP
     7 *  Author:  obachman (Olaf Bachmann)
     8 *  Created: 12/00
     9 *  Version: $Id: mpsr_sl.cc,v 1.1 2000-12-12 08:44:49 obachman Exp $
     10 *******************************************************************/
    911
    1012#include "mod2.h"
     
    2426#include "feOpt.h"
    2527
     28
    2629static int Batch_ReadEval(si_link silink);
    2730
     
    3437#endif
    3538
    36 MP_Env_pt mp_Env = NULL;
     39static MP_Env_pt mp_Env = NULL;
    3740
    3841/* =============== general utilities ====================================== */
     
    106109 *
    107110 ***************************************************************/
    108 static BOOLEAN slOpenMPFile(si_link l, short flag)
     111LINKAGE BOOLEAN slOpenMPFile(si_link l, short flag)
    109112{
    110113  char *argv[] = {"--MPtransp", "FILE", "--MPmode", "append",
     
    166169 ***************************************************************/
    167170
    168 static MP_Link_pt slOpenMPConnect(int n_argc, char **n_argv)
     171LINKAGE MP_Link_pt slOpenMPConnect(int n_argc, char **n_argv)
    169172{
    170173  char *argv[] = {"--MPtransp", "TCP", "--MPmode", "connect", "--MPport",
     
    187190}
    188191
    189 static MP_Link_pt slOpenMPListen(int n_argc, char **n_argv)
     192LINKAGE MP_Link_pt slOpenMPListen(int n_argc, char **n_argv)
    190193{
    191194  char *argv[] = {"--MPtransp", "TCP", "--MPmode", "listen",
     
    200203}
    201204
    202 static MP_Link_pt slOpenMPLaunch(int n_argc, char **n_argv)
     205MP_Link_pt slOpenMPLaunch(int n_argc, char **n_argv)
    203206{
    204207  char *argv[] = {"--MPtransp", "TCP", "--MPmode", "launch",
     
    249252}
    250253
    251 static MP_Link_pt slOpenMPFork(si_link l, int n_argc, char **n_argv)
     254LINKAGE MP_Link_pt slOpenMPFork(si_link l, int n_argc, char **n_argv)
    252255{
    253256  MP_Link_pt link = NULL;
     
    288291
    289292
    290 static BOOLEAN slOpenMPTcp(si_link l, short flag)
     293LINKAGE BOOLEAN slOpenMPTcp(si_link l, short flag)
    291294{
    292295  MP_Link_pt link = NULL;
     
    336339 ***************************************************************/
    337340
    338 static BOOLEAN slWriteMP(si_link l, leftv v)
     341LINKAGE BOOLEAN slWriteMP(si_link l, leftv v)
    339342{
    340343  leftv next = (v != NULL ? v->next : (leftv) NULL);
     
    367370}
    368371
    369 leftv slReadMP(si_link l)
     372LINKAGE leftv slReadMP(si_link l)
    370373{
    371374  leftv v = NULL;
     
    390393}
    391394
    392 static BOOLEAN slCloseMP(si_link l)
     395LINKAGE BOOLEAN slCloseMP(si_link l)
    393396{
    394397  if ((strcmp(l->mode, "launch") == 0 || strcmp(l->mode, "fork") == 0) &&
     
    400403}
    401404
    402 static BOOLEAN slKillMP(si_link l)
     405LINKAGE BOOLEAN slKillMP(si_link l)
    403406{
    404407  MP_KillLink((MP_Link_pt) l->data);
     
    407410}
    408411
    409 static BOOLEAN slDumpMP(si_link l)
     412LINKAGE BOOLEAN slDumpMP(si_link l)
    410413{
    411414  mpsr_ClearError();
     
    419422}
    420423
    421 static BOOLEAN slGetDumpMP(si_link l)
     424LINKAGE BOOLEAN slGetDumpMP(si_link l)
    422425{
    423426  mpsr_ClearError();
     
    431434}
    432435
    433 static char* slStatusMP(si_link l, char* request)
     436LINKAGE char* slStatusMP(si_link l, char* request)
    434437{
    435438  if (strcmp(request, "read") == 0)
     
    456459 ***************************************************************/
    457460
    458 int Batch_ReadEval(si_link silink)
     461static int Batch_ReadEval(si_link silink)
    459462{
    460463  leftv v = NULL;
     
    502505
    503506
    504 int Batch_do(const char* port, const char* host)
     507LINKAGE int Batch_do(const char* port, const char* host)
    505508{
    506509#ifdef MPSR_BATCH_DEBUG
     
    540543  return Batch_ReadEval(silink);
    541544}
    542 
    543 /***************************************************************
    544  *
    545  * MP link Extension inits
    546  *
    547  ***************************************************************/
    548 
    549 void slInitMPFileExtension(si_link_extension s)
    550 {
    551   s->Open=slOpenMPFile;
    552   s->Close=slCloseMP;
    553   s->Close=slKillMP;
    554   s->Read=slReadMP;
    555   //s->Read2=NULL;
    556   s->Dump=slDumpMP;
    557   s->GetDump=slGetDumpMP;
    558   s->Write=slWriteMP;
    559   s->Status=slStatusMP;
    560   s->type="MPfile";
    561 }
    562 
    563 void slInitMPTcpExtension(si_link_extension s)
    564 {
    565   s->Open=slOpenMPTcp;
    566   s->Close=slCloseMP;
    567   s->Kill=slKillMP;
    568   s->Read=slReadMP;
    569   //s->Read2=NULL;
    570   s->Dump=slDumpMP;
    571   s->GetDump=slGetDumpMP;
    572   s->Write=slWriteMP;
    573   s->Status=slStatusMP;
    574   s->type="MPtcp";
    575 }
    576545#endif
  • Singular/p_Procs_Dynamic.cc

    r52ea3f r6b32990  
    66 *  Purpose: source for dynamically loaded version of p_Procs
    77 *  Author:  obachman (Olaf Bachmann)
    8  *  Created: 8/00
    9  *  Version: $Id: p_Procs_Dynamic.cc,v 1.1 2000-12-07 15:03:59 obachman Exp $
     8 *  Created: 12/00
     9 *  Version: $Id: p_Procs_Dynamic.cc,v 1.2 2000-12-12 08:44:49 obachman Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    2323BOOLEAN p_procs_dynamic = TRUE;
    2424
    25 // no external linkage
    26 #define LINKAGE
     25#define WARN_MSG "Singular will work properly, but much slower."
     26
     27// need external linkage, so that dynl_sym works
     28#undef LINKAGE
     29#define LINKAGE extern "C"
     30#define p_Procs_Kernel
    2731#include "p_Procs_Dynamic.inc"
    2832
     
    3539#define MAX_PROCNAME_LEN 200
    3640
    37 static void* p_procs_handle = NULL;
    38 void InitSetDynamicProcs()
    39 {
    40   if (p_procs_handle == NULL)
    41     p_procs_handle =  dynl_open_binary_warn("p_Procs");
    42 }
    43 #define InitSetProcs(f, l, o) InitSetDynamicProcs()
    44 
    45 
    46 void* GetGeneralProc(p_Proc proc)
     41static void* p_procs_handle_FieldIndep = NULL;
     42static void* p_procs_handle_FieldZp = NULL;
     43static void* p_procs_handle_FieldQ = NULL;
     44static void* p_procs_handle_FieldGeneral = NULL;
     45
     46static void* p_ProcInitHandle(void** handle, const char* module)
     47{
     48  if (*handle == NULL)
     49  {
     50    char name[25];
     51    sprintf(name, "p_Procs_%s", module);
     52    *handle = dynl_open_binary_warn(name, WARN_MSG);
     53  }
     54  return *handle;
     55}
     56
     57static inline void* p_ProcGetHandle(p_Proc proc, p_Field field)
     58{
     59  const char* module =  p_ProcField_2_Module(proc, field);
     60 
     61  if (strcmp(module, "FieldIndep") == 0)
     62    return p_ProcInitHandle(&p_procs_handle_FieldIndep, module);
     63  else if (strcmp(module, "FieldZp") == 0)
     64    return p_ProcInitHandle(&p_procs_handle_FieldZp, module);
     65  else if (strcmp(module, "FieldQ") == 0)
     66    return p_ProcInitHandle(&p_procs_handle_FieldQ, module);
     67  else if (strcmp(module, "FieldGeneral") == 0)
     68    return p_ProcInitHandle(&p_procs_handle_FieldGeneral, module);
     69  else
     70  {
     71    assume(0);
     72    return NULL;
     73  }
     74}
     75
     76 
     77#define InitSetProcs(f, l, o) ((void)0)
     78
     79static void* GetGeneralProc(p_Proc proc)
    4780{
    4881  switch(proc)
     
    86119#include "omalloc.h"
    87120
    88 char* GetGeneralProcName(p_Proc proc)
     121static char* GetGeneralProcName(p_Proc proc)
    89122{
    90123  switch(proc)
     
    123156  return "p_Unknown_Proc";
    124157}
    125 char* GetDynamicProcName(const char* proc_s, p_Proc proc,
    126                          p_Field field, p_Length length, p_Ord ord)
     158#endif
     159
     160
     161static void* GetDynamicProc(const char* proc_s, p_Proc proc,
     162                            p_Field field, p_Length length, p_Ord ord
     163#ifdef RDEBUG
     164                     , int get_name = 0
     165#endif
     166                     )
    127167{
    128168  void* proc_ptr = NULL;
    129169  char proc_name[MAX_PROCNAME_LEN];
    130  
    131   if (p_procs_handle != NULL &&
    132       (field != FieldGeneral || length != LengthGeneral || ord != OrdGeneral))
    133   {
    134     sprintf(proc_name, "%s__%s_%s_%s", proc_s,
    135             p_FieldEnum_2_String(field),
    136             p_LengthEnum_2_String(length),
    137             p_OrdEnum_2_String(ord));
    138     proc_ptr = dynl_sym_warn(p_procs_handle, proc_name);
    139     if (proc_ptr != NULL)
     170  sprintf(proc_name, "%s__%s_%s_%s", proc_s,
     171          p_FieldEnum_2_String(field),
     172          p_LengthEnum_2_String(length),
     173          p_OrdEnum_2_String(ord));
     174  // first, try to get the proc from the kernel
     175  proc_ptr = dynl_sym(DYNL_KERNEL_HANDLE, proc_name);
     176  if (proc_ptr == NULL)
     177  {
     178    proc_ptr = dynl_sym_warn(p_ProcGetHandle(proc, field), proc_name, WARN_MSG);
     179    // last but not least use general proc
     180    if (proc_ptr == NULL)
    140181    {
    141       char* name = omStrDup(proc_name);
    142       omMarkAsStaticAddr(name);
    143       return name;
     182      proc_ptr = GetGeneralProc(proc);
     183#ifdef RDEBUG
     184      sprintf(proc_name, GetGeneralProcName(proc));
     185#endif     
    144186    }
    145187  }
    146   return GetGeneralProcName(proc);
    147 }
    148  
    149 #endif
    150 
    151 
    152 void* GetDynamicProc(const char* proc_s, p_Proc proc,
    153                      p_Field field, p_Length length, p_Ord ord)
    154 {
    155   void* proc_ptr = NULL;
    156  
    157   if (p_procs_handle != NULL &&
    158       (field != FieldGeneral || length != LengthGeneral || ord != OrdGeneral))
    159   {
    160     char proc_name[MAX_PROCNAME_LEN];
    161     sprintf(proc_name, "%s__%s_%s_%s", proc_s,
    162             p_FieldEnum_2_String(field),
    163             p_LengthEnum_2_String(length),
    164             p_OrdEnum_2_String(ord));
    165     proc_ptr = dynl_sym(p_procs_handle, proc_name);
    166   }
    167   if (proc_ptr == NULL)
    168     proc_ptr = GetGeneralProc(proc);
    169 
     188#ifdef RDEBUG
     189  if (get_name)
     190  {
     191    char* name = omStrDup(proc_name);
     192    omMarkAsStaticAddr(name);
     193    return (void*) name;
     194  }
     195#endif
    170196  return  proc_ptr;
    171197}
     
    182208  if (set_names)                                                    \
    183209    _p_procs->what = (what##_Proc_Ptr)                              \
    184        GetDynamicProcName(#what,  what##_Proc, field, length, ord); \
     210       GetDynamicProc(#what,  what##_Proc, field, length, ord, 1); \
    185211  else                                                              \
    186212    DoReallySetProc(what, field, length, ord);                      \
  • Singular/p_Procs_Dynamic.h

    r52ea3f r6b32990  
    77 *  Purpose: Configuration for p_Procs as dynamic library procedures
    88 *  Author:  obachman (Olaf Bachmann)
    9  *  Created: 8/00
    10  *  Version: $Id: p_Procs_Dynamic.h,v 1.2 2000-12-07 18:17:22 obachman Exp $
     9 *  Created: 12/00
     10 *  Version: $Id: p_Procs_Dynamic.h,v 1.3 2000-12-12 08:44:49 obachman Exp $
    1111 *******************************************************************/
    1212
     
    1515
    1616// see p_Procs_Impl.h for an explaination of these defines
    17 #define HAVE_FAST_P_PROCS   2
    18 #define HAVE_FAST_FIELD     3
     17#define HAVE_FAST_P_PROCS   5
     18#define HAVE_FAST_FIELD     2
    1919#define HAVE_FAST_LENGTH 4
    2020#define HAVE_FAST_ORD 4
    21 #define HAVE_FAST_ZERO_ORD 0
     21#define HAVE_FAST_ZERO_ORD 2
     22
     23// for the configuration of what goes into the kenel and what into
     24// shared libs, see p_Procs_Generate.cc:IsKernelProc(...)
    2225
    2326#endif // P_PROCS_DYNAMC_H
  • Singular/p_Procs_Generate.cc

    r52ea3f r6b32990  
    88 *  Author:  obachman (Olaf Bachmann)
    99 *  Created: 8/00
    10  *  Version: $Id: p_Procs_Generate.cc,v 1.1 2000-12-07 15:04:00 obachman Exp $
     10 *  Version: $Id: p_Procs_Generate.cc,v 1.2 2000-12-12 08:44:50 obachman Exp $
    1111 *******************************************************************/
    1212
     
    2020#ifdef p_Procs_Static
    2121#include "p_Procs_Static.h"
    22 #elif defined(p_Procs_Dynamic) || defined(p_Procs_Lib)
     22#else
    2323#include "p_Procs_Dynamic.h"
    2424#endif
    2525
    2626#include "p_Procs_Impl.h"
     27
     28#ifndef p_Procs_Static
     29int FieldGeneralProcs = 0,
     30  FieldIndepProcs = 0,
     31  FieldZpProcs = 0,
     32  FieldQProcs = 0,
     33  KernelProcs = 0,
     34  UnknownProcs = 0;
     35
     36// returns 1, if proc should go into kernel, 0 otherwise
     37int IsKernelProc(p_Proc proc, p_Field field, p_Length length, p_Ord ord)
     38{
     39  // general procs go into kernel
     40  if (field == FieldGeneral && length == LengthGeneral && ord == OrdGeneral)
     41    return 1;
     42 
     43  // plus procs with FieldZp
     44  if (field == FieldZp &&
     45      // which are not general in length or ord
     46      !((length == LengthGeneral && p_ProcDependsOn_Length(proc)) ||
     47        (ord == OrdGeneral && p_ProcDependsOn_Ord(proc))) &&
     48      // and whose length is smaller than five
     49      (!p_ProcDependsOn_Length(proc) || (length >= LengthFour)))
     50    return 1;
     51 
     52  return 0;
     53}
     54
     55#endif
    2756
    2857#define DoSetProc(what, field, length, ord) \
     
    5887             
    5988  (generated_p_procs[proc])[index(proc, field, length, ord)] = s_full_proc_name;
    60  
    6189  // define all macros
    6290  printf("\n// definition of %s\n", s_full_proc_name);
     91#ifndef p_Procs_Static
     92  if (IsKernelProc(proc, field, length, ord))
     93  {
     94    KernelProcs++;
     95    printf("#ifdef p_Procs_Kernel\n");
     96  }
     97  else
     98  {
     99    const char* module = p_ProcField_2_Module(proc, field);
     100    if (strcmp(module, "FieldGeneral") == 0)
     101      FieldGeneralProcs++;
     102    else if (strcmp(module, "FieldIndep") == 0)
     103      FieldIndepProcs++;
     104    else if (strcmp(module, "FieldZp") == 0)
     105      FieldZpProcs++;
     106    else if (strcmp(module, "FieldQ") == 0)
     107      FieldQProcs++;
     108    else
     109      UnknownProcs++;
     110
     111    printf("#ifdef p_Procs_%s\n", module);
     112  }
     113#endif 
    63114  i = 0;
    64115  while (macros_field[i] != NULL)
     
    107158  printf("#include \"%s__Template.cc\"\n", s_what);
    108159  printf("#undef %s\n", s_what);
     160#ifndef p_Procs_Static
     161  printf("#endif // p_Procs_[Kernel|Field*]\n");
     162#endif
    109163}
    110164
    111165void GenerateProc(const char* s_what, p_Proc proc, p_Field field, p_Length length, p_Ord ord)
    112166{
    113   if (
    114 #ifdef p_Procs_Lib
    115     (field != FieldGeneral || length != LengthGeneral || ord != OrdGeneral) &&
    116 #endif
    117     ! AlreadyHaveProc(proc, field, length, ord))
     167  if (! AlreadyHaveProc(proc, field, length, ord))
    118168    AddProc(s_what, proc, field, length, ord);
    119169}
     
    134184 *               %s
    135185 * See the end for a summary.
    136  *******************************************************************/
    137 
    138 #define %s\n\n",
    139 #ifdef p_Procs_Dynamic
    140          "p_Procs_Dynamic", "p_Procs_Dynamic"
    141 #elif defined(p_Procs_Static)
    142          "p_Procs_Static", "p_Procs_Static"
     186 *******************************************************************/\n",
     187
     188#if defined(p_Procs_Static)
     189         "p_Procs_Static"
    143190#else
    144          "p_Procs_Lib", "p_Procs_Lib"
     191         "p_Procs_Dynamic"
    145192#endif
    146193         );
     
    153200  }
    154201
    155 // only need FieldGeneral_LengthGeneral_OrdGeneral for p_Procs_Dynamic
    156 #ifndef p_Procs_Dynamic 
    157202  // set default procs
    158203  for (field = 0; field < (int) FieldUnknown; field++)
     
    162207      for (ord=0; ord < (int)OrdUnknown; ord++)
    163208      {
    164 #endif
    165209        if (IsValidSpec((p_Field) field, (p_Length) length, (p_Ord) ord))
    166210            SetProcs((p_Field) field, (p_Length) length, (p_Ord) ord);
    167 #ifndef p_Procs_Dynamic
    168211      }
    169212    }
    170213  }
    171 #endif
    172214
    173215// we only need lookup tables for p_Procs_Static
     
    229271 *   HAVE_FAST_ZERO_ORD = %d
    230272 *   
    231  *   Generated PolyProcs= %d
    232  *
    233  *******************************************************************/\n",
    234          HAVE_FAST_P_PROCS, HAVE_FAST_FIELD, HAVE_FAST_LENGTH, HAVE_FAST_ORD, HAVE_FAST_ZERO_ORD,
    235          NumberOfHaveProcs);
    236 }
    237 
    238 
     273 *   Generated PolyProcs= %d\n",
     274         HAVE_FAST_P_PROCS, HAVE_FAST_FIELD, HAVE_FAST_LENGTH, HAVE_FAST_ORD,
     275         HAVE_FAST_ZERO_ORD, NumberOfHaveProcs);
     276
     277#ifndef p_Procs_Static
     278  printf(" *
     279 * KernelProcs          = %d
     280 * FieldIndepProcs      = %d
     281 * FieldZpProcs         = %d
     282 * FieldQProcs          = %d
     283 * FieldGeneralProcs    = %d
     284 * FieldUnknownProcs    = %d\n",
     285         KernelProcs, FieldIndepProcs, FieldZpProcs,FieldQProcs,
     286         FieldGeneralProcs, UnknownProcs);
     287#endif 
     288
     289  printf(" *
     290 *******************************************************************/\n");
     291}
     292
     293
  • Singular/p_Procs_Impl.h

    r52ea3f r6b32990  
    66 *  Purpose: implementation of primitive procs for polys
    77 *  Author:  obachman (Olaf Bachmann)
    8  *  Created: 8/00
    9  *  Version: $Id: p_Procs_Impl.h,v 1.1 2000-12-07 15:04:00 obachman Exp $
     8 *  Created: 12/00
     9 *  Version: $Id: p_Procs_Impl.h,v 1.2 2000-12-12 08:44:50 obachman Exp $
    1010 *******************************************************************/
    1111#ifndef P_PROCS_IMPL_H
     
    102102
    103103// If you add/remove things from here, also remeber to adjust the
    104 // respective *_2_String 
     104// respective *_2_String
    105105typedef enum p_Field
    106106{
    107107  FieldGeneral = 0,
    108108  FieldZp,         
     109  FieldQ,
    109110  FieldR,
    110111  FieldGF,
    111   FieldQ,
    112112#if HAVE_MORE_FIELDS_IMPLEMENTED
    113113  FieldLong_R,
     
    199199      case FieldGeneral: return "FieldGeneral";
    200200      case FieldZp: return "FieldZp";         
     201      case FieldQ: return "FieldQ";
    201202      case FieldR: return "FieldR";
    202203      case FieldGF: return "FieldGF";
    203       case FieldQ: return "FieldQ";
    204204#if HAVE_MORE_FIELDS_IMPLEMENTED
    205205      case FieldLong_R: return "FieldLong_R";
     
    284284}
    285285
     286static inline int p_ProcDependsOn_Field(p_Proc proc)
     287{
     288  if (proc == p_ShallowCopyDelete_Proc ||
     289      proc == p_Merge_q_Proc)
     290    return 0;
     291  return 1;
     292}
     293
     294static inline int p_ProcDependsOn_Ord(p_Proc proc)
     295{
     296  switch(proc)
     297  {
     298      case p_Add_q_Proc:
     299      case p_Minus_mm_Mult_qq_Proc:
     300      case pp_Mult_mm_Noether_Proc:
     301      case p_kBucketSetLm_Proc:
     302      case p_Merge_q_Proc:
     303        return 1;
     304       
     305      default:
     306        return 0;
     307  }
     308}
     309
     310static inline int p_ProcDependsOn_Length(p_Proc proc)
     311{
     312  switch(proc)
     313  {
     314      case p_Delete_Proc:
     315      case p_Mult_nn_Proc:
     316      case p_Neg_Proc:
     317        return 0;
     318       
     319      default:
     320        return 1;
     321  }
     322}
     323 
     324// returns string specifying the module into which the p_Proc
     325// should go
     326static inline const char* p_ProcField_2_Module(p_Proc proc,  p_Field field)
     327{
     328  if (! p_ProcDependsOn_Field(proc))
     329    return "FieldIndep";
     330  else
     331  {
     332    if (field > FieldQ) field = FieldGeneral;
     333    return p_FieldEnum_2_String(field);
     334  }
     335}
     336
    286337/***************************************************************
    287338 * 
     
    454505        break;
    455506       
    456       case p_kBucketSetLm_Proc:
    457       {
    458         if (field != FieldZp)
    459         {
    460           field = FieldGeneral;
    461           length = LengthGeneral;
    462           ord = OrdGeneral;
    463           return;
    464         }
    465       }
    466 
    467507      default: break;
    468508  }
  • Singular/p_Procs_Lib.cc

    r52ea3f r6b32990  
    66 *  Purpose: source for shared library of p_Procs
    77 *  Author:  obachman (Olaf Bachmann)
    8  *  Created: 8/00
    9  *  Version: $Id: p_Procs_Lib.cc,v 1.1 2000-12-07 15:06:39 obachman Exp $
     8 *  Created: 12/00
     9 *  Version: $Id: p_Procs_Lib.cc,v 1.2 2000-12-12 08:44:50 obachman Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    2020#include "kbuckets.h"
    2121
    22 #define LINKAGE extern "C"
     22#include "p_Procs_Dynamic.inc"
    2323
    24 #include "p_Procs_Lib.inc"
    25 
  • Singular/p_Procs_Set.h

    r52ea3f r6b32990  
    1111 *           have to be defined before this file is included
    1212 *  Author:  obachman (Olaf Bachmann)
    13  *  Created: 8/00
    14  *  Version: $Id: p_Procs_Set.h,v 1.1 2000-12-07 15:04:00 obachman Exp $
     13 *  Created: 12/00
     14 *  Version: $Id: p_Procs_Set.h,v 1.2 2000-12-12 08:44:50 obachman Exp $
    1515 *******************************************************************/
    1616
  • Singular/p_Procs_Static.cc

    r52ea3f r6b32990  
    66 *  Purpose: source for static version of p_Procs
    77 *  Author:  obachman (Olaf Bachmann)
    8  *  Created: 8/00
    9  *  Version: $Id: p_Procs_Static.cc,v 1.1 2000-12-07 15:04:01 obachman Exp $
     8 *  Created: 12/00
     9 *  Version: $Id: p_Procs_Static.cc,v 1.2 2000-12-12 08:44:50 obachman Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    2222BOOLEAN p_procs_dynamic = FALSE;
    2323
    24 #define LINKAGE
    2524#include "p_Procs_Static.inc"
    2625
  • Singular/p_Procs_Static.h

    r52ea3f r6b32990  
    66 *  Purpose: Configuration for static p_Procs
    77 *  Author:  obachman (Olaf Bachmann)
    8  *  Created: 8/00
    9  *  Version: $Id: p_Procs_Static.h,v 1.1 2000-12-07 15:04:01 obachman Exp $
     8 *  Created: 12/00
     9 *  Version: $Id: p_Procs_Static.h,v 1.2 2000-12-12 08:44:51 obachman Exp $
    1010 *******************************************************************/
    1111
  • Singular/p_kBucketSetLm__Template.cc

    r52ea3f r6b32990  
    66 *  Purpose: template for setting the Lm of a bucket
    77 *  Author:  obachman (Olaf Bachmann)
    8  *  Created: 8/00
    9  *  Version: $Id: p_kBucketSetLm__Template.cc,v 1.3 2000-12-07 15:04:01 obachman Exp $
     8 *  Created: 12/00
     9 *  Version: $Id: p_kBucketSetLm__Template.cc,v 1.4 2000-12-12 08:44:51 obachman Exp $
    1010 *******************************************************************/
    1111
  • Singular/ring.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.148 2000-12-07 15:04:02 obachman Exp $ */
     4/* $Id: ring.cc,v 1.149 2000-12-12 08:44:51 obachman Exp $ */
    55
    66/*
     
    671671  int nblocks=rBlocks(r);
    672672
    673   omCheckAddrSize(r,sizeof(ip_sring));
     673  // omCheckAddrSize(r,sizeof(ip_sring));
    674674  omCheckAddrSize(r->order,nblocks*sizeof(int));
    675675  omCheckAddrSize(r->block0,nblocks*sizeof(int));
     
    677677  omCheckAddrSize(r->wvhdl,nblocks*sizeof(int_ptr));
    678678  omCheckAddrSize(r->names,r->N*sizeof(char_ptr));
     679
    679680
    680681  nblocks--;
  • Singular/silink.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: silink.cc,v 1.37 2000-12-06 11:03:29 Singular Exp $ */
     4/* $Id: silink.cc,v 1.38 2000-12-12 08:44:52 obachman Exp $ */
    55
    66/*
     
    3535static BOOLEAN DumpQring(FILE *fd, idhdl h, char *type_str);
    3636static BOOLEAN DumpAsciiMaps(FILE *fd, idhdl h, idhdl rhdl);
     37static si_link_extension slTypeInit(si_link_extension s, const char* type);
    3738
    3839/* ====================================================================== */
     
    8384  {
    8485    si_link_extension s = si_link_root;
    85 
    86     while (s != NULL && (strcmp(s->type, type) != 0)) s = s->next;
     86    si_link_extension prev = s;
     87
     88    while (strcmp(s->type, type) != 0)
     89    {
     90      if (s->next == NULL)
     91      {
     92        prev = s;
     93        s = NULL;
     94        break;
     95      }
     96      else
     97      {
     98        s = s->next;
     99      }
     100    }
    87101
    88102    if (s != NULL)
     
    90104    else
    91105    {
    92       Warn("Found unknown link type: %s", type);
    93       Warn("Use default link type: %s", si_link_root->type);
    94       l->m = si_link_root;
     106      l->m = slTypeInit(prev, type);
    95107    }
    96108    omFree(type);
     
    99111    l->m = si_link_root;
    100112
     113  if (l->m == NULL) return TRUE;
     114 
    101115  l->name = (name != NULL ? name : omStrDup(""));
    102116  l->mode = (mode != NULL ? mode : omStrDup(""));
     
    809823/*------------Initialization at Start-up time------------------------*/
    810824
     825#include "slInit.h"
     826
     827static si_link_extension slTypeInit(si_link_extension s, const char* type)
     828{
     829  assume(s != NULL);
     830  s->next = NULL;
     831  si_link_extension ns = (si_link_extension)omAlloc0Bin(s_si_link_extension_bin);
     832 
     833#ifdef HAVE_MPSR
     834  if (strcmp(type, "MPfile") == 0)
     835    s->next = slInitMPFileExtension(ns);
     836  else if (strcmp(type, "MPtcp") == 0)
     837    s->next = slInitMPTcpExtension(ns);
    811838#ifdef HAVE_DBM
    812 #include "sing_dbm.h"
    813 #endif
    814 
    815 #ifdef HAVE_MPSR
    816 #include "sing_mp.h"
    817 #endif
     839  else
     840#endif
     841#endif
     842#ifdef HAVE_DBM
     843  if (strcmp(type, "DBM") == 0)
     844    s->next = slInitDBMExtension(ns);
     845#endif
     846#if defined(HAVE_DBM) || defined(HAVE_MPSR)
     847  else
     848#endif
     849  {
     850    Warn("Found unknown link type: %s", type);
     851    Warn("Use default link type: %s", si_link_root->type);
     852    omFreeBin(ns, s_si_link_extension_bin);
     853    return si_link_root;
     854  }
     855 
     856  if (s->next == NULL)
     857  {
     858    Werror("Can not initialize link type %s", type);
     859    omFreeBin(ns, s_si_link_extension_bin);
     860    return NULL;
     861  }
     862  return s->next;
     863}
    818864
    819865void slStandardInit()
     
    832878  si_link_root->type="ASCII";
    833879  s = si_link_root;
    834 #ifdef HAVE_DBM
    835 #ifndef HAVE_MODULE_DBM
    836   s->next = (si_link_extension)omAlloc0Bin(s_si_link_extension_bin);
    837   s = s->next;
    838   slInitDBMExtension(s);
    839 #endif
    840 #endif
    841 #ifdef HAVE_MPSR
    842   s->next = (si_link_extension)omAlloc0Bin(s_si_link_extension_bin);
    843   s = s->next;
    844   slInitMPFileExtension(s);
    845   s->next = (si_link_extension)omAlloc0Bin(s_si_link_extension_bin);
    846   s = s->next;
    847   slInitMPTcpExtension(s);
    848 #endif
    849 }
     880  s->next = NULL;
     881}
  • Singular/silink.h

    r52ea3f r6b32990  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: silink.h,v 1.14 2000-08-14 12:56:49 obachman Exp $ */
     6/* $Id: silink.h,v 1.15 2000-12-12 08:44:53 obachman Exp $ */
    77/*
    88* ABSTRACT: general interface to links
     
    4747};
    4848
    49 BOOLEAN slExtend(si_link_extension s);
    50 
    5149// flags:
    5250#define SI_LINK_CLOSE   0
     
    8583  return l;
    8684}
     85
     86#include "omalloc.h"
    8787inline char* slString(si_link l)
    8888{
  • Singular/sing_dbm.cc

    r52ea3f r6b32990  
    55//**************************************************************************/
    66//
    7 // $Id: sing_dbm.cc,v 1.14 2000-09-18 09:19:33 obachman Exp $
     7// $Id: sing_dbm.cc,v 1.15 2000-12-12 08:44:53 obachman Exp $
    88//
    99//**************************************************************************/
     
    3636
    3737//**************************************************************************/
    38 BOOLEAN dbOpen(si_link l, short flag)
     38LINKAGE BOOLEAN dbOpen(si_link l, short flag)
    3939{
    4040  char *mode = "r";
     
    7373
    7474//**************************************************************************/
    75 BOOLEAN dbClose(si_link l)
     75LINKAGE BOOLEAN dbClose(si_link l)
    7676{
    7777  DBM_info *db = (DBM_info *)l->data;
     
    8686//**************************************************************************/
    8787static datum d_value;
    88 leftv dbRead2(si_link l, leftv key)
     88LINKAGE leftv dbRead2(si_link l, leftv key)
    8989{
    9090  DBM_info *db = (DBM_info *)l->data;
     
    132132  return v;
    133133}
    134 leftv dbRead1(si_link l)
     134LINKAGE leftv dbRead1(si_link l)
    135135{
    136136  return dbRead2(l,NULL);
    137137}
    138138//**************************************************************************/
    139 BOOLEAN dbWrite(si_link l, leftv key)
     139LINKAGE BOOLEAN dbWrite(si_link l, leftv key)
    140140{
    141141  DBM_info *db = (DBM_info *)l->data;
     
    205205//}
    206206//**************************************************************************/
    207 si_link_extension slInitDBMExtension(si_link_extension s)
    208 {
    209   s->Open=dbOpen;
    210   s->Close=dbClose;
    211   s->Kill=dbClose;
    212   s->Read=dbRead1;
    213   s->Read2=dbRead2;
    214   s->Write=dbWrite;
    215   //s->Dump=NULL;
    216   //s->GetDump=NULL;
    217   //s->Status=dbStatus;
    218   s->Status=slStatusAscii;
    219   s->type="DBM";
    220   return s;
    221 }
     207
    222208#endif /* HAVE_DBM */
  • Singular/tesths.cc

    r52ea3f r6b32990  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: tesths.cc,v 1.82 2000-09-18 09:19:38 obachman Exp $ */
     4/* $Id: tesths.cc,v 1.83 2000-12-12 08:44:55 obachman Exp $ */
    55
    66/*
     
    3030#include "distrib.h"
    3131#include "version.h"
     32#include "slInit.h"
    3233
    3334#ifdef HAVE_FACTORY
     
    213214  {
    214215#ifdef HAVE_MPSR
    215     extern int Batch_do(const char* port, const char* host);
    216     return Batch_do((char*) feOptValue(FE_OPT_MPPORT),
    217                     (char*) feOptValue(FE_OPT_MPHOST));
     216    BatchDoProc batch_do = slInitMPBatchDo();
     217    if (batch_do != NULL)
     218      return (*batch_do)((char*) feOptValue(FE_OPT_MPPORT),
     219                         (char*) feOptValue(FE_OPT_MPHOST));
     220    else
     221      return 1;
    218222#else
    219223    assume(0);
Note: See TracChangeset for help on using the changeset viewer.