Changeset d1df84 in git


Ignore:
Timestamp:
Jun 2, 2014, 11:05:05 AM (9 years ago)
Author:
Jakob Kröker <kroeker@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
f0c04483fc85bda32ad578ef2d17303bc3bb3d7b
Parents:
7835f61d17a89c6f9e24dcc0904db0042ade03fc68e8ddfaf4c44baab2c1a43c6fa8f1d9a2002746
Message:
Merge branch 'spielwiese' into add.assume.in.primdec.lib
Files:
6 added
3 deleted
42 edited
18 moved

Legend:

Unmodified
Added
Removed
  • HOWTO-libsingular

    r7835f61 rd1df84  
    11The following is valid for Singular 4-x-x:
     2(for technical details see http://www.singular.uni-kl.de/Manual/modules.pdf)
    23
    34./configure --disable-static ....
  • Makefile.am

    r7835f61 rd1df84  
    66
    77SUBDIRS = resources omalloc xalloc $(USE_FACTORY) \
    8 libpolys kernel gfanlib \
    9 IntegerProgramming Singular dox \
    10 emacs debian redhat desktop
     8libpolys gfanlib IntegerProgramming \
     9kernel Singular \
     10dox emacs debian redhat desktop
    1111
    1212EXTRA_DIST = README autogen.sh git-version-gen
  • Singular/LIB/modular.lib

    r7835f61 rd1df84  
    3232SEE ALSO:  link, tasks_lib, parallel_lib, modstd_lib, assprimeszerodim_lib
    3333
    34 KEYWORDS:  modular.lib; Modular techniques; Parallelization;
     34KEYWORDS:  modular_lib; Modular techniques; Parallelization;
    3535           Skeletons for parallelization; Distributed computing
    3636
     
    6161NOTE:     For the general algorithm and the role of the optional arguments
    6262          primeTest, deleteUnluckyPrimes, pTest, and finalTest, see
    63           @ref{modStd} and the reference given in @ref{modular.lib}. The
     63          @ref{modStd} and the reference given in @ref{modular_lib}. The
    6464          default for these arguments is that all tests succeed and that all
    6565          primes are assumed to be lucky.
  • Singular/LIB/primdec.lib

    r68e8dd rd1df84  
    2222    They work in any characteristic.@*
    2323    Baserings must have a global ordering and no quotient ideal.
     24    Exceptions: primdecGTZ, absPrimdecGTZ, minAssGTZ, primdecSY, minAssChar, radical accept non-global ordering.
    2425
    2526
     
    6465"
    6566{
     67  ASSUME(0, not isQuotientRing(basering) ) ;
     68  ASSUME(0, hasGlobalOrdering(basering) ) ;
     69
    6670  int @k;
    6771  ideal inew=std(id);
     
    8993"
    9094{
     95  ASSUME(0, not isQuotientRing(basering) ) ;
     96  ASSUME(0, hasGlobalOrdering(basering) ) ;
    9197  int @k,@i;
    9298  def @P= basering;
     
    154160proc minSat(ideal inew, ideal h)
    155161{
     162  ASSUME(0, not isQuotientRing(basering) ) ;
     163  ASSUME(0, hasGlobalOrdering(basering) ) ;
    156164  int i,k;
    157165  poly f=1;
     
    200208static proc quotMin(list tsil)
    201209{
     210  ASSUME(0, not isQuotientRing(basering) ) ;
     211  ASSUME(0, hasGlobalOrdering(basering) ) ;
    202212  int i,j,k,action;
    203213  ideal verg;
     
    260270static proc testFactor(list act,poly p)
    261271{
     272  ASSUME(0, not isQuotientRing(basering) ) ;
     273  ASSUME(0, hasGlobalOrdering(basering) ) ;
    262274  poly keep=p;
    263275
     
    284296"
    285297{
     298  ASSUME(0, not isQuotientRing(basering) ) ;
     299  ASSUME(0, hasGlobalOrdering(basering) ) ;
    286300  ideal @i;
    287301  list @l;
     
    402416proc primaryTest (ideal i, poly p)
    403417{
     418  ASSUME(0, not isQuotientRing(basering) ) ;
     419  ASSUME(0, hasGlobalOrdering(basering) ) ;
    404420  int m=1;
    405421  int n=nvars(basering);
     
    495511proc gcdTest(ideal act)
    496512{
     513  ASSUME(0, not isQuotientRing(basering) ) ;
     514  ASSUME(0, hasGlobalOrdering(basering) ) ;
    497515  int i,j;
    498516  if(size(act)<=1)
     
    516534static proc splitPrimary(list l,ideal ser,int @wr,list sact)
    517535{
     536  ASSUME(0, not isQuotientRing(basering) ) ;
     537  ASSUME(0, hasGlobalOrdering(basering) ) ;
    518538  int i,j,k,s,r,w;
    519539  list keepresult,act,keepprime;
     
    705725static proc splitCharp(list l)
    706726{
     727  ASSUME(0, not isQuotientRing(basering) ) ;
     728  ASSUME(0, hasGlobalOrdering(basering) ) ;
    707729  if((char(basering)==0)||(npars(basering)>0))
    708730  {
     
    833855"
    834856{
     857  ASSUME(0, not isQuotientRing(basering) ) ;
     858  ASSUME(0, hasGlobalOrdering(basering) ) ;
     859
    835860  def   @P = basering;
    836861  int uytrewq;
     
    12901315proc extF(list l,list #)
    12911316{
     1317  ASSUME(0, not isQuotientRing(basering) ) ;
     1318  ASSUME(0, hasGlobalOrdering(basering) ) ;
    12921319//zero_dimensional primary decomposition after finite field extension
    12931320  def R=basering;
     
    13811408//the radical of the intersection of the pe[l] is equal to the radical of i
    13821409
     1410  ASSUME(0, not isQuotientRing(basering) ) ;
     1411  ASSUME(0, hasGlobalOrdering(basering) ) ;
    13831412  def R=basering;
    13841413
    13851414  //i has to be a reduced groebner basis
     1415  ASSUME(1, dim(i)==0);
    13861416  ideal F=finduni(i);
    13871417
     
    14701500//i.e. var(i)----->var(i)^(p^v[i])
    14711501
     1502  ASSUME(0, not isQuotientRing(basering) ) ;
     1503  ASSUME(0, hasGlobalOrdering(basering) ) ;
    14721504  if(homog(I)==1){return(maxideal(1));}
    14731505
     
    15081540//computes the prime decomposition of the special ideals
    15091541//and transforms it back to a decomposition of i
    1510 
     1542 
     1543  ASSUME(0, not isQuotientRing(basering) ) ;
     1544  ASSUME(0, hasGlobalOrdering(basering) ) ;
    15111545  def R=basering;
    15121546  list pr=zeroSp(i);
     
    15531587"
    15541588{
     1589  ASSUME(0, not isQuotientRing(basering) ) ;
     1590  ASSUME(0, hasGlobalOrdering(basering) ) ;
    15551591  int k,j;
    15561592  poly m;
     
    16301666"
    16311667{
     1668 ASSUME(0, not isQuotientRing(basering) ) ;
     1669  ASSUME(0, hasGlobalOrdering(basering) ) ;
    16321670 int k,j;
    16331671 intvec m,n,v,w;
     
    17541792"
    17551793{
     1794  ASSUME(0, not isQuotientRing(basering) ) ;
     1795  ASSUME(0, hasGlobalOrdering(basering) ) ;
    17561796  int n,k,di;
    17571797  list resu,hilf;
     
    18201860"
    18211861{
     1862  ASSUME(0, not isQuotientRing(basering) ) ;
     1863  ASSUME(0, hasGlobalOrdering(basering) ) ;
    18221864  ideal @ih,@jh;
    18231865  int npar=npars(basering);
     
    18841926"
    18851927{
     1928   ASSUME(0, not isQuotientRing(basering) ) ;
     1929  ASSUME(0, hasGlobalOrdering(basering) ) ;
    18861930   def @P=basering;
    18871931   if(size(i)==0){return(list(ideal(0)));}
     
    20102054static proc primT(ideal i)
    20112055{
     2056   ASSUME(0, not isQuotientRing(basering) ) ;
     2057  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2058
    20122059   //assumes that all generators of i are irreducible
    20132060   //i is standard basis
     
    20372084"
    20382085{
     2086  ASSUME(0, not isQuotientRing(basering) ) ;
     2087  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2088
    20392089  if(size(i) == 0){return(list(ideal(0)));}
    20402090  string algorithm;    // Algorithm to be used
     
    23272377"
    23282378{
     2379
     2380  ASSUME(0, not isQuotientRing(basering) ) ;
    23292381  if(attrib(basering,"global")!=1)
    23302382  {
     
    23332385      );
    23342386  }
     2387  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2388
    23352389  intvec op ;
    23362390  def  P = basering;
     
    24332487"
    24342488{
     2489  ASSUME(0, not isQuotientRing(basering) ) ;
    24352490  if(attrib(basering,"global")!=1)
    24362491  {
     
    24392494      );
    24402495  }
     2496  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2497
    24412498  def  P = basering;
    24422499  ideal eq;
     
    25602617proc algeDeco(ideal i, int w)
    25612618{
     2619   ASSUME(0, not isQuotientRing(basering) ) ;
     2620  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2621
    25622622//reduces primery decomposition over algebraic extensions to
    25632623//the other cases
     
    26802740static proc prepare_absprimdec(list primary)
    26812741{
     2742  ASSUME(0, not isQuotientRing(basering) ) ;
     2743  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2744
    26822745  list resu,tempo;
    26832746  string absotto;
     
    27042767"
    27052768{
     2769  ASSUME(0, not isQuotientRing(basering) ) ;
     2770  ASSUME(0, hasGlobalOrdering(basering) ) ;
     2771
    27062772  intvec op,@vv;
    27072773  def  @P = basering;
     
    36843750//the p^e th power of the coefficients of f
    36853751{
     3752   ASSUME(0, not isQuotientRing(basering) ) ;
     3753  ASSUME(0, hasGlobalOrdering(basering) ) ;
     3754
    36863755   int i;
    36873756   poly g;
     
    37043773 EXAMPLE: example sep; shows an example
    37053774{
     3775   ASSUME(0, not isQuotientRing(basering) ) ;
     3776  ASSUME(0, hasGlobalOrdering(basering) ) ;
     3777
    37063778   def R=basering;
    37073779   int k;
     
    37543826 EXAMPLE: example zeroRad; shows an example
    37553827{
     3828   ASSUME(0, not isQuotientRing(basering) ) ;
     3829  ASSUME(0, hasGlobalOrdering(basering) ) ;
     3830
    37563831   if(homog(I)==1){return(maxideal(1));}
    37573832   //I needs to be a reduced standard basis
     
    37763851
    37773852   option(redSB);
     3853   ASSUME(1, dim(I)==0);
    37783854   ideal F=finduni(I);//F[i] generates I intersected with K[var(i)]
    37793855
     
    38493925"
    38503926{
     3927   ASSUME(0, not isQuotientRing(basering) ) ;
    38513928   if(attrib(basering,"global")!=1)
    38523929   {
     
    38553932      );
    38563933   }
     3934   ASSUME(0, hasGlobalOrdering(basering) ) ;
     3935
    38573936   if((char(basering)<100)&&(char(basering)!=0))
    38583937   {
     
    39524031"
    39534032{
     4033
    39544034  M=prune(M);  //to obtain a small embedding
    39554035  ideal ann=quotient1(M,freemodule(nrows(M)));
     
    39734053static proc int_ass_primary_e(ideal i, int e)
    39744054{
     4055  ASSUME(0, not isQuotientRing(basering) ) ;
     4056  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4057
    39754058  if(homog(i)!=1)
    39764059  {
     
    39934076static proc AnnExt_R(int n,list re)
    39944077{
     4078
    39954079  if(n<nvars(basering))
    39964080  {
     
    40154099static proc analyze(list pr)
    40164100{
     4101   ASSUME(0, not isQuotientRing(basering) ) ;
     4102  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4103
    40174104   int ii,jj;
    40184105   for(ii=1;ii<=size(pr) div 2;ii++)
     
    40454132static proc simplifyIdeal(ideal i)
    40464133{
     4134  ASSUME(0, not isQuotientRing(basering) ) ;
     4135  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4136
    40474137  def r=basering;
    40484138
     
    41494239static proc min_ass_prim_charsets0 (ideal PS)
    41504240{
     4241  ASSUME(0, not isQuotientRing(basering) ) ;
     4242  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4243
    41514244  intvec op;
    41524245  matrix m=char_series(PS);  // We compute an irreducible
     
    42504343static proc min_ass_prim_charsets1 (ideal PS)
    42514344{
     4345  ASSUME(0, not isQuotientRing(basering) ) ;
     4346  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4347
    42524348  intvec op;
    42534349  def oldring=basering;
     
    43894485static proc prim_dec(ideal I, int choose)
    43904486{
     4487  ASSUME(0, not isQuotientRing(basering) ) ;
     4488  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4489
    43914490  if((choose<0) or (choose>3))
    43924491  {
     
    46124711static proc pseudo_prim_dec_charsets (ideal I, ideal SI, int choo)
    46134712{
     4713  ASSUME(0, not isQuotientRing(basering) ) ;
     4714  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4715
    46144716  list L;          // The list of minimal associated primes,
    46154717                   // each one given by a standard basis
     
    46624764static proc pseudo_prim_dec_special_charsets (ideal SI,list V6, int choo)
    46634765{
     4766  ASSUME(0, not isQuotientRing(basering) ) ;
     4767  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4768
    46644769  int i,j,l;
    46654770  list m;
     
    47604865static proc pseudo_prim_dec_i (ideal SI, list L)
    47614866{
     4867  ASSUME(0, not isQuotientRing(basering) ) ;
     4868  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4869
    47624870  list Q;
    47634871  if (size(L)==1)               // one minimal associated prime only
     
    48294937static proc extraction (ideal SI, ideal SP)
    48304938{
     4939  ASSUME(0, not isQuotientRing(basering) ) ;
     4940  ASSUME(0, hasGlobalOrdering(basering) ) ;
     4941
    48314942  list indsets=indepSet(SP,0);
    48324943  poly f;
     
    49345045static proc minsat(ideal SI, poly p)
    49355046{
     5047  ASSUME(0, not isQuotientRing(basering) ) ;
     5048  ASSUME(0, hasGlobalOrdering(basering) ) ;
     5049
    49365050  ideal fac=factorize(p,1);       //the irreducible factors of p
    49375051  fac=sort(fac)[1];
     
    49805094static proc minsat_ppd(ideal SI, ideal fac)
    49815095{
     5096  ASSUME(0, not isQuotientRing(basering) ) ;
     5097  ASSUME(0, hasGlobalOrdering(basering) ) ;
     5098
    49825099  fac=sort(fac)[1];
    49835100  int i,k;
     
    50245141static proc minquot(list tsil)
    50255142{
     5143   ASSUME(0, not isQuotientRing(basering) ) ;
     5144  ASSUME(0, hasGlobalOrdering(basering) ) ;
     5145
    50265146   intvec op;
    50275147   int i,j,k,action;
     
    50945214static proc special_ideals_equal( ideal k1, ideal k2)
    50955215{
     5216   ASSUME(0, not isQuotientRing(basering) ) ;
     5217  ASSUME(0, hasGlobalOrdering(basering) ) ;
     5218
    50965219   int j;
    50975220   if(size(k1)==size(k2))
     
    51615284"
    51625285{
     5286   ASSUME(0, not isQuotientRing(basering) ) ;
    51635287   if(size(#)>0)
    51645288   {
     
    52375361"
    52385362{
     5363  ASSUME(0, not isQuotientRing(basering) ) ;
    52395364  if (char(basering) != 0)
    52405365  {
     
    54055530"
    54065531{
     5532   ASSUME(0, not isQuotientRing(basering) ) ;
    54075533   if(size(#)>1)
    54085534   {
     
    54805606"
    54815607{
     5608   ASSUME(0, not isQuotientRing(basering) ) ;
    54825609   if(size(#)>0)
    54835610   {
     
    55845711"
    55855712{
     5713   ASSUME(0, not isQuotientRing(basering) ) ;
    55865714   if(size(#)>1)
    55875715   {
     
    56375765"
    56385766{
     5767  ASSUME(0, not isQuotientRing(basering) ) ;
    56395768  if(attrib(basering,"global")!=1)
    56405769  {
     
    56435772     );
    56445773  }
     5774  ASSUME(0, hasGlobalOrdering(basering) ) ;
     5775
    56455776  return(radical(i, 1));
    56465777}
     
    56715802"
    56725803{
     5804  ASSUME(0, not isQuotientRing(basering) ) ;
    56735805  dbprint(printlevel - voice, "Radical, version 2006.05.08");
    56745806  if(attrib(basering,"global")!=1)
     
    58545986static proc radicalKL(ideal I, ideal ser, list #)
    58555987{
     5988   ASSUME(0, not isQuotientRing(basering) ) ;
     5989  ASSUME(0, hasGlobalOrdering(basering) ) ;
     5990
    58565991// ideal I     The ideal for which the radical is computed
    58575992// ideal ser   Used to reduce components already obtained
     
    58916026// obtained in intermediate steps.
    58926027{
     6028  ASSUME(0, not isQuotientRing(basering) ) ;
     6029  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6030
    58936031  ideal rad = 1;
    58946032  ideal equiRad = 1;
     
    59736111//                    only equiradical is required.
    59746112//                    It is used to set the value of done.)
     6113  ASSUME(0, not isQuotientRing(basering) ) ;
     6114  ASSUME(0, hasGlobalOrdering(basering) ) ;
    59756115
    59766116  attrib(I, "isSB", 1);   // I needs to be a reduced standard basis
     
    62466386// Output: ideal. Intersection of some primes of I different from the ones in P.
    62476387{
     6388  ASSUME(0, not isQuotientRing(basering) ) ;
     6389  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6390
    62486391  int k = 1;                     // Counter
    62496392  int good  = 0;                 // Checks if an element of P is in rad(I)
     
    63136456"
    63146457{
     6458  ASSUME(0, not isQuotientRing(basering) ) ;
     6459  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6460
    63156461  int n, k, di;
    63166462  list resu, hilf;
     
    64046550"
    64056551{
     6552  ASSUME(0, not isQuotientRing(basering) ) ;
     6553  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6554
    64066555  ideal @ih,@jh;
    64076556  int npar=npars(basering);
     
    64506599"
    64516600{
     6601  ASSUME(0, not isQuotientRing(basering) ) ;
    64526602  if(attrib(basering,"global")!=1)
    64536603  {
     
    64566606      );
    64576607  }
     6608  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6609
    64586610  ideal j=std(i);
    64596611  int cod=nvars(basering)-dim(j);
     
    64986650"
    64996651{
     6652  ASSUME(0, not isQuotientRing(basering) ) ;
    65006653  if(attrib(basering,"global")!=1)
    65016654  {
     
    65046657      );
    65056658  }
     6659  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6660
    65066661  ideal j=groebner(i);
    65076662  int cod=nvars(basering)-dim(j);
     
    65346689"
    65356690{
     6691   ASSUME(0, not isQuotientRing(basering) ) ;
     6692  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6693
    65366694   int i;
    65376695   pr=reconvList(pr);
     
    65666724"
    65676725{
     6726  ASSUME(0, not isQuotientRing(basering) ) ;
    65686727  if(attrib(basering,"global")!=1)
    65696728  {
     
    65726731    );
    65736732  }
     6733  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6734
    65746735  def R=basering;
    65756736  poly q;
     
    66836844"
    66846845{
     6846  ASSUME(0, not isQuotientRing(basering) ) ;
     6847  ASSUME(0, hasGlobalOrdering(basering) ) ;
     6848
    66856849  intvec op,@vv;
    66866850  def  @P = basering;
     
    75857749static proc newReduction(ideal @j, ideal ser, intvec @hilb, intvec @w, int jdim, int abspri, int @wr, list data)
    75867750{
     7751   ASSUME(0, not isQuotientRing(basering) ) ;
     7752  ASSUME(0, hasGlobalOrdering(basering) ) ;
     7753
     7754
    75877755   string @va;
    75887756   string quotring;
     
    78828050// associated primes and the primary components corresponding to these primes.
    78838051{
     8052  ASSUME(0, not isQuotientRing(basering) ) ;
     8053  ASSUME(0, hasGlobalOrdering(basering) ) ;
     8054
    78848055  ideal P = 1;
    78858056  list pd = list();
     
    79228093static proc minAssSLIteration(ideal I, ideal P);
    79238094{
     8095  ASSUME(0, not isQuotientRing(basering) ) ;
     8096  ASSUME(0, hasGlobalOrdering(basering) ) ;
     8097
    79248098  int k = 1;
    79258099  int good  = 0;
     
    79748148"
    79758149{
     8150  ASSUME(0, not isQuotientRing(basering) ) ;
     8151  ASSUME(0, hasGlobalOrdering(basering) ) ;
     8152
    79768153  int n, k, di;
    79778154  list resu, hilf;
     
    80748251"
    80758252{
     8253  ASSUME(0, not isQuotientRing(basering) ) ;
     8254  ASSUME(0, hasGlobalOrdering(basering) ) ;
     8255
    80768256  def   @P = basering;
    80778257  int uytrewq;
  • Singular/Makefile.am

    r7835f61 rd1df84  
    55AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(FACTORY_INCLUDES)  $(GMP_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"'
    66
    7 if HAVE_GFANLIB
    8   USE_GFANLIB = ${builddir}/dyn_modules/callgfanlib/gfanlib.la ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS}
    9 else
    10   USE_GFANLIB =
    11 endif
    12 
    13 # AM_LDFLAGS = libSingular.la ${top_builddir}/kernel/libkernel.la
    14 
    15 ########################### Dynamic Modules... #########################
    167SUBDIRS = dyn_modules
    178
    18 if ENABLE_P_PROCS_DYNAMIC
    19   moduledir = $(libexecdir)/singular/MOD
    20 else !ENABLE_P_PROCS_DYNAMIC
    21   moduledir = $(libdir)/singular
    22 endif !ENABLE_P_PROCS_DYNAMIC
    23 
    24 ##########################################################################
    25 module_LTLIBRARIES = pyobject.la
    26 
    27 pyobject_la_SOURCES = pyobject.cc
    28 
    29 pyobject_la_CXXFLAGS = $(PYTHON_CSPEC)
    30 pyobject_la_CPPFLAGS = $(PYTHON_CPPFLAGS)  ${AM_CPPFLAGS}
    31 
    32 pyobject_la_LDFLAGS = $(PYTHON_EXTRA_LIBS)  $(PYTHON_LSPEC) ${AM_LDFLAGS} $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    33 ###  -export-dynamic -shared -module -avoid-version (add to all DMs?)
    34 
    35 ##########################################################################
    36 if PYTHON_USE
    37   PY=pyobject.la  $(PYTHON_EXTRA_LIBS)  $(PYTHON_LSPEC) $(PYTHON_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS)
    38 else !PYTHON_USE
    39   PY=
    40 endif !PYTHON_USE
    41 
    42 if SI_EMBED_PYTHON
    43  EMBED_PYOBJECT   = ${PY} ${builddir}/dyn_modules/syzextra/syzextra.la ${USE_GFANLIB}
    44 else !SI_EMBED_PYTHON
    45   EMBED_PYOBJECT =
    46 endif !SI_EMBED_PYTHON
     9########################### Possible builtin modules... #########################
     10BUILTIN_FLAGS = ${BUILTIN_LIBS}
    4711
    4812########################### libSingular* #########################
     
    9660   subexpr.cc\
    9761   pyobject_setup.cc\
    98    singmathic.cc\
    9962   walk.cc\
    10063   walk_ip.cc\
     
    161124
    162125libSingular_la_LDFLAGS    =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION} ${PTHREAD_LDFLAGS}
    163 libSingular_la_LIBADD     =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT} ${top_builddir}/kernel/libkernel.la ${PTHREAD_LIBS}
     126libSingular_la_LIBADD     =${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${BUILTIN_FLAGS} ${top_builddir}/kernel/libkernel.la ${PTHREAD_LIBS}
    164127
    165128libSingular_includedir = ${includedir}/singular/Singular
     
    185148########################### Singular* #########################
    186149
    187 EXTRA_PROGRAMS =  libparse Singulars
     150EXTRA_PROGRAMS =  libparse Singulard
    188151
    189152# the "optional_programs" variable should be defined in the configure
     
    197160Singular_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc  utils.h
    198161
    199 Singular_LDADD = libSingular.la ${EMBED_PYOBJECT}
    200 
    201 Singular_LDFLAGS = -static ${EMBED_PYOBJECT}
    202 
    203 Singulars_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc  utils.h
    204 
    205 #  ${EMBED_PYOBJECT_LDFLAGS}  ${EMBED_PYOBJECT_LDFLAGS}
    206 Singulars_LDADD = libSingular.la ${EMBED_PYOBJECT}
    207 
    208 Singulars_LDFLAGS = -static ${AM_LDFLAGS} ${EMBED_PYOBJECT}
     162Singular_LDADD = libSingular.la ${BUILTIN_FLAGS}
     163
     164Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS}
     165
     166Singulard_SOURCES = tesths.cc mmalloc.cc fegetopt.c fegetopt.h utils.cc  utils.h
     167
     168Singulard_LDADD = libSingular.la ${BUILTIN_FLAGS}
     169
     170Singulard_LDFLAGS = -shared ${AM_LDFLAGS} ${BUILTIN_FLAGS}
    209171
    210172scriptdir = $(libexecdir)/singular/MOD
     
    267229
    268230test_SOURCES = test.cc
    269 # ${EMBED_PYOBJECT_LDFLAGS}
    270231test_LDADD = libSingular.la
    271232
  • Singular/dyn_modules/Makefile.am

    r7835f61 rd1df84  
    11ACLOCAL_AMFLAGS = -I ../m4
    22
    3 SUBDIRS=bigintm syzextra callgfanlib callpolymake
     3SUBDIRS=staticdemo bigintm syzextra pyobject gfanlib polymake singmathic
    44
    55
  • Singular/dyn_modules/bigintm/Makefile.am

    r7835f61 rd1df84  
    11ACLOCAL_AMFLAGS = -I ../../m4
    22
    3 # moduledir = $(libexecdir)/singular/MOD
    4 
    5 if ENABLE_P_PROCS_DYNAMIC
     3if SI_BUILTIN_BIGINTM
    64  noinst_LTLIBRARIES=bigintm.la
    75#  check_LTLIBRARIES=bigintm.la
    8  
     6  P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
     7  P_PROCS_MODULE_LDFLAGS  = -module
     8else
     9  module_LTLIBRARIES=bigintm.la
     10  moduledir = $(libexecdir)/singular/MOD
     11  P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
     12  P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
     13  # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    914endif
    1015
     
    1419$(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
    1520
    16 bigintm_la_SOURCES   = mod_main.cc bigintm.cc bigintm.h
    17 
    18 if ENABLE_P_PROCS_DYNAMIC
    19   P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
    20 else
    21   P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
    22 endif
    23 
    24 bigintm_la_CPPFLAGS   = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
    25 
    26 if ENABLE_P_PROCS_DYNAMIC
    27   P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    28   # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    29 else
    30   P_PROCS_MODULE_LDFLAGS =
    31 endif
    32 
    33 bigintm_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS}
     21bigintm_la_SOURCES  = mod_main.cc bigintm.cc bigintm.h
     22bigintm_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
     23bigintm_la_LDFLAGS  = ${P_PROCS_MODULE_LDFLAGS}
    3424
    3525# AM_COLOR_TESTS=always
  • Singular/dyn_modules/bigintm/mod_main.cc

    r7835f61 rd1df84  
    1 /*
    2  * Developer's BB tests
    3  */
     1#include <kernel/mod2.h>
    42
    5 
    6 
    7 
    8 
    9 #include <kernel/mod2.h>
     3#include <Singular/mod_lib.h>
    104
    115#include <Singular/blackbox.h>
     
    4741
    4842
    49 extern "C"
     43extern "C" int SI_MOD_INIT(bigintm)(SModulFunctions* psModulFunctions)
    5044{
    51   int mod_init(SModulFunctions* psModulFunctions)
    52   {
    53     psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0);
    54     psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0);
     45   psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0);
     46   psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0);
    5547
    56     // Q: should we call 'bigintm_setup' here??!?!?
    57     return 0;
    58   }
     48   // Q: should we call 'bigintm_setup' here??!?!?
     49   return 0;
    5950}
  • Singular/dyn_modules/gfanlib/Makefile.am

    r7835f61 rd1df84  
    33SOURCES = bbcone.cc bbcone.h bbfan.cc bbfan.h bbpolytope.cc bbpolytope.h gfan.h gitfan.cc gitfan.h gfanlib.cc
    44
    5 MYINCLUDES =  -I${top_srcdir} -I${top_builddir} \
     5MY_CPPFLAGS =  -I${top_srcdir} -I${top_builddir} \
    66-I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    77${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \
    88${FLINT_CFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS}
    99
    10 if HAVE_GFANLIB
     10if SI_BUILTIN_GFANLIB
     11  noinst_LTLIBRARIES=gfanlib.la
     12##  moduledir = $(libdir)/singular
     13  P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
     14  P_PROCS_MODULE_LDFLAGS  = -module
     15else
    1116  module_LTLIBRARIES=gfanlib.la
    12 endif
    13 
    14 if ENABLE_P_PROCS_DYNAMIC
    1517  moduledir = $(libexecdir)/singular/MOD
    1618  P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
    1719# Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    18 else
    19   moduledir = $(libdir)/singular
    20   P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
     20  P_PROCS_MODULE_LDFLAGS =  -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    2121endif
    2222
    23 P_PROCS_MODULE_LDFLAGS =  -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
     23gfanlib_la_SOURCES  = $(SOURCES)
    2424
    25 gfanlib_la_SOURCES  = $(SOURCES)
    26 gfanlib_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
    27 gfanlib_la_LDFLAGS  = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS}
     25gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON}
     26gfanlib_la_LDFLAGS  = ${P_PROCS_MODULE_LDFLAGS}
    2827
    29 gfanlib_la_LIBADD   = ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS}
    30 
     28if HAVE_GFANLIB
     29 gfanlib_la_LIBADD   = ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS}
     30endif
    3131
    3232#AM_COLOR_TESTS=always
  • Singular/dyn_modules/gfanlib/bbcone.cc

    r7835f61 rd1df84  
    11#include <kernel/mod2.h>
    22
    3 #include <gfanlib/gfanlib.h>
    4 #include <gfanlib/gfanlib_q.h>
    5 
    6 #include <Singular/ipid.h>
    7 #include <Singular/ipshell.h>
    8 #include <Singular/blackbox.h>
     3#if HAVE_GFANLIB
     4
     5#include <bbfan.h>
     6#include <bbpolytope.h>
     7
    98#include <misc/intvec.h>
    109#include <misc/sirandom.h>
     
    1211#include <coeffs/bigintmat.h>
    1312
    14 #include <bbfan.h>
    15 #include <bbpolytope.h>
     13#include <Singular/ipid.h>
     14#include <Singular/ipid.h>
     15#include <Singular/ipshell.h>
     16#include <Singular/blackbox.h>
     17
    1618#include <sstream>
    17 
    18 #include "Singular/ipid.h"
    1919
    2020// #include <omalloc/omalloc.h>
     
    2323// #include <Singular/lists.h>
    2424// #include <Singular/subexpr.h>
     25
     26#include <gfanlib/gfanlib.h>
     27#include <gfanlib/gfanlib_q.h>
     28
    2529
    2630int coneID;
     
    19611965  coneID=setBlackboxStuff(b,"cone");
    19621966}
     1967
     1968#endif
  • Singular/dyn_modules/gfanlib/bbcone.h

    r7835f61 rd1df84  
    44#include <kernel/mod2.h>
    55
    6 #include <gfanlib/gfanlib.h>
     6#if HAVE_GFANLIB
     7
    78#include <misc/intvec.h>
    89#include <coeffs/bigintmat.h>
     10#include <Singular/ipid.h>
    911
    10 #include <Singular/ipid.h>
     12#include <gfanlib/gfanlib.h>
    1113
    1214extern int coneID;
     
    3840
    3941#endif
     42#endif
  • Singular/dyn_modules/gfanlib/bbfan.cc

    r7835f61 rd1df84  
    11#include <kernel/mod2.h>
     2
     3#if HAVE_GFANLIB
    24
    35#include <Singular/ipid.h>
     
    2022// #include <gfanlib/gfanlib.h>
    2123// #include <gfanlib/gfanlib_zfan.h>
    22 
    2324
    2425int fanID;
     
    10621063  //Print("created type %d (fan)\n",fanID);
    10631064}
     1065
     1066#endif
  • Singular/dyn_modules/gfanlib/bbfan.h

    r7835f61 rd1df84  
    44#include <kernel/mod2.h>
    55
     6#if HAVE_GFANLIB
     7
     8#include <Singular/ipid.h>
     9
    610#include <gfanlib/gfanlib.h>
    7 #include <Singular/ipid.h>
    811
    912extern int fanID;
     
    1922
    2023#endif
     24#endif
  • Singular/dyn_modules/gfanlib/bbpolytope.cc

    r7835f61 rd1df84  
    11#include <kernel/mod2.h>
    22
    3 #include <gfanlib/gfanlib.h>
    4 #include <gfanlib/gfanlib_q.h>
     3#if HAVE_GFANLIB
    54
    65#include <Singular/ipid.h>
     
    2019// #include <kernel/ring.h>
    2120// #include <kernel/polys.h>
     21
     22#include <gfanlib/gfanlib.h>
     23#include <gfanlib/gfanlib_q.h>
    2224
    2325int polytopeID;
     
    489491  //Print("created type %d (polytope)\n",polytopeID);
    490492}
     493
     494#endif
  • Singular/dyn_modules/gfanlib/bbpolytope.h

    r7835f61 rd1df84  
    44#include <kernel/mod2.h>
    55
     6#if HAVE_GFANLIB
     7
     8#include <Singular/ipid.h>
    69#include <gfanlib/gfanlib.h>
    7 #include <Singular/ipid.h>
    810
    911extern int polytopeID;
     
    1820
    1921#endif
     22#endif
  • Singular/dyn_modules/gfanlib/gfan.cc

    r7835f61 rd1df84  
    66
    77#include <kernel/mod2.h>
     8
     9#if HAVE_GFANLIB
    810
    911#include <misc/options.h>
     
    45264528//     WerrorS("Need wp ordering");
    45274529// }
     4530
     4531#endif
  • Singular/dyn_modules/gfanlib/gfan.h

    r7835f61 rd1df84  
    66#ifndef GFAN_H
    77#define GFAN_H
     8
     9#include <kernel/mod2.h>
     10
     11#if HAVE_GFANLIB
    812
    913#include <misc/int64vec.h>
     
    278282// bool iv64isStrictlyPositive(int64vec *);
    279283#endif
     284#endif
  • Singular/dyn_modules/gfanlib/gfanlib.cc

    r7835f61 rd1df84  
     1#include <kernel/mod2.h>
    12
    2 
    3 
    4 
    5 #include <kernel/mod2.h>
     3#if HAVE_GFANLIB
    64
    75#include <bbcone.h>
     
    1311#include <Singular/mod_lib.h>
    1412
     13
    1514template class gfan::Vector<gfan::Integer>;
    1615template class gfan::Vector<gfan::Rational>;
     
    1817template class gfan::Matrix<gfan::Rational>;
    1918
    20 int SI_MOD_INIT(gfanlib)(SModulFunctions* p)
     19extern "C" int SI_MOD_INIT(gfanlib)(SModulFunctions* p)
    2120{
    2221  bbcone_setup(p);
     
    2726}
    2827
    29 #ifndef EMBED_PYTHON
    30 extern "C"
    31 {
    32 int mod_init(SModulFunctions* psModulFunctions)
    33 {
    34   return SI_MOD_INIT(gfanlib)(psModulFunctions);
    35 }
    36 }
    3728#endif
  • Singular/dyn_modules/gfanlib/gitfan.cc

    r7835f61 rd1df84  
    1212#include <kernel/mod2.h>
    1313
     14#if HAVE_GFANLIB
     15
     16#include <bbcone.h>
     17#include <bbfan.h>
     18#include <gitfan.h>
     19
    1420#include <Singular/ipid.h>
    1521#include <Singular/lists.h>
    1622#include <Singular/ipshell.h>
     23
    1724#include <coeffs/bigintmat.h>
    1825
    19 #include <bbcone.h>
    20 #include <bbfan.h>
    21 #include <gitfan.h>
    2226
    2327namespace gitfan
     
    370374  p->iiAddCproc("","nextAfaceToCheck",FALSE,nextAfaceToCheck);
    371375}
     376
     377#endif
  • Singular/dyn_modules/gfanlib/gitfan.h

    r7835f61 rd1df84  
    44#include <kernel/mod2.h>
    55
     6#if HAVE_GFANLIB
     7
    68#include <bbcone.h>
    79#include <bbfan.h>
     10
    811#include <Singular/ipid.h>
     12
    913
    1014namespace gitfan
     
    5155
    5256void gitfan_setup(SModulFunctions* p);
     57#endif
    5358
    5459#endif
  • Singular/dyn_modules/polymake/polymake_conversion.cc

    r7835f61 rd1df84  
     1#include <kernel/mod2.h>
     2
     3#ifdef HAVE_POLYMAKE
     4
    15#include <gmpxx.h>
    26
     
    1216#include <gfanlib/gfanlib_q.h>
    1317
    14 #include <kernel/mod2.h>
    1518#include <misc/intvec.h>
    1619#include <coeffs/numbers.h>
     
    518521  return pf;
    519522}
     523
     524#endif
  • Singular/dyn_modules/polymake/polymake_conversion.h

    r7835f61 rd1df84  
    33
    44#include <kernel/mod2.h>
     5
     6#ifdef HAVE_POLYMAKE
    57
    68#include <gmpxx.h>
     
    6769
    6870#endif
     71#endif
  • Singular/dyn_modules/polymake/polymake_documentation.cc

    r7835f61 rd1df84  
     1#include <kernel/mod2.h>
     2
     3#ifdef HAVE_POLYMAKE
     4
     5/*
     6#include <polymake_conversion.h>
     7
     8#include <Singular/dyn_modules/gfanlib/bbcone.h>
     9#include <Singular/dyn_modules/gfanlib/bbfan.h>
     10#include <Singular/dyn_modules/gfanlib/bbpolytope.h>
     11
     12#include <Singular/blackbox.h>
     13#include <Singular/ipshell.h>
     14#include <Singular/subexpr.h>
     15
     16#include <string>
     17*/
     18
    119#include <Singular/ipid.h>
     20
    221
    322void init_polymake_help()
     
    206225
    207226}
     227#endif
  • Singular/dyn_modules/polymake/polymake_wrapper.cc

    r7835f61 rd1df84  
     1#include <kernel/mod2.h>
     2
     3#ifdef HAVE_POLYMAKE
     4
     5#include <Singular/dyn_modules/gfanlib/bbcone.h>
     6#include <Singular/dyn_modules/gfanlib/bbfan.h>
     7#include <Singular/dyn_modules/gfanlib/bbpolytope.h>
     8
     9#include <Singular/blackbox.h>
     10#include <Singular/ipshell.h>
     11#include <Singular/subexpr.h>
     12
    113#include <polymake_conversion.h>
    214#include <polymake_documentation.h>
    315#include <polymake/Graph.h>
    4 
    5 #include <Singular/dyn_modules/callgfanlib/bbcone.h>
    6 #include <Singular/dyn_modules/callgfanlib/bbfan.h>
    7 #include <Singular/dyn_modules/callgfanlib/bbpolytope.h>
    8 
    9 #include <Singular/blackbox.h>
    10 #include <Singular/ipshell.h>
    11 #include <Singular/subexpr.h>
    1216
    1317polymake::Main* init_polymake=NULL;
     
    17531757}
    17541758
    1755 
    1756 extern "C" int mod_init(SModulFunctions* p)
     1759extern "C" int SI_MOD_INIT(polymake)(SModulFunctions* p)
    17571760{
    17581761  if (init_polymake==NULL)
     
    18081811  return 0;
    18091812}
     1813
     1814#endif /* HAVE_POLYMAKE */
  • Singular/dyn_modules/pyobject/pyobject.cc

    r7835f61 rd1df84  
    707707     (char*)#name, FALSE, name);
    708708
    709 int SI_MOD_INIT(pyobject)(SModulFunctions* psModulFunctions)
     709extern "C" int SI_MOD_INIT(pyobject)(SModulFunctions* psModulFunctions)
    710710{
    711711  int tok = -1;
     
    734734#undef PYOBJECT_ADD_C_PROC
    735735
    736 #ifndef EMBED_PYTHON
    737 extern "C" {
    738   int mod_init(SModulFunctions* psModulFunctions)
    739   {
    740     return SI_MOD_INIT(pyobject)(psModulFunctions);
    741   }
    742 }
    743 #endif
    744 
    745736#endif /* HAVE_PYTHON */
  • Singular/dyn_modules/singmathic/singmathic.cc

    r7835f61 rd1df84  
    1 // include header files
    2 
    31#include <kernel/mod2.h>
     2
     3#ifdef HAVE_MATHICGB
     4
    45#include <misc/auxiliary.h>
    56
     
    1112#include <Singular/ipid.h>
    1213#include <Singular/mod_lib.h>
    13 
    14 #ifdef HAVE_MATHICGB
    1514
    1615#include <mathicgb.h>
     
    550549}
    551550
    552 #else /* HAVE_MATHICGB */
     551/* #else
    553552
    554553int SI_MOD_INIT(singmathic)(SModulFunctions* psModulFunctions)
     
    561560  return 1;
    562561}
     562*/
    563563
    564564#endif /* HAVE_MATHICGB */
  • Singular/dyn_modules/syzextra/Makefile.am

    r7835f61 rd1df84  
    66$(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) $(GOOGLE_PERFTOOLS_CFLAGS)
    77
    8 module_LTLIBRARIES=syzextra.la
    9 
    10 if ENABLE_P_PROCS_DYNAMIC
     8if SI_BUILTIN_SYZEXTRA
     9  noinst_LTLIBRARIES=syzextra.la
     10  P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
     11  P_PROCS_MODULE_LDFLAGS = -module
     12else
     13  module_LTLIBRARIES=syzextra.la
    1114  moduledir = $(libexecdir)/singular/MOD
    1215  P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
    1316# Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    14 else
    15   moduledir = $(libdir)/singular
    16   P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION
     17  P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    1718endif
    18 
    19 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup
    2019
    2120SOURCES = mod_main.cc DebugPrint.cc DebugPrint.h myNF.cc myNF.h singularxx_defs.h syzextra.cc syzextra.h
  • Singular/dyn_modules/syzextra/mod_main.cc

    r7835f61 rd1df84  
    1 
    2 
    3 
    4 
    51#include <kernel/mod2.h>
    62
     
    19261922END_NAMESPACE
    19271923
    1928 
    1929 int SI_MOD_INIT(syzextra)(SModulFunctions* psModulFunctions)
     1924extern "C" int SI_MOD_INIT(syzextra)(SModulFunctions* psModulFunctions)
    19301925{
    19311926
     
    19881983  return 0;
    19891984}
    1990 
    1991 #ifndef EMBED_PYTHON
    1992 extern "C" {
    1993 int mod_init(SModulFunctions* psModulFunctions)
    1994 {
    1995   return SI_MOD_INIT(syzextra)(psModulFunctions);
    1996 }
    1997 }
    1998 #endif
  • Singular/dyn_modules/syzextra/syzextra.cc

    r7835f61 rd1df84  
    6666BEGIN_NAMESPACE(SORT_c_ds)
    6767
    68 
    69 #ifdef _GNU_SOURCE
    70 static int cmp_c_ds(const void *p1, const void *p2, void *R)
    71 {
     68#if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FREEBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9)
     69static int cmp_c_ds(void *R, const void *p1, const void *p2){
     70#elif (defined _GNU_SOURCE || defined __GNU__ || defined __linux__)
     71static int cmp_c_ds(const void *p1, const void *p2, void *R){
    7272#else
    73 static int cmp_c_ds(const void *p1, const void *p2)
    74 {
    75   void *R = currRing;
    76 #endif
    77 
     73static int cmp_c_ds(const void *p1, const void *p2){ void *R = currRing;
     74#endif
     75  assume(R != NULL);
    7876  const int YES = 1;
    7977  const int NO = -1;
     
    8179  const ring r =  (const ring) R; // TODO/NOTE: the structure is known: C, lp!!!
    8280
    83   assume( r == currRing );
     81  assume( r == currRing ); // for now...
    8482
    8583  const poly a = *(const poly*)p1;
     
    154152}
    155153
    156 
     154/*
    157155static int cmp_poly(const poly &a, const poly &b)
    158156{
     
    200198  return 0;
    201199}
     200*/
    202201
    203202END_NAMESPACE
     
    390389  const int sizeNew = IDELEMS(id);
    391390
    392 #ifdef _GNU_SOURCE
     391#if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FREEBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9)
     392#define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, r, cmp)
     393#elif (defined _GNU_SOURCE || defined __GNU__ || defined __linux__)
    393394#define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, cmp, r)
    394395#else
    395 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, cmp)
     396#define qsort_my(m, s, ss, r, cmp) qsort(m, s, ss, cmp)
    396397#endif
    397398
  • Singular/iparith.cc

    r7835f61 rd1df84  
    79077907            if (traceit&TRACE_CALL)
    79087908              Print("call %s(%s,%s)\n",iiTwoOps(op),
    7909               Tok2Cmdname(an->rtyp),Tok2Cmdname(bn->rtyp));
     7909              Tok2Cmdname(dArith2[i].arg1),Tok2Cmdname(dArith2[i].arg2));
    79107910            failed= ((iiConvert(at,dArith2[i].arg1,ai,a,an))
    79117911            || (iiConvert(bt,dArith2[i].arg2,bi,b,bn))
     
    80928092            if (!failed)
    80938093            {
     8094              if (traceit&TRACE_CALL)
     8095                Print("call %s(%s)\n",iiTwoOps(op),Tok2Cmdname(dArith1[i].arg));
    80948096              #ifdef PROC_BUG
    80958097              dArith1[i].p(res,a);
     
    81128114          else
    81138115          {
    8114             if (traceit&TRACE_CALL)
    8115               Print("call %s(%s)\n",iiTwoOps(op),Tok2Cmdname(an->rtyp));
    81168116            if (an->Next() != NULL)
    81178117            {
     
    82628262              if (traceit&TRACE_CALL)
    82638263                Print("call %s(%s,%s,%s)\n",
    8264                   iiTwoOps(op),Tok2Cmdname(an->rtyp),
    8265                   Tok2Cmdname(bn->rtyp),Tok2Cmdname(cn->rtyp));
     8264                  iiTwoOps(op),Tok2Cmdname(dArith3[i].arg1),
     8265                  Tok2Cmdname(dArith3[i].arg2),Tok2Cmdname(dArith3[i].arg3));
    82668266              failed= ((iiConvert(at,dArith3[i].arg1,ai,a,an))
    82678267                || (iiConvert(bt,dArith3[i].arg2,bi,b,bn))
  • Singular/iplib.cc

    r7835f61 rd1df84  
    716716}
    717717
    718 int SI_MOD_INIT(staticdemo)(SModulFunctions*){ PrintS("init of staticdemo\n"); return (0); }
    719 
    720 #define SI_GET_BUILTIN_MOD_INIT(name) \
    721  if (strcmp(libname, #name ".so") == 0){ int SI_MOD_INIT(name)(SModulFunctions*); return SI_MOD_INIT(name); }
     718
     719extern "C"
     720{
     721#  define SI_GET_BUILTIN_MOD_INIT0(name) int SI_MOD_INIT0(name)(SModulFunctions*);
     722          SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT0)
     723#  undef  SI_GET_BUILTIN_MOD_INIT0
     724};
     725
    722726
    723727SModulFunc_t
    724728iiGetBuiltinModInit(const char* libname)
    725729{
    726   SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT)
     730#  define SI_GET_BUILTIN_MOD_INIT(name) if (strcmp(libname, #name ".so") == 0){ return SI_MOD_INIT0(name); }
     731          SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT)
     732#  undef  SI_GET_BUILTIN_MOD_INIT
    727733
    728734  return NULL;
     
    730736
    731737
    732 #undef SI_GET_BUILTIN_MOD_INIT
    733738
    734739
     
    11001105      else            sModulFunctions.iiAddCproc = iiAddCproc;
    11011106      (*fktn)(&sModulFunctions);
    1102     }
    1103     else Werror("mod_init: %s\n", dynl_error());
    1104     if (BVERBOSE(V_LOAD_LIB)) Print( "// ** loaded %s \n", fullname);
    1105     currPack->loaded=1;
    1106     currPack=s;
    1107   }
    1108   RET=FALSE;
     1107      if (BVERBOSE(V_LOAD_LIB)) Print( "// ** loaded %s \n", fullname);
     1108      currPack->loaded=1;
     1109      currPack=s;
     1110      RET=FALSE;
     1111    }
     1112    else Werror("mod_init not found:: %s\nThis is probably not a dynamic module for Singular!\n", dynl_error());
     1113  }
    11091114
    11101115  load_modules_end:
  • Singular/ipshell.cc

    r7835f61 rd1df84  
    58245824  if ((a->Typ()==INT_CMD)&&((long)a->Data()>=0))
    58255825  {
    5826     if ((TEST_V_ALLWARN) && (myynest==0)) WarnS("ASSUME at top level");
     5826    if ((TEST_V_ALLWARN) && (myynest==0)) WarnS("ASSUME at top level is of no use: see documentation");
    58275827    char       assume_yylinebuf[80];
    58285828    strncpy(assume_yylinebuf,my_yylinebuf,79);
  • Singular/links/semaphore.c

    r7835f61 rd1df84  
    66
    77#ifdef HAVE_SIMPLEIPC
     8#include <semaphore.h>
     9#include <fcntl.h>
     10#include <sys/types.h>
     11#include <sys/stat.h>
     12#include <stdio.h>
     13#include <stdlib.h>
     14#include <sys/types.h>
     15#include <unistd.h>
     16
    817
    918# include "simpleipc.h"
     
    1221#include <reporter/si_signals.h>
    1322
    14 #include <semaphore.h>
    15 #include <fcntl.h>
    16 #include <sys/types.h>
    17 #include <sys/stat.h>
    18 #include <stdio.h>
    19 #include <stdlib.h>
    2023
    2124
  • Singular/links/ssiLink.cc

    r7835f61 rd1df84  
    6363
    6464// 64 bit version:
    65 //#if SIZEOF_LONG == 8
    66 #if 0
     65#if SIZEOF_LONG == 8
    6766#define MAX_NUM_SIZE 60
    6867#define POW_2_28 (1L<<60)
  • Singular/mod_lib.cc

    r7835f61 rd1df84  
    1 
    2 
    3 
    4 
    51#include <kernel/mod2.h>
    62
  • Singular/mod_lib.h

    r7835f61 rd1df84  
    22#define MOD_LIB_H
    33
    4 // #include config.h
    5 #include <kernel/mod2.h> /* for EMBED_PYTHON, HAVE_MATHICGB */
     4#define SI_MOD_INIT0(name) name##_mod_init
    65
    7 #include <polys/mod_raw.h>  /* for lib_types */
    8 
    9 lib_types type_of_LIB(const char *newlib, char *fullname);
    10 
    11 
    12 #if HAVE_GFANLIB
    13 #define SI_BUILTIN_GFANLIB(add) add(gfanlib)
    14 #else
    15 #define SI_BUILTIN_GFANLIB(add)
     6#ifdef STATIC_VERSION
     7#  define SI_MOD_INIT(name) SI_MOD_INIT0(name)
     8#elif defined(DYNAMIC_VERSION)
     9#  define SI_MOD_INIT(name) mod_init
    1610#endif
    1711
    18 
    19 #ifdef EMBED_PYTHON
    20 #define SI_BUILTIN_PYOBJECT(add) add(pyobject)  add(syzextra)      SI_BUILTIN_GFANLIB(add)
    21 //TODO: the line above means that syzextra should be staticly embedded IFF pyobjects do so :(
    22 #else
    23 #define SI_BUILTIN_PYOBJECT(add)
    24 #endif
    25 
    26 #ifdef HAVE_MATHICGB
    27 # define SI_BUILTIN_MATHIC(add) add(singmathic)
    28 #else
    29 # define SI_BUILTIN_MATHIC(add)
    30 #endif
     12// Note that STATIC_VERSION and DYNAMIC_VERSION should not be defined in the following config header mod2.h!
     13#include <kernel/mod2.h> /* for SI_BUILTINMODULES_ADD */
    3114
    3215/// Data for @c type_of_LIB to determine built-in modules,
    3316/// use @c add(name) to add built-in library to macro
    34 #define SI_FOREACH_BUILTIN(add)\
    35     add(staticdemo)\
    36     SI_BUILTIN_MATHIC(add)\
    37     SI_BUILTIN_PYOBJECT(add)
     17#define SI_FOREACH_BUILTIN(add) SI_BUILTINMODULES_ADD(add)
    3818
    39 #define SI_MOD_INIT(name) name##_mod_init
     19#include <polys/mod_raw.h>  /* for lib_types */
     20lib_types type_of_LIB(const char *newlib, char *fullname);
    4021
    4122#endif
    4223
     24/*
     25#if HAVE_GFANLIB
     26#define SI_BUILTIN_GFANLIB(add) add(gfanlib)
     27#endif
     28#ifdef HAVE_MATHICGB
     29# define SI_BUILTIN_MATHIC(add) add(singmathic)
     30#endif
     31#ifdef EMBED_PYTHON
     32//TODO: the line above means that syzextra should be staticly embedded IFF pyobjects do so :(((((
     33#define SI_BUILTIN_PYOBJECT(add) add(pyobject) add(syzextra) SI_BUILTIN_GFANLIB(add) SI_BUILTIN_MATHIC(add)
     34#endif
     35*/
  • Singular/pyobject_setup.cc

    r7835f61 rd1df84  
    1313//*****************************************************************************
    1414
     15#include <kernel/mod2.h>
    1516
    16 
    17 
    18 
    19 #include <kernel/mod2.h>
    2017#include <Singular/blackbox.h>
    2118#include <Singular/ipshell.h>
    22 
    23 //#ifdef EMBED_PYTHON
    24 //#include "pyobject.cc"
    25 //#endif
    2619
    2720static BOOLEAN pyobject_load()
     
    5346
    5447/// Explicitely load, if not loaded already
    55 BOOLEAN pyobject_ensure() {
     48BOOLEAN pyobject_ensure()
     49{
    5650
    5751  int tok = -1;
     
    6155  return (bbx->blackbox_Init == pyobject_autoload?  pyobject_load(): FALSE);
    6256}
    63 
    64 
    65 
  • Tst/Short.lst

    r7835f61 rd1df84  
    188188Short/lres_s.tst
    189189Short/minor_s.tst
    190 Short/modstd_s.tst
    191190Short/modulo_s.tst
    192191Short/monodromy_s.tst
  • Tst/Short/pyobject.res.gz.uu

    r7835f61 rd1df84  
    1 begin 664 pyobject.res.gz
    2 M'XL("`X&QE```W!Y;V)J96-T+G)E<P#M&FMOX\;QNW_%1B@@RM;I2$I\R(X5
    3 MY*Y%&Z"X%+T`_>"Z,B6O;?8HDB`I6TK1_]Z9?<R.'K;/*5H@0"Z(S-UY[,SL
    4 M[,SLD)]_^OT/GX00P4S\^8</HM>UW:C(%[V+D\\&$LX$3,[S,N^\P<4)_A6S
    5 MF:BWU>*?<MF-2ODT:KNL(X+Q3-#S9"3>OQ??MVU^7ZYDV8GJ3K1=DY?WHL@[
    6 MV61%*[+R5N1E)^]ETQ)A-*(5X`%(Q*7H97NT3,IXQO&K4@)^X,`)DRD=N>?I
    7 M2'._..GO,^];I,"?:987)P'-!8YA$#J&P5@I_/%!+K\@KWK;/52ED$U3.>6"
    8 MB5E5G%G&(,IW3@&%+JKE<MW(6PU;9F59=6)9E<NLDR7\+_K`H:^LUP?S]84F
    9 M;C4^8P$\P+X"A@MY5S52:#&*'(P43,[%S:XL-R1F---BXK:_*J"6QL#S5BAI
    10 MLZ+(%H5\FTB1%0G6=<+$5IA@J`7]_PH5DU!N?2<<<Z\@U1Y0K>HU;%);K63W
    11 M@*X`K(TW$"IXWZV\$XULUT4'#JOA<_F8%5YO<A;U!N3!(3BAQKLXF=(D\\(0
    12 MO!#<P--(`X[%#F2H#^0?-G*)TAF!EM5J!7[4BKNF6HG/(.VZR!JB46=12=:L
    13 M2Z^'(J^V=8.KG6;-?3LX%VHD<,!ECMG"R8B(>I_E(\0"*<MST1N"]8#$Z[/)
    14 MOIHDTG1&I(CI`%/'?^PKQ?XH.]%M:TG3P4B-JSO/L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@"Y;`8
     59MP"RDO)2Q^TX6&K4P,1O%X,<JQ9RNPT.D7^$B\%E_P.[N*[I>P`^MMZ-JQE)F
     60MAF_.41;TP*=W@4,";[:*X7M_!T@<`*[P0$,1-V,VS#+:_]#WG]G_FCN!*ETH
     61MDG5$'.S$MQPRTKULGPEO(;:%#8I0OPX")E,SQR-5B-UA0\'B5.B[)DOH@WNR
     62MP*"QCZ30:[3-M=I!0+LV\ES;SSNZ38,O+^A-RE,#6@!'3884ZN%9*%Q$V^+I
     63M^O4$?'9&#J#3L(^?B$#N7,.!;H7UP7/Q\Y.LVG53@H,A'C"*L64T0.,[M:M5
     64MO6Z`U[*4>N-=C4&F37A092_X0S]E&Y#Q@X3+=)YZ<:@/DD7#QKH0Q:WPS#M=
     65MO1,7)@#P0.).).*P(Q;B-U/'F5@7?"DUA=@\=X/HYQ]7I14_KV'@$DL(U\!#
     66M%R1@>C0SA=@S941TED/]R8XEX&<Y9!_NA.%._%(OU3W]MOYX!!MXZZ+KP#5&
     67M@^<B6!B^(8*IM79,HCNE]ORKPW2\?`NQ2:H1]$O8UXJRL1B2]-2V"-EW0B'V
     6893_%S0_RB<--Y7"JP_^]._@/RC@7*L"@`````
    7069`
    7170end
  • Tst/Short/pyobject.stat

    r7835f61 rd1df84  
    1 1 >> tst_memory_0 :: 1340804707:3144- exported :3-1-4:x86_64-Linux:lts035:227368
    2 1 >> tst_memory_1 :: 1340804707:3144- exported :3-1-4:x86_64-Linux:lts035:3239936
    3 1 >> tst_memory_2 :: 1340804707:3144- exported :3-1-4:x86_64-Linux:lts035:3239936
    4 1 >> tst_timer_1 :: 1340804707:3144- exported :3-1-4:x86_64-Linux:lts035:9
     11 >> tst_memory_0 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:196488
     21 >> tst_memory_1 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:3203072
     31 >> tst_memory_2 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:3203072
     41 >> tst_timer_1 :: 1400685929:4.0.0, 64 bit:4.0.0:x86_64-Linux:dilbert:3
  • Tst/Short/ringutils_s.res.gz.uu

    r7835f61 rd1df84  
    11begin 640 ringutils_s.res.gz
    2 M'XL(".&J;%,``W)I;F=U=&EL<U]S+G)E<P"-E=UNXC`0A>]YBMFH%P&Q(;$=
    3 M"$*)M+\2TNY*V[37)=N8UA)R2FRV??PZE,3C4"A(B`C.G.]XF$SRF^_+/P`0
    4 M9?!K^14\K72P$?^\Q2`__$(R,%_>"2FT/UP,FD_(,JB%?-AIL5%W*I#\.5"Z
    5 MT%T-S:"[9H&]CH.&XC6U/<H45<P"J)ZTJ*3O/1>U](96EF3P)<]O?__PP_%!
    6 MM%0YUZT2C'8R@=$(=HK#2DC]G]^O0$BE>5%"M895R=>KSF^>=2A9]6!1B&$A
    7 MI.DI8EM@FCB9?#[SZI0DV#<0:O-.H>;%9OPR+I^L%778!BW4WUVE!9?ZVA3Z
    8 MIM"@P18PV\#(M'F[M]^^^4=6-L6^/<_MD>D,F28V,C&>IK7\@=>]V/.CEAWG
    9 M)@Z#A)9!(AR<I*%5$6PL*_U>]IXQ&D+";'AJPH=N;!)?$)NZ[FA@R0S'IJEM
    10 M-TD^:'?/='Y^@%H=#9WQ<?^*M_&ON9ES<Z\>1*-15QOA2)\>"_53\$WYK>+K
    11 MM;AOPOG["CS8E-C#4MH=MD&79G3]%R1E']MO7?,8F4_=(0O/G(G@0\UZM\O)
    12 M<Q&7G2#VW)T1XU0,S_`IXK/P4CYU^"RR?(9V`FOX^ZW016A5_<5PDL1<$MH/
    13 L++:DN"7U.=-+.;'+02N#)7;U,]/=YC'2/"9VRH^&"[A:#%X!]!%M(7X&````
     2M'XL("*!#@U,``W)I;F=U=&EL<U]S+G)E<P"-E5N/VC`0A=_Y%5/4AX!H2&R'
     3M2Q&1>I60VDHM[?.2$K.UE-H0F]W]^9VP26R'PH*$B,B9\QU/)O;ZY\?5-P"(
     4M4_BR>@]]HTU8B-_]16]=WR$IX)]W0@H3#!:]ZA?2%$HA[X]&%/I.AY(_AMID
     5MIJVA*;37++3725A1^E5MAS)Q*J8AJ+T12@;]QZR4_8&5S5)XMU[_^OHIB$:U
     6M:*77W#1*0.UX#,-A+8/,@%%[*/@#+T!H4#N0"HZ:OP7-.>1J>_S+)69'I[H2
     7M;\)&2//`MQL04AN>Y57=)N>[39MDGK8AI>K$C",W9@3+Y:6L30&V?SQ^<^73
     8M*DEX:CV4^%U"R;-B]#3*]]:*>FQ$"_W]J(S`5?[`P@`+$0VV@-G6Q_B`#B?[
     9MP[-_;&43U[?C>3@SG3JF,QN9H">VEM_SLA-[?M:R\]S$8Y#(,DCL!B?+R*J(
     10M:RR5^5_VCK$SOH39\!3#1WYLDMP0F_KNSJB3J1N;+FV[R>R%=G=,Y]<'J-'1
     11MR!L?_U$\CW_)<<[Q+:]%PV%;&[N17OW)]&?!B_R#XKN=V%;A@E.%.]B4V,52
     12MVBZV0N<XNL&3(V4OVQ]\\\0QG_A#%EU9$W$7->V\+A?717SVS&'/_1E!IVQP
     13MA4\=/HMNY5./SV++9\Z>P"K^:5=H(S2J[L9PD<1\DK,_L,22DH;4Y4QNY20^
     14@Q]DRV,P>&@R[6QU`U0%SU$$\6,#K1>\?U():S[@&````
    1415`
    1516end
  • configure.ac

    r7835f61 rd1df84  
    121121
    122122SING_CHECK_PLURAL
     123
     124SING_BUILTIN_MODULES
    123125
    124126### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
     
    236238AC_CONFIG_FILES([Singular/dyn_modules/bigintm/Makefile])
    237239AC_CONFIG_FILES([Singular/dyn_modules/syzextra/Makefile])
    238 AC_CONFIG_FILES([Singular/dyn_modules/callgfanlib/Makefile])
    239 AC_CONFIG_FILES([Singular/dyn_modules/callpolymake/Makefile])
     240AC_CONFIG_FILES([Singular/dyn_modules/gfanlib/Makefile])
     241AC_CONFIG_FILES([Singular/dyn_modules/polymake/Makefile])
     242AC_CONFIG_FILES([Singular/dyn_modules/pyobject/Makefile])
     243AC_CONFIG_FILES([Singular/dyn_modules/singmathic/Makefile])
     244AC_CONFIG_FILES([Singular/dyn_modules/staticdemo/Makefile])
    240245
    241246AC_CONFIG_FILES([Singular/Makefile])
  • kernel/GBEngine/Makefile.am

    r7835f61 rd1df84  
    77libGBEngine_la_SOURCES=khstd.cc kstdfac.cc kstd1.cc kstd2.cc kutil.cc nc.cc sca.cc gr_kstd2.cc kspoly.cc kpolys.cc syz.cc syz0.cc syz1.cc syz2.cc syz3.cc units.cc tgb.cc tgbgauss.cc f5data.cc f5lists.cc f5gb.cc f5c.cc ratgring.cc shiftgb.cc ringgb.cc janet.cc
    88
    9 libGBEngine_la_includedir=$(includedir)/kernel/GBEngine
     9libGBEngine_la_includedir=$(includedir)/singular/kernel/GBEngine
    1010libGBEngine_la_include_HEADERS=stairc.h syz.h kstdfac.h kutil.h khstd.h kstd1.h units.h ratgring.h shiftgb.h nc.h kInline.h tgb.h ringgb.h tgbgauss.h tgb_internal.h f5c.h f5data.h f5gb.h f5lists.h janet.h
    1111
  • kernel/combinatorics/Makefile.am

    r7835f61 rd1df84  
    77libcombinatorics_la_SOURCES=hdegree.cc hilb.cc hutil.cc
    88
    9 libcombinatorics_la_includedir=$(includedir)/kernel/combinatorics
     9libcombinatorics_la_includedir=$(includedir)/singular/kernel/combinatorics
    1010libcombinatorics_la_include_HEADERS=hutil.h
    1111
  • kernel/fglm/Makefile.am

    r7835f61 rd1df84  
    77libfglm_la_SOURCES=fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc
    88
    9 libfglm_la_includedir=$(includedir)/singular/fglm
     9libfglm_la_includedir=$(includedir)/singular/kernel/fglm
    1010libfglm_la_include_HEADERS=fglm.h fglmgauss.h fglmvec.h
    1111
  • kernel/groebner_walk/Makefile.am

    r7835f61 rd1df84  
    77libgroebner_walk_la_SOURCES=walkProc.cc walkMain.cc walkSupport.cc
    88
    9 libgroebner_walk_la_includedir=$(includedir)/kernel/groebner_walk
     9libgroebner_walk_la_includedir=$(includedir)/singular/kernel/groebner_walk
    1010libgroebner_walk_la_include_HEADERS=walkProc.h walkMain.h walkSupport.h
    1111
  • kernel/linear_algebra/Makefile.am

    r7835f61 rd1df84  
    1010
    1111
    12 liblinear_algebra_la_includedir=$(includedir)/kernel/linear_algebra
     12liblinear_algebra_la_includedir=$(includedir)/singular/kernel/linear_algebra
    1313liblinear_algebra_la_include_HEADERS= \
    1414  Minor.h MinorInterface.h MinorProcessor.h \
  • kernel/maps/Makefile.am

    r7835f61 rd1df84  
    77libmaps_la_SOURCES=fast_maps.cc
    88
    9 libmaps_la_includedir=$(includedir)/kernel/maps
     9libmaps_la_includedir=$(includedir)/singular/kernel/maps
    1010libmaps_la_include_HEADERS=fast_maps.h
    1111
  • kernel/spectrum/Makefile.am

    r7835f61 rd1df84  
    77libspectrum_la_SOURCES=GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc
    88
    9 libspectrum_la_includedir=$(includedir)/kernel/spectrum
     9libspectrum_la_includedir=$(includedir)/singular/kernel/spectrum
    1010libspectrum_la_include_HEADERS=GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h kmatrix.h
    1111
  • libpolys/coeffs/longrat.cc

    r7835f61 rd1df84  
    1717
    1818// 64 bit version:
    19 //#if SIZEOF_LONG == 8
    20 #if 0
     19#if SIZEOF_LONG == 8
     20//#if 0
    2121#define MAX_NUM_SIZE 60
    2222#define POW_2_28 (1L<<60)
     
    265265  if ( SR_HDL(n) & SR_INT )
    266266  {
    267     term = SR_TO_INT(n);
     267    int nn=SR_TO_INT(n);
     268    if ((long)nn==SR_TO_INT(n))
     269       term = nn;
     270    else
     271    {
     272        mpz_t dummy;
     273        mpz_init_set_si(dummy, SR_TO_INT(n));
     274        term = make_cf(dummy);
     275    }
    268276  }
    269277  else
     
    534542  nlTest(i, r);
    535543  nlNormalize(i,r);
    536   if (SR_HDL(i) &SR_INT) return SR_TO_INT(i);
     544  if (SR_HDL(i) & SR_INT)
     545  {
     546    int dummy = SR_TO_INT(i);
     547    if((long)dummy == SR_TO_INT(i))
     548        return SR_TO_INT(i);
     549    else
     550        return 0;
     551  }
    537552  if (i->s==3)
    538553  {
     
    563578  nlTest(i, r);
    564579  nlNormalize(i,r);
    565   if (SR_HDL(i) &SR_INT) return (i);
     580  if (SR_HDL(i) & SR_INT) return (i);
    566581  if (i->s==3)
    567582  {
     
    786801  {
    787802    LONG bb=SR_TO_INT(b);
    788     LONG c=SR_TO_INT(a)%bb;
     803    LONG c=SR_TO_INT(a) % bb;
     804    /*if(c < 0)
     805    {
     806        if(bb < 0)
     807            c = c - bb;
     808        else
     809            c = c + bb;
     810    }*/
     811    /*if((((SR_TO_INT(a)) / (bb))*bb+c) != SR_TO_INT(a))
     812    {
     813        printf("\nERROR longrat:819\n");
     814        printf("\na = %ld\n",SR_TO_INT(a));
     815        printf("\nb = %ld\n",bb);
     816        printf("\nc = %ld\n",c);
     817    }*/
    789818    return INT_TO_SR(c);
    790819  }
    791820  if (SR_HDL(a) & SR_INT)
    792821  {
    793     /* a is a small and b is a large int: -> a */
    794     return a;
     822    // a is a small and b is a large int: -> a
     823    //  INCORRECT, IT COULD HAPPEN THAT b IS A SMALL NUMBER
     824    number aa=ALLOC_RNUMBER();
     825    mpz_init(aa->z);
     826    mpz_set_si(aa->z, SR_TO_INT(a));
     827    u=ALLOC_RNUMBER();
     828#if defined(LDEBUG)
     829    u->debug=123456;
     830#endif
     831    u->s = 3;
     832    mpz_init(u->z);
     833    mpz_mod(u->z,aa->z,b->z);
     834    if (mpz_isNeg(u->z))
     835    {
     836      if (mpz_isNeg(b->z))
     837        mpz_sub(u->z,aa->z,b->z);
     838      else
     839        mpz_add(u->z,aa->z,b->z);
     840    }
     841    /*mpz_t dummy;
     842    mpz_init(dummy);
     843    mpz_fdiv_q(dummy, aa->z, b->z);
     844    mpz_mul(dummy, dummy, b->z);
     845    mpz_add(dummy, dummy, u->z);
     846    if(mpz_cmp(dummy,aa->z) != 0)
     847    {
     848        printf("\nERROR longrat:911\n");
     849        printf("\na = ");n_Print(aa,r);
     850        gmp_printf("\ndummy = %Zd",dummy);
     851        mpz_clear(dummy);mpz_init(dummy);mpz_tdiv_q(dummy, a->z, b->z);
     852        gmp_printf("\na div b = %Zd\n u = ", dummy);
     853        n_Print(u,r);
     854    }
     855    mpz_clear(dummy);*/
     856    mpz_clear(aa->z);
     857    #if defined(LDEBUG)
     858    aa->debug=654324;
     859    #endif
     860    FREE_RNUMBER(aa);
     861    u=nlShort3(u);
     862    nlTest(u,r);
     863    return u;
    795864  }
    796865  number bb=NULL;
     
    807876  u->s = 3;
    808877  mpz_mod(u->z,a->z,b->z);
    809   if (bb!=NULL)
    810   {
    811     mpz_clear(bb->z);
    812 #if defined(LDEBUG)
    813     bb->debug=654324;
    814 #endif
    815     FREE_RNUMBER(bb);
    816   }
    817878  if (mpz_isNeg(u->z))
    818879  {
     
    822883      mpz_add(u->z,u->z,b->z);
    823884  }
     885  if (bb!=NULL)
     886  {
     887    mpz_clear(bb->z);
     888#if defined(LDEBUG)
     889    bb->debug=654324;
     890#endif
     891    FREE_RNUMBER(bb);
     892  }
     893  /*mpz_t dummy;
     894  mpz_init(dummy);
     895    mpz_fdiv_q(dummy, a->z, b->z);
     896    mpz_mul(dummy, dummy, b->z);
     897    mpz_add(dummy, dummy, u->z);
     898    if(mpz_cmp(dummy,a->z) != 0)
     899    {
     900        printf("\nERROR longrat:911\n");
     901        printf("\na = ");n_Print(a,r);
     902        gmp_printf("\ndummy = %Zd",dummy);
     903        mpz_clear(dummy);mpz_init(dummy);mpz_tdiv_q(dummy, a->z, b->z);
     904        gmp_printf("\na div b = %Zd\n u = ", dummy);
     905        n_Print(u,r);
     906    }
     907    mpz_clear(dummy);*/
    824908  u=nlShort3(u);
    825909  nlTest(u,r);
     
    20922176  assume( getCoeffType(dst) == ID );
    20932177  assume( getCoeffType(src) == ID );
    2094 
    20952178  if ((SR_HDL(a) & SR_INT)||(a==NULL))
    20962179  {
     
    26932776
    26942777    nlInpGcd(cand, n, cf);
    2695 
    26962778    assume( nlGreaterZero(cand,cf) );
    26972779
     
    28422924    #else
    28432925    long nn=SR_TO_INT(n);
    2844     if ((nn<POW_2_28)||(nn>= -POW_2_28))
     2926    if ((nn<POW_2_28)&&(nn>= -POW_2_28))
    28452927      fprintf(f,"4 %ld ",nn);
    28462928    else
     
    28992981         s_readmpz(f,n->z);
    29002982         n->s=3; /*sub_type*/
     2983         #if SIZEOF_LONG == 8
     2984         n=nlShort3(n);
     2985         #endif
    29012986         return n;
    29022987       }
     
    29253010         s_readmpz_base (f,n->z, SSI_BASE);
    29263011         n->s=sub_type=3; /*subtype-5*/
     3012         #if SIZEOF_LONG == 8
     3013         n=nlShort3(n);
     3014         #endif
    29273015         return n;
    29283016       }
  • libpolys/coeffs/mpr_complex.cc

    r7835f61 rd1df84  
    377377      if (SR_HDL(num) & SR_INT)
    378378      {
    379         r= SR_TO_INT(num);
     379        //n_Print(num, src);printf("\n");
     380        int nn = SR_TO_INT(num);
     381        if((long)nn == SR_TO_INT(num))
     382            r = SR_TO_INT(num);
     383        else
     384            r = gmp_float(SR_TO_INT(num));
     385        //int dd = 20;
     386        //gmp_printf("\nr = %.*Ff\n",dd,*r.mpfp());
     387        //getchar();
    380388      }
    381389      else
     
    436444      if (SR_HDL(num) & SR_INT)
    437445      {
    438         r= SR_TO_INT(num);
     446        int nn = SR_TO_INT(num);
     447        if((long)nn == SR_TO_INT(num))
     448            r = SR_TO_INT(num);
     449        else
     450            r = gmp_float(SR_TO_INT(num));
    439451      }
    440452      else
     
    446458        if (SR_HDL(num) & SR_INT)
    447459        {
    448           r= SR_TO_INT(num);
     460          int nn = SR_TO_INT(num);
     461          if((long)nn == SR_TO_INT(num))
     462            r = SR_TO_INT(num);
     463          else
     464            r = gmp_float(SR_TO_INT(num));
    449465        }
    450466        else
  • libpolys/coeffs/numbers.cc

    r7835f61 rd1df84  
    413413    assume(n->cfInpNeg!=NULL);
    414414    assume(n->cfCopy!=NULL);
    415     assume(n->cfRePart!=NULL);
    416     assume(n->cfImPart!=NULL);
    417415
    418416    assume(n->cfWriteLong!=NULL);
  • libpolys/coeffs/shortfl.cc

    r7835f61 rd1df84  
    425425#define SR_HDL(A) ((long)(A))
    426426#define IS_INT(A) ((A)->s==3)
    427 #define IS_IMM(A) (SR_HDL(A)&SR_INT)
     427#define IS_IMM(A) (SR_HDL(A) & SR_INT)
    428428#define GET_NOM(A) ((A)->z)
    429429#define GET_DENOM(A) ((A)->n)
  • libpolys/libpolys-config.in

    r7835f61 rd1df84  
    8989
    9090    --cflags)
    91         ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_INCLUDES@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
     91    #### @FACTORY_INCLUDES@
     92        ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
    9293        ;;
    9394
  • libpolys/polys/ext_fields/algext.cc

    r7835f61 rd1df84  
    9898void     naWriteLong(number &a, const coeffs cf);
    9999void     naWriteShort(number &a, const coeffs cf);
    100 number   naRePart(number a, const coeffs cf);
    101 number   naImPart(number a, const coeffs cf);
    102100number   naGetDenom(number &a, const coeffs cf);
    103101number   naGetNumerator(number &a, const coeffs cf);
     
    248246BOOLEAN naDBTest(number a, const char *f, const int l, const coeffs cf)
    249247{
    250   assume(getCoeffType(cf) == ID);
    251248  if (a == NULL) return TRUE;
    252249  p_Test((poly)a, naRing);
    253   if((((poly)a)!=naMinpoly)
    254   && p_Totaldegree((poly)a, naRing) >= p_Totaldegree(naMinpoly, naRing)
    255   && (p_Totaldegree((poly)a, naRing)> 1)) // allow to output par(1)
    256   {
    257     dReportError("deg >= deg(minpoly) in %s:%d\n",f,l);
    258     return FALSE;
     250  if (getCoeffType(cf)==n_algExt)
     251  {
     252    if((((poly)a)!=naMinpoly)
     253    && p_Totaldegree((poly)a, naRing) >= p_Totaldegree(naMinpoly, naRing)
     254    && (p_Totaldegree((poly)a, naRing)> 1)) // allow to output par(1)
     255    {
     256      dReportError("deg >= deg(minpoly) in %s:%d\n",f,l);
     257      return FALSE;
     258    }
    259259  }
    260260  return TRUE;
     
    348348  if (a != NULL) a = (number)p_Neg((poly)a, naRing);
    349349  return a;
    350 }
    351 
    352 number naImPart(number a, const coeffs cf)
    353 {
    354   naTest(a);
    355   return NULL;
    356350}
    357351
     
    486480  poly aPlusB = p_Add_q(p_Copy((poly)a, naRing),
    487481                        p_Copy((poly)b, naRing), naRing);
    488   definiteReduce(aPlusB, naMinpoly, cf);
     482  //definiteReduce(aPlusB, naMinpoly, cf);
    489483  return (number)aPlusB;
    490484}
     
    497491  if (a == NULL) return (number)minusB;
    498492  poly aMinusB = p_Add_q(p_Copy((poly)a, naRing), minusB, naRing);
    499   definiteReduce(aMinusB, naMinpoly, cf);
     493  //definiteReduce(aMinusB, naMinpoly, cf);
    500494  return (number)aMinusB;
    501495}
     
    724718static BOOLEAN naCoeffIsEqual(const coeffs cf, n_coeffType n, void * param)
    725719{
    726   if (ID != n) return FALSE;
     720  if (n_algExt != n) return FALSE;
    727721  AlgExtInfo *e = (AlgExtInfo *)param;
    728722  /* for extension coefficient fields we expect the underlying
     
    14211415  e->r->ref ++; // increase the ref.counter for the ground poly. ring!
    14221416  const ring R = e->r; // no copy!
    1423   assume( R->qideal == e->r->qideal );
    14241417  cf->extRing  = R;
    14251418
     
    14451438  cf->cfChineseRemainder= naChineseRemainder;
    14461439  cf->cfInt          = naInt;
    1447   cf->cfInpNeg          = naNeg;
     1440  cf->cfInpNeg       = naNeg;
    14481441  cf->cfAdd          = naAdd;
    14491442  cf->cfSub          = naSub;
     
    14671460  cf->cfGetNumerator = naGetNumerator;
    14681461  cf->cfRePart       = naCopy;
    1469   cf->cfImPart       = naImPart;
    14701462  cf->cfCoeffWrite   = naCoeffWrite;
    14711463  cf->cfNormalize    = naNormalize;
     
    15031495template class IAccessor<snumber*>;
    15041496
     1497/* --------------------------------------------------------------------*/
     1498#if 0
     1499void npolyCoeffWrite(const coeffs cf, BOOLEAN details)
     1500{
     1501  assume( cf != NULL );
     1502
     1503  const ring A = cf->extRing;
     1504
     1505  assume( A != NULL );
     1506  Print("// polynomial ring as coefficient ring :\n");
     1507  rWrite(A);
     1508  PrintLn();
     1509}
     1510number npolyMult(number a, number b, const coeffs cf)
     1511{
     1512  naTest(a); naTest(b);
     1513  if ((a == NULL)||(b == NULL)) return NULL;
     1514  poly aTimesB = p_Mult_q(p_Copy((poly)a, naRing),
     1515                          p_Copy((poly)b, naRing), naRing);
     1516  return (number)aTimesB;
     1517}
     1518
     1519number npolyDiv(number a, number b, const coeffs cf)
     1520{
     1521  naTest(a); naTest(b);
     1522  if (b == NULL) WerrorS(nDivBy0);
     1523  if (a == NULL) return NULL;
     1524  poly p=singclap_pdivide((poly)a,(poly)b,naRing);
     1525  return (number)p;
     1526}
     1527
     1528
     1529BOOLEAN npolyInitChar(coeffs cf, void * infoStruct)
     1530{
     1531  assume( infoStruct != NULL );
     1532
     1533  AlgExtInfo *e = (AlgExtInfo *)infoStruct;
     1534  /// first check whether cf->extRing != NULL and delete old ring???
     1535
     1536  assume(e->r                     != NULL);      // extRing;
     1537  assume(e->r->cf                 != NULL);      // extRing->cf;
     1538
     1539  assume( cf != NULL );
     1540
     1541  e->r->ref ++; // increase the ref.counter for the ground poly. ring!
     1542  const ring R = e->r; // no copy!
     1543  cf->extRing  = R;
     1544
     1545  /* propagate characteristic up so that it becomes
     1546     directly accessible in cf: */
     1547  cf->ch = R->cf->ch;
     1548
     1549  cf->cfCoeffString = naCoeffString;
     1550
     1551  cf->cfGreaterZero  = naGreaterZero;
     1552  cf->cfGreater      = naGreater;
     1553  cf->cfEqual        = naEqual;
     1554  cf->cfIsZero       = naIsZero;
     1555  cf->cfIsOne        = naIsOne;
     1556  cf->cfIsMOne       = naIsMOne;
     1557  cf->cfInit         = naInit;
     1558  cf->cfInit_bigint  = naInit_bigint;
     1559  cf->cfFarey        = naFarey;
     1560  cf->cfChineseRemainder= naChineseRemainder;
     1561  cf->cfInt          = naInt;
     1562  cf->cfInpNeg       = naNeg;
     1563  cf->cfAdd          = naAdd;
     1564  cf->cfSub          = naSub;
     1565  cf->cfMult         = npolyMult;
     1566  cf->cfDiv          = npolyDiv;
     1567  cf->cfPower        = naPower;
     1568  cf->cfCopy         = naCopy;
     1569
     1570  cf->cfWriteLong        = naWriteLong;
     1571
     1572  if( rCanShortOut(naRing) )
     1573    cf->cfWriteShort = naWriteShort;
     1574  else
     1575    cf->cfWriteShort = naWriteLong;
     1576
     1577  cf->cfRead         = naRead;
     1578  cf->cfDelete       = naDelete;
     1579  cf->cfSetMap       = naSetMap;
     1580  cf->cfGetDenom     = naGetDenom;
     1581  cf->cfGetNumerator = naGetNumerator;
     1582  cf->cfRePart       = naCopy;
     1583  cf->cfCoeffWrite   = npolyCoeffWrite;
     1584  cf->cfNormalize    = npolyNormalize;
     1585  cf->cfKillChar     = naKillChar;
     1586#ifdef LDEBUG
     1587  cf->cfDBTest       = naDBTest;
     1588#endif
     1589  cf->cfGcd          = naGcd;
     1590  cf->cfLcm          = naLcmContent;
     1591  cf->cfSize         = naSize;
     1592  cf->nCoeffIsEqual  = naCoeffIsEqual;
     1593  cf->cfInvers       = npolyInvers;
     1594  cf->cfIntDiv       = npolyDiv;
     1595  cf->convFactoryNSingN=naConvFactoryNSingN;
     1596  cf->convSingNFactoryN=naConvSingNFactoryN;
     1597  cf->cfParDeg = naParDeg;
     1598
     1599  cf->iNumberOfParameters = rVar(R);
     1600  cf->pParameterNames = (const char**)R->names;
     1601  cf->cfParameter = naParameter;
     1602  cf->has_simple_Inverse=FALSE;
     1603  /* cf->has_simple_Alloc= FALSE; */
     1604
     1605  if( nCoeff_is_Q(R->cf) )
     1606  {
     1607    cf->cfClearContent = naClearContent;
     1608    cf->cfClearDenominators = naClearDenominators;
     1609  }
     1610
     1611  return FALSE;
     1612}
     1613#endif
  • libsingular-config.in

    r7835f61 rd1df84  
    8989
    9090    --cflags)
    91         ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_INCLUDES@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
     91    #### @FACTORY_INCLUDES@
     92        ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
    9293        ;;
    9394
  • m4/ax_python_embed.m4

    r7835f61 rd1df84  
    236236#            ax_python_includespec="${ax_python_includespec} $ax_python_execspec"
    237237#        fi
    238         ax_python_cspec=`${PYTHON}-config --cflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g' -e 's@ -mno-fused-madd@@g'`
     238        ax_python_cspec=`${PYTHON}-config --cflags | sed -e 's@ -mno-fused-madd @ @g'`
    239239        #   or -Qunused-arguments / clang :(
    240240#        ax_python_cspec="${ax_python_ccshared} ${ax_python_includespec}"
     
    315315#        AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_output}])
    316316
    317         ax_python_lspec=`${PYTHON}-config --ldflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g'`
     317        ax_python_lspec=`${PYTHON}-config --ldflags`
    318318        AC_SUBST([PYTHON_LSPEC], [${ax_python_lspec}])
    319319        AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_lspec}])
  • m4/options.m4

    r7835f61 rd1df84  
    289289
    290290])
     291
     292
     293
     294AC_DEFUN([SING_BUILTIN_MODULES],
     295[
     296## m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
     297 AC_MSG_CHECKING([built-in modules])
     298
     299 AC_ARG_VAR( [BUILTIN_LIBS], [LIB FLAGS for buildins] )
     300 AC_ARG_WITH(builtinmodules,
     301   AS_HELP_STRING([--with-builtinmodules], [List of builtin modules (experimental), default: staticdemo,bigintm,syzextra]),
     302   [if test "x$with_builtinmodules" == xyes; then
     303    with_builtinmodules=syzextra
     304   fi],
     305   [with_builtinmodules=""]
     306 )
     307 # staticdemo,bigintm,
     308 # ,pyobject,gfanlib,polymake,singmathic
     309
     310 AH_TEMPLATE([SI_BUILTINMODULES_ADD],[Add(list) for Builtin modules])
     311
     312 #### TODO Dynamic Modules???
     313  L=""
     314  bi_staticdemo=false
     315  bi_syzextra=false
     316  bi_pyobject=false
     317  bi_gfanlib=false
     318  bi_polymake=false
     319  bi_singmathic=false
     320  bi_bigintm=false
     321 
     322 
     323 if test -z "$with_builtinmodules"; then
     324  AC_MSG_RESULT(no)
     325 else
     326  AC_MSG_RESULT(yes)
     327 
     328  L=""
     329 
     330  for a in ${with_builtinmodules//,/ };
     331  do
     332    AC_MSG_CHECKING([whether to build-in '$a'?])
     333   
     334      L+=" add($a)"
     335      LL+=" $a"
     336      BUILTIN_LIBS+=" dyn_modules/$a/$a.la"
     337      AC_MSG_RESULT(yes)
     338     
     339# *) AC_MSG_ERROR([bad value ${enableval} for       --enable-debug]) ;;
     340
     341      case "${a}" in
     342       staticdemo ) bi_staticdemo=true;;
     343       syzextra ) bi_syzextra=true ;;
     344       pyobject ) bi_pyobject=true ;;
     345       gfanlib ) bi_gfanlib=true ;;
     346       polymake ) bi_polymake=true ;;
     347       singmathic ) bi_singmathic=true ;;
     348       bigintm ) bi_bigintm=true ;;       
     349      esac
     350
     351###### In case of out-of tree building: the build dir is empty in configure time!!!
     352    if test ! -d "Singular/dyn_modules/$a"; then
     353        AC_MSG_WARN([The directory 'Singular/dyn_modules/$a' is missing :(])
     354##    else
     355##      AC_MSG_RESULT(no)
     356    fi
     357   
     358#    A=`echo "SI_BUILTIN_$a" | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:"  -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`     
     359#    echo "A:: $A"
     360#    AM_CONDITIONAL(m4_unquote([A]),[test -d "Singular/dyn_modules/$a"]) ## :(((
     361  done # for
     362
     363  AC_DEFINE_UNQUOTED([SI_BUILTINMODULES],"$LL",[Refined list of builtin modules])
     364
     365 fi # else ("x$with_builtinmodules" != xno)
     366 
     367 AC_MSG_CHECKING([SI_BUILTINMODULES_ADD(add)...])
     368 AC_MSG_RESULT(${L:-unset})
     369 
     370 AC_DEFINE_UNQUOTED([SI_BUILTINMODULES_ADD(add)],[$L],[Add(list) for Builtin modules])
     371 AC_SUBST(BUILTIN_LIBS)
     372 
     373 AM_CONDITIONAL([SI_BUILTIN_STATICDEMO], [test x$bi_staticdemo = xtrue])
     374 AM_CONDITIONAL([SI_BUILTIN_SYZEXTRA], [test x$bi_syzextra = xtrue])
     375 AM_CONDITIONAL([SI_BUILTIN_PYOBJECT], [test x$bi_pyobject = xtrue])
     376 AM_CONDITIONAL([SI_BUILTIN_GFANLIB], [test x$bi_gfanlib = xtrue])
     377 AM_CONDITIONAL([SI_BUILTIN_POLYMAKE], [test x$bi_polymake = xtrue])
     378 AM_CONDITIONAL([SI_BUILTIN_SINGMATHIC], [test x$bi_singmathic = xtrue])
     379 AM_CONDITIONAL([SI_BUILTIN_BIGINTM], [test x$bi_bigintm = xtrue])
     380 
     381 AC_MSG_CHECKING([BUILTIN_LIBS...])
     382 AC_MSG_RESULT(${BUILTIN_LIBS:-unset})
     383])
     384
     385
  • resources/feResource.cc

    r7835f61 rd1df84  
    6666   // path for dynamic modules, should match ProcDir:
    6767   "%b/MOD;"
     68   "%r/lib/singular/MOD;"
     69   "%r/libexec/singular/MOD;"
     70   LIB_DIR "/singular/MOD;"
    6871   LIBEXEC_DIR "/singular/MOD;"
    6972   "%b",
     
    7477  {"ProcDir",   'P',    feResPath,  "SINGULAR_PROCS_DIR",
    7578     "%b/MOD;"
    76      LIBEXEC_DIR "/singular/MOD;"
     79     "%r/lib/singular/MOD;"
     80     "%r/libexec/singular/MOD;"
    7781     LIB_DIR "/singular/MOD;"   /*debian: -> /usr/lib/singular/MOD */
    78      "%r/libexec/singular/MOD",                  (char *)""},
     82     LIBEXEC_DIR "/singular/MOD" ,                  (char *)""},
    7983  {"RootDir",   'r',    feResDir,   "SINGULAR_ROOT_DIR",    "%b/..",                (char *)""},
    8084  {"DataDir",   'D',    feResDir,   "SINGULAR_DATA_DIR",    "%b/../share/",          (char *)""},
Note: See TracChangeset for help on using the changeset viewer.