Changeset 810238 in git


Ignore:
Timestamp:
May 13, 2014, 6:57:51 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
3c7cefec02dda99293f86b874f8fae348dc2a2f3
Parents:
a3aecc9c7c70c1bbabe64e5bc98299e0d162e87a
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-13 18:57:51+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-26 18:59:33+02:00
Message:
List internal builtins in m4/options.m4
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/bigintm/mod_main.cc

    ra3aecc r810238  
    11#include <kernel/mod2.h>
     2
     3#include <Singular/mod_lib.h>
    24
    35#include <Singular/blackbox.h>
  • Singular/dyn_modules/staticdemo/Makefile.am

    ra3aecc r810238  
    33if SI_BUILTIN_STATICDEMO
    44  noinst_LTLIBRARIES=staticdemo.la
    5   P_PROCS_MODULE_LDFLAGS=
     5  P_PROCS_MODULE_LDFLAGS=-module
    66  P_PROCS_CPPFLAGS_COMMON=-DSTATIC_VERSION
    77
     
    1111      $(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) $(GOOGLE_PERFTOOLS_CFLAGS)
    1212
    13   syzextra_la_SOURCES   = staticdemo.cc
    14   syzextra_la_CPPFLAGS  = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
    15   syzextra_la_LDFLAGS   = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS}
     13  staticdemo_la_SOURCES   = staticdemo.cc
     14  staticdemo_la_CPPFLAGS  = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON}
     15  staticdemo_la_LDFLAGS   = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS}
    1616else
    1717  EXTRA_DIST=staticdemo.cc
  • Singular/iplib.cc

    ra3aecc r810238  
    716716}
    717717
    718 #define SI_GET_BUILTIN_MOD_INIT(name) \
    719  if (strcmp(libname, #name ".so") == 0){ int SI_MOD_INIT(name)(SModulFunctions*); return SI_MOD_INIT(name); }
     718#define SI_GET_BUILTIN_MOD_INIT(name) if (strcmp(libname, #name ".so") == 0){ extern "C" int SI_MOD_INIT0(name)(SModulFunctions*); return SI_MOD_INIT0(name); }
    720719
    721720SModulFunc_t
  • Singular/mod_lib.cc

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

    ra3aecc r810238  
    22#define MOD_LIB_H
    33
     4#define SI_MOD_INIT0(name) name##_mod_init
     5
    46#ifdef STATIC_VERSION
    5 #  define SI_MOD_INIT(name) name##_mod_init
     7#  define SI_MOD_INIT(name) SI_MOD_INIT0(name)
    68#elif defined(DYNAMIC_VERSION)
    79#  define SI_MOD_INIT(name) mod_init
    8 #else
    9 #  error Please use SI_MOD_INIT inside a Singular (dynamic/shared/static/builtin) module only!
    1010#endif
    1111
  • m4/options.m4

    ra3aecc r810238  
    298298
    299299 AC_ARG_VAR( [BUILTIN_LIBS], [LIB FLAGS for buildins] )
    300  AC_ARG_WITH(builtinmodules, AS_HELP_STRING([--with-builtinmodules], [List of builtin modules (experimental)]))
    301  
     300 AC_ARG_WITH(builtinmodules,
     301   AS_HELP_STRING([--with-builtinmodules], [List of builtin modules (experimental), default: all of internal]),
     302   [if test "x$with_builtinmodules" == xyes; then
     303    with_builtinmodules=staticdemo,bigintm,syzextra,pyobject,gfanlib,polymake,singmathic
     304   fi],
     305   [with_builtinmodules=""]
     306 )
     307
    302308 AH_TEMPLATE([SI_BUILTINMODULES_ADD],[Add(list) for Builtin modules])
    303309
    304310 #### TODO Dynamic Modules???
    305  L=""
     311  L=""
     312  bi_staticdemo=false
     313  bi_syzextra=false
     314  bi_pyobject=false
     315  bi_gfanlib=false
     316  bi_polymake=false
     317  bi_singmathic=false
     318  bi_bigintm=false
     319 
    306320 
    307321 if test "x$with_builtinmodules" == xno; then
     
    310324  AC_MSG_RESULT(yes)
    311325 
    312   if test "x$with_builtinmodules" == xall; then
    313     with_builtinmodules=staticdemo,syzextra,pyobject,gfanlib,polymake,singmathic
    314   fi
     326  L=""
    315327 
    316   LL=""
    317328  for a in ${with_builtinmodules//,/ };
    318329  do
     
    324335      BUILTIN_LIBS+=" dyn_modules/$a/$a.la"
    325336      AC_MSG_RESULT(yes)
     337     
     338# *) AC_MSG_ERROR([bad value ${enableval} for       --enable-debug]) ;;
     339
     340      case "${a}" in
     341       staticdemo ) bi_staticdemo=true;;
     342       syzextra ) bi_syzextra=true ;;
     343       pyobject ) bi_pyobject=true ;;
     344       gfanlib ) bi_gfanlib=true ;;
     345       polymake ) bi_polymake=true ;;
     346       singmathic ) bi_singmathic=true ;;
     347       bigintm ) bi_bigintm=true ;;       
     348      esac
     349
    326350    else
    327351      AC_MSG_RESULT(no)
    328352    fi
    329353   
    330     A=`echo "$a" | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:"  -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`     
    331     AM_CONDITIONAL([SI_BUILTIN_$A],[test -d "Singular/dyn_modules/$a"]a)   
     354    A=`echo "SI_BUILTIN_$a" | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:"  -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`     
     355    echo "A:: $A"
     356#    AM_CONDITIONAL(m4_unquote([A]),[test -d "Singular/dyn_modules/$a"])   
    332357  done # for
    333358
     
    340365 
    341366 AC_DEFINE_UNQUOTED([SI_BUILTINMODULES_ADD(add)],[$L],[Add(list) for Builtin modules])
    342  
    343367 AC_SUBST(BUILTIN_LIBS)
    344 
     368 
     369 AM_CONDITIONAL([SI_BUILTIN_STATICDEMO], [test x$bi_staticdemo = xtrue])
     370 AM_CONDITIONAL([SI_BUILTIN_SYZEXTRA], [test x$bi_syzextra = xtrue])
     371 AM_CONDITIONAL([SI_BUILTIN_PYOBJECT], [test x$bi_pyobject = xtrue])
     372 AM_CONDITIONAL([SI_BUILTIN_GFANLIB], [test x$bi_gfanlib = xtrue])
     373 AM_CONDITIONAL([SI_BUILTIN_POLYMAKE], [test x$bi_polymake = xtrue])
     374 AM_CONDITIONAL([SI_BUILTIN_SINGMATHIC], [test x$bi_singmathic = xtrue])
     375 AM_CONDITIONAL([SI_BUILTIN_BIGINTM], [test x$bi_bigintm = xtrue])
     376 
    345377 AC_MSG_CHECKING([BUILTIN_LIBS...])
    346378 AC_MSG_RESULT(${BUILTIN_LIBS:-unset})
Note: See TracChangeset for help on using the changeset viewer.