/******************************************************************* * Computer Algebra System SINGULAR * * mod2.h: Main configuration file for Singular * DO NOT EDIT! * * Version: $Id: mod2.h.in,v 1.76 1999-11-16 10:52:41 hannes Exp $ *******************************************************************/ #ifndef MOD2_H #define MOD2_H /******************************************************************* * Defines which are set by configure ******************************************************************/ /* Define to use dynamic linking */ #undef HAVE_DL /* Define to use readline lib for fancy display */ #undef HAVE_READLINE /* Define to use built-in command line parser */ #undef HAVE_FEREAD /* Define if you want to use dld's */ #undef HAVE_DLD /* Define to have dbm links */ #undef HAVE_DBM /* Define to have smallgmp */ #undef HAVE_SMALLGMP /* Define to have MP links */ #undef HAVE_MPSR /* Define to have factory functionality added */ #undef HAVE_FACTORY /* Define to have libfac functionality added */ #undef HAVE_LIBFAC_P /* Define if you have stdc headers */ #undef STDC_HEADERS /* Define if you have asm/sigcontext.h */ #undef HAVE_ASM_SIGCONTEXT_H /* Define if you have sys/file.h */ #undef HAVE_SYS_FILE_H /* Define if you have sys/stat.h */ #undef HAVE_SYS_STAT_H /* Define if you have sys/param.h */ #undef HAVE_SYS_PARAM_H /* Define if you have sys/file.h */ #undef HAVE_SYS_TYPES_H /* Define if you have sys/ioctl.h */ #undef HAVE_SYS_IOCTL_H /* Define if you have sys/time.h */ #undef HAVE_SYS_TIME_H /* Define if you have sys/times.h */ #undef HAVE_SYS_TIMES_H /* io header: */ /* Define if you have termcap.h */ #undef HAVE_TERMCAP_H /* Define if you have termios.h */ #undef HAVE_TERMIOS_H /* Define if you have readline/history.h */ #undef HAVE_READLINE_HISTORY_H /* Define if readline/readline.h is ok */ #undef READLINE_READLINE_H_OK /* Define if time.h and sys/time.h can be included at the same time */ #undef TIME_WITH_SYS_TIME /* Define if you have alloca.h */ #undef HAVE_ALLOCA_H /* Define if you have pwd.h */ #undef HAVE_PWD_H /* Define if you have unistd.h */ #undef HAVE_UNISTD_H /* define if you have malloc.h */ #undef HAVE_MALLOC_H /* define if you have pwd.h*/ #undef HAVE_PWD_H /* Define if you have alloca */ #undef HAVE_ALLOCA /* Define if you have getpagesize */ #undef GETPAGESIZE /* Define if you have vprintf */ #undef HAVE_VPRINTF /* Define if you have gettimeofday */ #undef HAVE_GETTIMEOFDAY /* Define if you have atexit */ #undef HAVE_ATEXIT /* Define if you have bcopy, bzero and bcmp Linux needs that define! */ #undef HAVE_BCOPY /* Define if sprintf does not return number of printed chars */ #undef BSD_SPRINTF /* define if you have explicit C++ constructors */ #undef HAVE_EXPLICIT_CONSTR /* Define if you have the getcwd function. */ #undef HAVE_GETCWD /* Define if you have the getwd function. */ #undef HAVE_GETWD /* Define if you have snprintf */ #undef HAVE_VSNPRINTF /* Define if you have sbrk */ #undef HAVE_SBRK /* Define if you have readlink */ #undef HAVE_READLINK /* Define if you have usleep */ #undef HAVE_USLEEP /* Define if you have sleep */ #undef HAVE_SLEEP /* Define if you have setenv */ #undef HAVE_SETENV /* Define if you have petpwnam */ #undef HAVE_GETPWNAM /* Define sizeof(char) */ #define SIZEOF_CHAR 1 /* Define sizeof(short) */ #define SIZEOF_SHORT 2 /* Define sizeof(int) */ #define SIZEOF_INT 4 /* Define sizeof(long) */ #define SIZEOF_LONG 4 /* Define sizeof(void*) */ #define SIZEOF_VOIDP 4 /* Define sizeof(double) */ #define SIZEOF_DOUBLE 8 /* Define if your integer format is big endian */ #undef WORDS_BIGENDIAN /* Define the type of the exponents to be used in monomials */ #define EXPONENT_TYPE short /* Define the size of exponent */ #define SIZEOF_EXPONENT SIZEOF_SHORT /* Define major version of Singular -- should be set in ../configure.in!!!*/ #define SINGULAR_MAJOR_VERSION 0 /* Define minor version of Singular -- should be set in ../configure.in!!! */ #define SINGULAR_MINOR_VERSION 0 /* Define sub version of Singular -- should be set in ../configure.in!!! */ #define SINGULAR_SUB_VERSION 0 /* Define version as a string */ #define S_VERSION1 "" /* Define version date as a string */ #define S_VERSION2 "" /* Define uname identifier as a string */ #define S_UNAME "" /* Absolute pathname of root directory of Singular source */ #define S_ROOT_DIR "" /* Define if our gmalloc is to be used */ #undef HAVE_GMALLOC /* Define pagesize of your system */ #define SIZE_OF_SYSTEM_PAGE 4096 /* size of page as we can use it */ #define SIZE_OF_PAGE SIZE_OF_SYSTEM_PAGE /* valloc routine which returns chunk of SIZE_OF_PAGE */ #define PALLOC malloc #define PFREE free /* define if you have the MTRACK utilities (only on linux/elf) */ #undef HAVE_MTRACK /******************************************************************* * Defines which are not set by configure ******************************************************************/ /* define to use the dynamic linking of readline in non-distributions builds */ /* #undef USE_STATIC_RL */ /* Default value for timer resolution in ticks per second */ /* set to 10 for resolution of tenth of a second, etc */ #define TIMER_RESOLUTION 1 /* Undefine to disable the quote/eval of expressions */ #define SIQ 1 /* Define to enable TCL interface */ #undef HAVE_TCL /* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */ #define FAST_AND_DIRTY #ifdef __MWERKS__ /* includes for Metrowerks */ #include "mod2.mwerks.h" #else /* works around a quirk in the generation of parser tables */ #define INIT_BUG #endif /* linear algebra extensions from pcv.h/pcv.cc */ #define HAVE_PCV 1 /* Define to use old mechanismen for saving currRing with procedures * Does not work with HAVE_NAMESPACES enabled */ #undef USE_IILOCALRING /* Define to use new namespaces techniks */ #undef HAVE_NAMESPACES /* Define to enable dynamic module code */ #undef HAVE_DYNAMIC_LOADING /* Define to use scanner when loading libraries */ #define HAVE_LIBPARSER /*#define PROFILING*/ #ifdef PROFILING #define PROFILER ,0,0 #else #define PROFILER #endif /* Define to use gmp for rational arithmetic */ #define HAVE_GMP /******************************************************************* * Evaluate the set defines ******************************************************************/ /* dynamic readline or readline ? */ #ifdef HAVE_DL #if !defined(USE_STATIC_RL) #define HAVE_DYN_RL #endif #endif /* FGLM needs factory */ #ifdef HAVE_FACTORY #define HAVE_FGLM #endif /* Define if you want fglm for homogeneous case */ #ifdef HAVE_FGLM #undef HAVE_FGLM_HOME #endif /* Spectrum needs GMP */ #ifdef HAVE_GMP /* #define HAVE_SPECTRUM */ #endif /* Undefine to disable real time measurments */ #ifdef HAVE_GETTIMEOFDAY #if ! defined(__MWERKS__) && ! defined(MSDOS) #define HAVE_RTIMER #else #undef HAVE_RTIMER #endif #endif #if SIZEOF_VOIDP == 8 /* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */ #define ALIGN_8 #define LOG_SIZEOF_LONG 3 #define LOG_SIZEOF_VOIDP 3 #else #define LOG_SIZEOF_LONG 2 #define LOG_SIZEOF_VOIDP 2 #endif #ifndef CHAR_BIT #define CHAR_BIT 8 #endif #define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG #define SINGULAR_VERSION (SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION) #if SIZEOF_EXPONENT == 1 #define MAX_EXPONENT 0x7f #define MAX_COMPONENT 0xff #elif SIZEOF_EXPONENT == 2 #define MAX_EXPONENT 0x7fff #define MAX_COMPONENT 0xffff #else /* SIZEOF_EXPONENT == 4 */ #define MAX_EXPONENT 0x7fffffff #define MAX_COMPONENT 0xffffffff #endif /******************************************************************* * Miscellanous Defines ******************************************************************/ /* define MM_COUNT to enable "memory(0)" (resp. memory(1))*/ #define MM_COUNT 1 #ifndef HAVE_LIBPARSER # undef YYLPDEBUG #else # define YYLPDEBUG 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef NULL #define NULL (0) #endif #ifndef SEEK_END #define SEEK_END 2 #endif #ifndef SEEK_SET #define SEEK_SET 0 #endif #define HALT() m2_end(2) #define memcpy4 memcpy /* define OLD_RES for res/sres/mres(i,j,k) */ #undef OLD_RES /* the maximal ascii length of an int number + 1 = 11 for 32 bit int */ #define MAX_INT_LEN 11 #define MAX_INT_VAL 0x7fffffff extern int pShortOut; #ifdef DO_PROFILE /* define to enable explicit profiling of some crucial inline * routines and defines */ #undef DO_DEEP_PROFILE #endif #define buildin_rand 1 /* define to enable assume */ #ifndef HAVE_ASSUME #undef HAVE_ASSUME #endif /* set to 0 to disable aso memory mamagent */ #ifndef HAVE_ASO #define HAVE_ASO 1 #endif #if defined(HAVE_ASO) && HAVE_ASO == 1 /* define to enable ASO debugging */ #undef ASO_DEBUG #endif /******************************************************************* * DEBUG OPTIONS * -- only significant for for compiling without -DNDEBUG * -- you better know what your are doing, if you touch this ******************************************************************/ #ifndef NDEBUG /* undefine to disable assume -- should normally be defined for NDEBUG */ #define HAVE_ASSUME /* undef MDEBUG to disable memory checks * * define MDEBUG to * -1 to enable MTRACK, but to skip memory checks * 0 to enable basic memory checks (at least on each alloc/free) * 1 for addtl. containment checks in free/alloc list for each memory check * 2 for addtl. checks of entire free/alloc list at each memory check * 3 for addtl. checks of all heaps at each memory check * NOTE: For MDEBUG > 1, it gets very slow * You can control MDEBUG at run-time by setting the value of the * variable mm_MDEBUG (defined in mmcheck.c) to the appropriate value. */ #define MDEBUG 0 /* undef HEAP_DEBUG to disable heap checks * * define HEAP_DEBUG to * 0 to enable basic heap addr checks (at least on each alloc/free) * 1 for addtl. containment checks in free/alloc list of heap * 2 for addtl. check of entire heap at each heap addr check * NOTE: For HEAP_DEBUG > 1 on, it gets very slow * You can control HEAP_DEBUG at run-time by setting the value of the * variable mm_HEAP_DEBUG (defined in mmheap.c) to the appropriate value. */ /* #define HEAP_DEBUG 0 */ /* define PAGE_DEBUG for page accesses -- never re-uses freed pages */ #ifndef PAGE_DEBUG #undef PAGE_DEBUG #endif /* undef PDEBUG to disable checks of polys * * define PDEBUG to * 0 for basic, explicitely requested tests * 1 for tests in pProcs * 2 for low-level tests (Exponent access, primitive monom operations) * NOTE: for PDEBUG > 1 it gets very slow * You can locally enable tests in pProcs by setting the * define at the beginning of pProcs.cc */ #define PDEBUG 0 /* undef KDEBUG for checck of data during std computations * * define KDEBUG to * 0 for basic tests * 1 for tests in kSpoly * NOTE: You can locally enable tests in kspoly by setting the * define at the beginning of kspoly.cc */ #define KDEBUG 0 /* define LDEBUG checking numbers, undefine otherwise */ #define LDEBUG /* define RDEBUG checking rings (together with TRACE=9) */ #define RDEBUG /* define TEST for non time critical tests, undefine otherwise */ #define TEST /* define MLIST for printing block of used memory on exit */ #define MLIST 1 #ifdef HAVE_MTRACK /* define MTRACK for allowing to keep track of Alloc/Free with a backtrace */ /* works only under linux/elf */ #define MTRACK /* define to enable stack storing of free calls, as well */ #undef MTRACK_FREE #endif /* !NDEBUG */ /* #define PAGE_TEST */ /* define YYDEBUG 1 for debugging bison texts, 0 otherwise */ #define YYDEBUG 1 /* Undefine to disable debugging of MP stuff */ #ifdef HAVE_MPSR #define MPSR_DEBUG #endif /* PDEBUG requires MDEBUG */ #ifdef PDEBUG #ifndef MDEBUG #define MDEBUG 0 #endif #endif #ifdef TEST #ifndef buildin_rand #define buildin_rand 1 #endif #endif /* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */ /* define SPECTRUM_IOSTREAM to use C++ iostream for error messages */ /* #define SPECTRUM_DEBUG */ /* #define SPECTRUM_PRINT */ #undef SPECTRUM_IOSTREAM #ifdef SPECTRUM_DEBUG #define MULTICNT_DEBUG #define GMPRAT_DEBUG #define KMATRIX_DEBUG #define SPLIST_DEBUG #define NPOLYGON_DEBUG #define SEMIC_DEBUG #endif #ifdef SPECTRUM_PRINT #define MULTICNT_PRINT #define GMPRAT_PRINT #define KMATRIX_PRINT #define SPLIST_PRINT #define NPOLYGON_PRINT #define SEMIC_PRINT #endif #ifdef SPECTRUM_IOSTREAM #define MULTICNT_IOSTREAM #define GMPRAT_IOSTREAM #define KMATRIX_IOSTREAM #define SPLIST_IOSTREAM #define NPOLYGON_IOSTREAM #define SEMIC_IOSTREAM #endif #else /* not NDEBUG **************************************************** */ /* define YYDEBUG 1 for debugging bison texts, 0 otherwise */ #define YYDEBUG 0 #endif /* not NDEBUG */ /* MLIST requires MDEBUG */ #ifdef MLIST #ifndef MDEBUG #define MDEBUG 0 #endif #endif /* MTRACK requires MDEBUG and MLIST*/ #ifdef MTRACK #ifndef MDEBUG #define MDEBUG -1 #endif #ifndef MLIST #define MLIST #endif #endif #ifdef HAVE_DYNAMIC_LOADING # define HAVE_NAMESPACES 1 #endif /* HAVE_DYNAMIC_LOADING */ #ifdef HAVE_NAMESPACES # undef USE_IILOCALRING #endif /******************************************************************* * * assume(x) -- a handy macro for assumptions * ******************************************************************/ #ifndef HAVE_ASSUME #define assume(x) ((void*) 0) #define r_assume(x) ((void*) 0) #else /* ! HAVE_ASSUME */ #ifdef __cplusplus extern "C" { #endif /* Set a breakpoint on this function */ extern void assume_violation(char* file, int line); #ifdef __cplusplus } #endif #define assume(x) _assume(x, __FILE__, __LINE__) #define r_assume(x) _r_assume(x, __FILE__, __LINE__) #define _assume(x, f, l) \ do \ { \ if (! (x)) \ { \ assume_violation(f, l); \ } \ } \ while (0) #define _r_assume(x, f, l) \ do \ { \ if (! (x)) \ { \ assume_violation(f, l); \ return 0; \ } \ } \ while (0) #endif /* HAVE_ASSUME */ #endif /* MOD2_H */