Changeset e6c3d1 in git


Ignore:
Timestamp:
Jan 18, 2013, 3:20:53 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
271d25946dbb409d16650bb1ecdffccf0c03594e65eb96fdc6f956671461df48dd8f6bde869c96f8
Parents:
2aee667644f2d68561171e8c9ca4258221af3702ebdbfddc10fbb7eff4bf79217b5742f5f24d9a78
Message:
Merge pull request #252 from alexanderdreyer/spielwiese-pyobject

Ensuring ./configure picks python2 
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.am

    r2aee66 re6c3d1  
    413413pyobject_la_SOURCES += pyobject.cc
    414414endif
    415 pyobject_la_SOURCES = pyobject.cc
    416415pyobject_la_CPPFLAGS   = ${AM_CPPFLAGS} ${NODEBUGDEFS}
    417416pyobject_g_la_CPPFLAGS = ${AM_CPPFLAGS}
  • libpolys/coeffs/coeffs.h

    rebdbfd re6c3d1  
    9494{
    9595   coeffs next;
    96    unsigned int ringtype;  /* =0 => coefficient field,
     96   /*unsigned int ringtype;  =0 => coefficient field,
    9797                             !=0 => coeffs from one of the rings:
    9898                              =1 => Z/2^mZ
     
    609609// Tests:
    610610static inline BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
    611 { assume(r != NULL); return (r->ringtype == 1); }
     611{ assume(r != NULL); return (getCoeffType(r)==n_Z2m); }
    612612
    613613static inline BOOLEAN nCoeff_is_Ring_ModN(const coeffs r)
    614 { assume(r != NULL); return (r->ringtype == 2); }
     614{ assume(r != NULL); return (getCoeffType(r)==n_Zn); }
    615615
    616616static inline BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
    617 { assume(r != NULL); return (r->ringtype == 3); }
     617{ assume(r != NULL); return (getCoeffType(r)==n_Znm); }
    618618
    619619static inline BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
    620 { assume(r != NULL); return (r->ringtype == 4); }
     620{ assume(r != NULL); return (getCoeffType(r)==n_Z); }
    621621
    622622static inline BOOLEAN nCoeff_is_Ring(const coeffs r)
    623 { assume(r != NULL); return (r->ringtype != 0); }
     623{ assume(r != NULL); return ((getCoeffType(r)==n_Z) || (getCoeffType(r)==n_Z2m) || (getCoeffType(r)==n_Zn) || (getCoeffType(r)==n_Znm)); }
    624624
    625625/// returns TRUE, if r is not a field and r has no zero divisors (i.e is a domain)
     
    628628  assume(r != NULL);
    629629#ifdef HAVE_RINGS
    630   return (r->ringtype == 4 || r->ringtype == 0);
     630  return (getCoeffType(r)==n_Z || ((getCoeffType(r)!=n_Z2m) && (getCoeffType(r)!=n_Zn) && (getCoeffType(r)!=n_Znm)));
    631631#else
    632632  return TRUE;
     
    707707/// returns TRUE, if r is not a field and r has non-trivial units
    708708static inline BOOLEAN nCoeff_has_Units(const coeffs r)
    709 { assume(r != NULL); return ((r->ringtype == 1) || (r->ringtype == 2) || (r->ringtype == 3)); }
     709{ assume(r != NULL); return ((getCoeffType(r)==n_Zn) || (getCoeffType(r)==n_Z2m) || (getCoeffType(r)==n_Znm)); }
    710710
    711711static inline BOOLEAN nCoeff_is_Zp(const coeffs r)
  • libpolys/coeffs/rintegers.cc

    rebdbfd re6c3d1  
    430430  r->nNULL = 0;
    431431  r->ch = 0;
    432   r->ringtype = 4;
    433432  r->has_simple_Alloc=FALSE;
    434433  r->has_simple_Inverse=FALSE;
  • libpolys/coeffs/rmodulo2m.cc

    rebdbfd re6c3d1  
    5454  r->modBase = (int_number) omAllocBin (gmp_nrz_bin);
    5555  mpz_init_set_si (r->modBase, 2L);
    56   r->ringtype = 1;
    5756  r->modNumber= (int_number) omAllocBin (gmp_nrz_bin);
    5857  mpz_init (r->modNumber);
  • libpolys/coeffs/rmodulon.cc

    rebdbfd re6c3d1  
    5555  nrnInitExp (info->exp, r);
    5656
    57   if (info->exp > 1)
    58     r->ringtype= 3;
    59   else
    60     r->ringtype= 2;
    6157  /* next computation may yield wrong characteristic as r->modNumber
    6258     is a GMP number */
     
    508504      nCoeff_is_Ring_2toM(src) || nCoeff_is_Zp(src))
    509505  {
    510     if (   (src->ringtype > 0)
     506    if (   (!nCoeff_is_Zp(src))
    511507        && (mpz_cmp(src->modBase, dst->modBase) == 0)
    512508        && (src->modExponent == dst->modExponent)) return nrnMapGMP;
  • libpolys/polys/ext_fields/algext.cc

    rebdbfd re6c3d1  
    11921192}
    11931193
     1194void naKillChar(coeffs cf)
     1195{
     1196   if ((--cf->extRing->ref) == 0)
     1197     rDelete(cf->extRing);
     1198}
     1199
     1200
    11941201
    11951202BOOLEAN naInitChar(coeffs cf, void * infoStruct)
     
    12571264  cf->cfCoeffWrite   = naCoeffWrite;
    12581265  cf->cfNormalize    = naNormalize;
     1266  cf->cfKillChar     = naKillChar;
    12591267#ifdef LDEBUG
    12601268  cf->cfDBTest       = naDBTest;
  • m4/ax_python_with_version.m4

    r2aee66 re6c3d1  
    3333            [],[withval="yes"]
    3434        )
     35        si_try_embed="no"
    3536        py_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
    3637        for elt in $withval; do
     
    3839          case $elt in
    3940            embed|embedding)
    40               si_try_embed=true
     41              si_try_embed="yes"
    4142            ;;
    4243            static|dynamic|shared|module)
     
    6465                # for the executable.
    6566                # So, let's search the PATH Environment Variable.
    66                 AC_PATH_PROG(
     67                AC_PATH_PROGS(
    6768                    [PYTHON],
    68                     python,
     69                    [python2 python],
    6970                    [],
    7071                    $2
     
    7980            else
    8081                AX_PYTHON_VERSION_CHECK([$1],
    81                                         [ ax_python_use=true
    82                                           si_embed_python=$si_try_embed
    83                                           AC_MSG_RESULT(yes)
    84                                           AX_PYTHON_PREFIX( )
    85                                           AX_PYTHON_LSPEC( )
    86                                           AX_PYTHON_CSPEC( )
    87                                         ],
    88                                         [ax_python_use=false
    89                                          AC_MSG_RESULT([too old, skipping python interface!])]
     82                  [ AC_MSG_RESULT(yes)
     83                    AX_PYTHON_VERSION_CHECK([3],
     84                    [ ax_python_use=false
     85                      AC_MSG_RESULT([too recent, skipping python interface!])
     86                    ],
     87                    [ ax_python_use=true
     88                      si_embed_python=$si_try_embed
     89                      AC_MSG_RESULT([no (ok)])
     90                      AC_MSG_CHECKING(embedding python interface module)
     91                      AC_MSG_RESULT($si_try_embed)
     92                      AX_PYTHON_PREFIX( )
     93                      AX_PYTHON_LSPEC( )
     94                      AX_PYTHON_CSPEC( )
     95                    ])
     96                  ],
     97                  [ ax_python_use=false
     98                    AC_MSG_RESULT([too old, skipping python interface!])]
    9099                )
    91100            fi
    92101        fi   
    93102
    94         if  test x"$si_embed_python" = x"true"
     103        if  test x"$si_embed_python" = x"yes"
    95104        then
    96105          AC_DEFINE(EMBED_PYTHON,1,integrate python)
     
    105114   
    106115    AM_CONDITIONAL(PYTHON_USE, test x"$ax_python_use" = x"true")
    107     AM_CONDITIONAL(SI_EMBED_PYTHON, test x"$ax_python_use$si_embed_python" = x"truetrue")
    108     AM_CONDITIONAL(PYTHON_MODULE, test x"$ax_python_use" = x"true" -a x"$si_embed_python" != x"true" )
     116    AM_CONDITIONAL(SI_EMBED_PYTHON, test x"$ax_python_use$si_embed_python" = x"trueyes")
     117    AM_CONDITIONAL(PYTHON_MODULE, test x"$ax_python_use" = x"true" -a x"$si_embed_python" != x"yes" )
    109118
    110119])
Note: See TracChangeset for help on using the changeset viewer.