Changeset bbeddf in git
- Timestamp:
- Nov 15, 2013, 5:13:23 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 989d6be2dba06d1abec8f5c86bd77f2a001e1e4d
- Parents:
- 1684c331ce908bffa043d3afe97c0a2c4b181d99
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:13:23+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:17:40+01:00
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/mod_lib.h
r1684c3 rbbeddf 9 9 lib_types type_of_LIB(const char *newlib, char *fullname); 10 10 11 12 #if HAVE_GFANLIB 13 #define SI_BUILTIN_GFANLIB(add) add(gfanlib) 14 #else 15 #define SI_BUILTIN_GFANLIB(add) 16 #endif 17 18 11 19 #ifdef EMBED_PYTHON 12 #define SI_BUILTIN_PYOBJECT(add) add(pyobject) add(syzextra)20 #define SI_BUILTIN_PYOBJECT(add) add(pyobject) add(syzextra) SI_BUILTIN_GFANLIB(add) 13 21 //TODO: the line above means that syzextra should be staticly embedded IFF pyobjects do so :( 14 22 #else -
dyn_modules/callgfanlib/Makefile.am
r1684c3 rbbeddf 1 1 ACLOCAL_AMFLAGS = -I ../../m4 2 2 3 moduledir = $(libexecdir)/singular/MOD 4 5 if HAVE_GFANLIB 6 if ENABLE_P_PROCS_DYNAMIC 7 module_LTLIBRARIES=gfanlib.la 8 endif 9 endif 10 11 12 CXXTEMPLFLAGS = 13 ## -fno-implicit-templates 14 ## --no-exceptions 15 16 # DEBUGCXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${CXXTEMPLFLAGS} 17 # 18 # NODEBUGCFLAGS = -O3 -w -fomit-frame-pointer ${PIPE} 19 # NODEBUGCXXFLAGS = -O3 -w -fomit-frame-pointer ${CXXTEMPLFLAGS} 20 # ## --no-rtti ? 21 # NODEBUGDEFS = -DNDEBUG -DOM_NDEBUG 22 23 # -DHAVE_CONFIG_H?? 3 SOURCES = bbcone.cc bbcone.h bbfan.cc bbfan.h bbpolytope.cc bbpolytope.h gfan.h gitfan.cc gitfan.h gfanlib.cc 24 4 25 5 MYINCLUDES = -I${top_srcdir} -I${top_builddir} -I${srcdir} \ … … 28 8 $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) 29 9 30 #### AM_LDFLAGS = -release ${PACKAGE_VERSION} 31 # -L${abs_top_builddir}/gfanlib/ 32 # -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \ 33 # -L${top_builddir}/libpolys/polys $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/resources 34 35 36 37 SOURCES = bbcone.cc bbcone.h bbfan.cc bbfan.h bbpolytope.cc bbpolytope.h gfan.h gitfan.cc gitfan.h gfanlib.cc 38 gfanlib_la_SOURCES = $(SOURCES) 39 # gfanlib_g_la_SOURCES = $(SOURCES) 40 41 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION 42 43 gfanlib_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 44 # ${NODEBUGDEFS} 45 # gfanlib_g_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 46 47 # gfanlib_la_CXXFLAGS = ${NODEBUGCXXFLAGS} 48 # gfanlib_g_la_CXXFLAGS = ${DEBUGCXXFLAGS} 49 50 51 gfanlib_la_LIBADD = ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS} 52 # gfanlib_g_la_LIBADD = ${gfanlib_la_LIBADD} 10 if HAVE_GFANLIB 11 module_LTLIBRARIES=gfanlib.la 12 endif 53 13 54 14 if ENABLE_P_PROCS_DYNAMIC 55 P_PROCS_MODULE_LDFLAGS = ${AM_LDFLAGS} -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 15 moduledir = $(libexecdir)/singular/MOD 16 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION 17 # Add under Mac OS X: -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 56 18 else 57 P_PROCS_MODULE_LDFLAGS = ${AM_LDFLAGS} 19 moduledir = $(libdir)/singular 20 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 58 21 endif 59 22 60 # Add under Mac OS X:-flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup23 P_PROCS_MODULE_LDFLAGS = -module -export-dynamic -avoid-version -flat_namespace -weak_reference_mismatches weak -undefined dynamic_lookup 61 24 62 gfanlib_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 63 # gfanlib_g_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGSG} 25 gfanlib_la_SOURCES = $(SOURCES) 26 gfanlib_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} 27 gfanlib_la_LDFLAGS = ${AM_LDFLAGS} ${P_PROCS_MODULE_LDFLAGS} 64 28 65 29 gfanlib_la_LIBADD = ${abs_top_builddir}/gfanlib/libgfan.la ${CDDGMPLDFLAGS} 66 30 67 31 -
dyn_modules/callgfanlib/gfanlib.cc
r1684c3 rbbeddf 9 9 #include <bbpolytope.h> 10 10 #include <gitfan.h> 11 #include "Singular/ipid.h" 11 12 #include <Singular/ipid.h> 13 #include <Singular/mod_lib.h> 12 14 13 15 template class gfan::Vector<gfan::Integer>; … … 16 18 template class gfan::Matrix<gfan::Rational>; 17 19 18 extern "C" int mod_init(SModulFunctions* p)20 int SI_MOD_INIT(gfanlib)(SModulFunctions* p) 19 21 { 20 22 bbcone_setup(p); … … 22 24 bbpolytope_setup(p); 23 25 gitfan_setup(p); 26 return 0; 24 27 } 28 29 #ifndef EMBED_PYTHON 30 extern "C" 31 { 32 int mod_init(SModulFunctions* psModulFunctions) 33 { 34 return SI_MOD_INIT(gfanlib)(psModulFunctions); 35 } 36 } 37 #endif -
gfanlib/Makefile.am
r1684c3 rbbeddf 3 3 if HAVE_GFANLIB 4 4 libgfan_LTLIBRARIES=libgfan.la 5 # if WANT_DEBUG6 # libgfan_LTLIBRARIES+=libgfan_g.la7 # endif8 5 endif 9 6 10 7 libgfandir = $(libdir)/ 11 8 12 #CXXTEMPLFLAGS =-ftrapv13 ### -fno-implicit-templates14 15 #libgfan_la_CFLAGS = -O3 -fpermissive -fomit-frame-pointer ${PIPE}16 #libgfan_g_la_CFLAGS = ${PIPE}17 18 # libgfan_la_CXXFLAGS = -O3 -fpermissive -fomit-frame-pointer ${PIPE} ${CXXTEMPLFLAGS} -fno-exceptions -fno-rtti19 # libgfan_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} ${CXXTEMPLFLAGS}20 # -fdiagnostics-show-option21 22 9 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -DGMPRATIONAL -DHAVE_CONFIG_H 23 24 # libgfan_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG25 # libgfan_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H26 10 27 11 SOURCES = gfanlib_zcone.cpp gfanlib_symmetry.cpp gfanlib_symmetriccomplex.cpp gfanlib_polyhedralfan.cpp gfanlib_zfan.cpp gfanlib_polymakefile.cpp 28 12 libgfan_la_SOURCES = $(SOURCES) 29 # libgfan_g_la_SOURCES = $(SOURCES)30 13 31 14 libgfan_includedir =$(includedir)/gfanlib/ -
gfanlib/configure.ac
r1684c3 rbbeddf 24 24 25 25 # Checks for libraries. 26 27 26 LT_INIT 28 27 … … 30 29 AC_HEADER_STDC 31 30 32 LB_CHECK_GMP(4.0,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))33 SING_CHECK_GFANLIB34 35 # AC_CHECK_HEADERS([gmp.h])36 # if test "$ac_cv_header_gmp_h" == no37 # then38 # AC_MSG_WARN([Error, gmp.h is missing!])39 # exit 140 # fi41 AC_CHECK_HEADERS([cdd/setoper.h setoper.h cddlib/setoper.h])42 # if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no -a "$ac_cv_header_cddlib_setoper_h" == no43 #then44 # AC_MSG_WARN([Error, setoper.h is missing!])45 #fi46 47 # if setoper.h is there, assume that also cdd.h is there48 49 #if test "x$ENABLE_GFANLIB" = xyes; then50 #if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no -a "$ac_cv_header_cddlib_setoper_h" == no51 #then52 ### exit 053 #fi54 #fi55 56 31 # Checks for typedefs, structures, and compiler characteristics. 57 32 AC_C_INLINE 58 33 34 LB_CHECK_GMP(4.0,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)])) 35 36 SING_CHECK_GFANLIB 59 37 60 38 #AC_MSG_RESULT($ac_cv_singuname) -
m4/gfanlib-check.m4
r1684c3 rbbeddf 9 9 [ENABLE_GFANLIB="no"]) 10 10 11 BACKUP_LIBS=$LIBS 11 AC_MSG_CHECKING(whether to build with gfanlib) 12 12 13 AC_MSG_CHECKING(whether to build with gfanlib)14 13 if test "x$ENABLE_GFANLIB" = xyes; then 15 14 AC_MSG_RESULT(yes) 15 16 AC_CHECK_HEADERS([setoper.h cdd/setoper.h cddlib/setoper.h]) 17 18 if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no -a "$ac_cv_header_cddlib_setoper_h" == no 19 then 20 AC_MSG_WARN([Error, setoper.h is missing!]) 21 fi 22 23 AC_MSG_CHECKING([whether libcddgmp is usable]) 24 25 BACKUP_LIBS=$LIBS 26 27 LIBS="-lcddgmp $GMP_LIBS $LIBS" 28 16 29 AC_LANG_PUSH(C++) 17 SAVE_LIBS=$LIBS 18 LIBS="-lcddgmp $GMP_LIBS $LIBS" 19 AC_LINK_IFELSE( 20 [AC_LANG_PROGRAM([#include <cdd/setoper.h> 21 #include <cdd/cdd.h>], 22 [dd_set_global_constants()])], 23 [LIBS="-lcddgmp $SAVE_LIBS"] [CDDGMPLDFLAGS="-lcddgmp"] 24 [PASSED_ALL_TESTS_FOR_GFANLIB="yes"], 25 [AC_MSG_WARN([libcddgmp is not installed.])] 26 [PASSED_ALL_TESTS_FOR_GFANLIB="no" 27 ] 28 ) 29 if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then 30 AC_LINK_IFELSE( 31 [AC_LANG_PROGRAM([#include <setoper.h> 32 #include "cdd.h"], 33 [dd_set_global_constants()])], 34 [LIBS="$SAVE_LIBS -lcddgmp"] [CDDGMPLDFLAGS="-lcddgmp"] 35 [PASSED_ALL_TESTS_FOR_GFANLIB="yes"], 36 [AC_MSG_WARN([libcddgmp is not installed.])] 37 [PASSED_ALL_TESTS_FOR_GFANLIB="no" 38 ] 39 ) 40 fi 41 if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then 42 AC_LINK_IFELSE( 43 [AC_LANG_PROGRAM([#include <cddlib/setoper.h> 44 #include "cddlib/cdd.h"], 45 [dd_set_global_constants()])], 46 [LIBS="$SAVE_LIBS -lcddgmp"] [CDDGMPLDFLAGS="-lcddgmp"] 47 [PASSED_ALL_TESTS_FOR_GFANLIB="yes"], 48 [AC_MSG_WARN([libcddgmp is not installed.])] 49 [PASSED_ALL_TESTS_FOR_GFANLIB="no" 50 ] 51 ) 52 fi 53 AC_LANG_POP() 30 AC_LINK_IFELSE( 31 [ 32 AC_LANG_PROGRAM( 33 [ 34 #ifdef HAVE_SETOPER_H 35 # include <setoper.h> 36 # include <cdd.h> 37 #endif 38 #ifdef HAVE_CDD_SETOPER_H 39 # include <cdd/setoper.h> 40 # include <cdd/cdd.h> 41 #endif 42 #ifdef HAVE_CDDLIB_SETOPER_H 43 # include <cddlib/setoper.h> 44 # include <cddlib/cdd.h> 45 #endif 46 ], [dd_set_global_constants()] ) 47 ], 48 [PASSED_ALL_TESTS_FOR_GFANLIB="1"] [CDDGMPLDFLAGS="-lcddgmp"], 49 [PASSED_ALL_TESTS_FOR_GFANLIB="0"] 50 ) 51 AC_LANG_POP() 52 53 LIBS=$BACKUP_LIBS 54 55 AC_MSG_RESULT(no) 56 57 AC_SUBST(CDDGMPLDFLAGS) 54 58 else 55 59 AC_MSG_RESULT(no) 56 PASSED_ALL_TESTS_FOR_GFANLIB=" no";60 PASSED_ALL_TESTS_FOR_GFANLIB="0" 57 61 fi 58 62 59 LIBS=$BACKUP_LIBS60 63 61 AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = xyes) 64 AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1) 65 AC_DEFINE_UNQUOTED(HAVE_GFANLIB, ${PASSED_ALL_TESTS_FOR_GFANLIB}, [whether gfanlib support is enabled]) 62 66 63 67 ])
Note: See TracChangeset
for help on using the changeset viewer.