Changeset c1e7a6 in git


Ignore:
Timestamp:
Dec 13, 2012, 4:14:38 PM (10 years ago)
Author:
Alexander Dreyer <adreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
Children:
f4399e865a8d7da06b4d0e0a3d19e4c3acc2d8dc
Parents:
57dcd6dcce5b13d67c7a17d1b1dc57c9b4de98c9
git-author:
Alexander Dreyer <adreyer@gmx.de>2012-12-13 16:14:38+01:00
git-committer:
Alexander Dreyer <adreyer@gmx.de>2012-12-14 14:04:50+01:00
Message:
Optionally supporting python embedding
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.am

    r57dcd6 rc1e7a6  
    1616CXXTEMPLFLAGS =-ftrapv ## -fno-implicit-templates
    1717
    18 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/numeric -I${top_builddir}/numeric -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS)
     18AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/numeric -I${top_builddir}/numeric -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) ${EMBED_PYOBJECT_CFLAGS}
    1919
    2020########################### libSingular* #########################
     
    222222Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
    223223
    224 Singular_LDADD = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la ${top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    225 Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top_builddir}/kernel/libkernel_g.la ${top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
     224Singular_LDADD = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la ${top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
     225Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top_builddir}/kernel/libkernel_g.la ${top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
    226226
    227227Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
     
    244244nodist_Singulardg_SOURCES =  libSingular_g.la
    245245
    246 Singulard_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    247 Singulardg_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
     246Singulard_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
     247Singulardg_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
    248248
    249249Singulard_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
     
    332332test_s_g_SOURCES = test.cc
    333333
    334 test_s_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    335 test_s_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
     334test_s_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
     335test_s_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
    336336
    337337test_s_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
     
    353353test_d_g_SOURCES = test.cc
    354354
    355 test_d_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    356 test_d_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
     355test_d_r_LDADD = libSingular.la -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
     356test_d_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT_LDFLAGS}
    357357
    358358test_d_r_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
     
    392392        ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD
    393393
    394 if PYTHON_USE
     394if PYTHON_MODULE
    395395   moduledir = $(bindir)/MOD
    396396   module_LTLIBRARIES = pyobject.la
  • libpolys/configure.ac

    r57dcd6 rc1e7a6  
    132132AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
    133133
     134AX_PYTHON_DEFAULT()
     135AX_PYTHON_WITH_VERSION([2.4])
     136
    134137## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
    135138
  • m4/ax_python_with_version.m4

    r57dcd6 rc1e7a6  
    2828        AC_ARG_WITH(
    2929            python,
    30             AS_HELP_STRING([--with-python@<:@=PYTHON@:>@],
     30            AS_HELP_STRING([--with-python@<:@=@<:@embed,@:>@PYTHON@:>@],
    3131                [absolute path name of Python executable]
    3232            ),
    3333            [],[withval="yes"]
    3434        )
     35        py_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
     36        for elt in $withval; do
     37          IFS="$py_save_ifs"
     38          case $elt in
     39            embed|embedding)
     40              si_try_embed=true
     41            ;;
     42            static|dynamic|shared|module)
     43            ;;
     44            *)
     45            si_withval=$elt
     46          esac
     47        done
     48        IFS="$py_save_ifs"
     49        if test x"$si_withval" = x""
     50        then
     51           withval="yes"
     52        else
     53           withval="$si_withval"
     54        fi
     55
    3556        AC_MSG_RESULT($withval)
    3657        if test "$withval" = "no"
     
    5980                AX_PYTHON_VERSION_CHECK([$1],
    6081                                        [ ax_python_use=true
     82                                          si_embed_python=$si_try_embed
    6183                                          AC_MSG_RESULT(yes)
    6284                                          AX_PYTHON_PREFIX( )
     
    6486                                          AX_PYTHON_CSPEC( )
    6587                                        ],
    66                                         [ax_python_use=false; AC_MSG_RESULT([too old, skipping python interface!])]
     88                                        [ax_python_use=false
     89                                         AC_MSG_RESULT([too old, skipping python interface!])]
    6790                )
    6891            fi
    6992        fi   
    7093        AM_CONDITIONAL(PYTHON_USE, test x"$ax_python_use" = x"true")
     94        AM_CONDITIONAL(SI_EMBED_PYTHON, test x"$si_embed_python" = x"true")
     95
     96        if  test x"$si_embed_python" = x"true"
     97        then
     98          AC_DEFINE(EMBED_PYTHON,1,integrate python)
     99          AC_SUBST(EMBED_PYOBJECT_CFLAGS,"\${PYTHON_CSPEC}")
     100          AC_SUBST(EMBED_PYOBJECT_LDFLAGS,"\${PYTHON_LSPEC}")
     101        fi
     102
     103        AM_CONDITIONAL(PYTHON_MODULE, test x"$si_embed_python" != x"true")
    71104    fi
    72105
Note: See TracChangeset for help on using the changeset viewer.