source: git/kernel/mod2.h.cmake.in @ 9e8da7

spielwiese
Last change on this file since 9e8da7 was 8cc501, checked in by Kai Krüger <krueger@…>, 14 years ago
Added files to compile with cmake. Still experimental. Might not work git-svn-id: file:///usr/local/Singular/svn/trunk@13240 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 38.2 KB
Line 
1/* -*-c++-*- */
2/*******************************************************************
3 *  Computer Algebra System SINGULAR
4 *
5 *  mod2.h: Main configuration file for Singular
6 *          DO NOT EDIT!
7 *
8 *  Version: $Id: mod2.h.in,v 1.42 2009/08/21 11:00:48 Singular Exp $
9 *******************************************************************/
10#ifndef MOD2_H
11#define MOD2_H
12
13/*******************************************************************
14 * Defines which are set by configure
15 ******************************************************************/
16/* Define to use dynamic linking */
17#cmakedefine HAVE_DL 1
18/* Define to use readline lib for fancy display: configure result */
19#cmakedefine HAVE_LIBREADLINE 1
20/* Define to use static readline lib for fancy display */
21#cmakedefine HAVE_READLINE 1
22/* define to use dynamic version of readline lib */
23#cmakedefine HAVE_DYN_RL 1
24/* Define to have dbm links */
25#cmakedefine HAVE_DBM 1
26/* Define to have MP links */
27#cmakedefine HAVE_MPSR 1
28/* Define to have factory functionality added */
29#cmakedefine HAVE_FACTORY 1
30/* Define if you have stdc headers */
31#cmakedefine STDC_HEADERS 1
32/* Define if you have asm/sigcontext.h */
33#cmakedefine HAVE_ASM_SIGCONTEXT_H 1
34/* Define if you have sys/file.h */
35#cmakedefine HAVE_SYS_FILE_H 1
36/* Define if you have sys/stat.h */
37#cmakedefine HAVE_SYS_STAT_H 1
38/* Define if you have sys/param.h */
39#cmakedefine HAVE_SYS_PARAM_H 1
40/* Define if you have sys/file.h */
41#cmakedefine HAVE_SYS_TYPES_H 1
42/* Define if you have sys/ioctl.h */
43#cmakedefine HAVE_SYS_IOCTL_H 1
44/* Define if you have sys/time.h */
45#cmakedefine HAVE_SYS_TIME_H 1
46/* Define if you have sys/times.h */
47#cmakedefine HAVE_SYS_TIMES_H 1
48/* io header: */
49/* Define if you have termcap.h */
50#cmakedefine HAVE_TERMCAP_H 1
51/* Define if you have termios.h */
52#cmakedefine HAVE_TERMIOS_H 1
53/* Define if you have term.h */
54#cmakedefine HAVE_TERM_H 1
55/* Define if you have readline/history.h */
56#cmakedefine HAVE_READLINE_HISTORY_H 1
57/* Define if readline/readline.h is ok */
58#cmakedefine READLINE_READLINE_H_OK 1
59/* Define if time.h and sys/time.h can be included at the same time */
60#cmakedefine TIME_WITH_SYS_TIME 1
61/* Define if you have alloca.h */
62#cmakedefine HAVE_ALLOCA_H 1
63/* Define if you have pwd.h */
64#cmakedefine HAVE_PWD_H 1
65/* Define if you have unistd.h */
66#cmakedefine HAVE_UNISTD_H 1
67/* define if you have malloc.h */
68#cmakedefine HAVE_MALLOC_H 1
69/* Define if you have alloca */
70#cmakedefine HAVE_ALLOCA 1
71/* Define if you have getpagesize */
72#cmakedefine GETPAGESIZE 1
73/* Define if you have vprintf */
74#cmakedefine HAVE_VPRINTF 1
75/* Define if you have gettimeofday */
76#cmakedefine HAVE_GETTIMEOFDAY 1
77/* Define if you have atexit */
78#cmakedefine HAVE_ATEXIT 1
79/* Define if you have bcopy, bzero and bcmp
80   Linux needs that define! */
81#cmakedefine HAVE_BCOPY 1
82/* Define if sprintf does not return number of printed chars */
83#cmakedefine BSD_SPRINTF 1
84/* define if you have explicit C++ constructors */
85#cmakedefine HAVE_EXPLICIT_CONSTR 1
86/* Define if you have the getcwd function.  */
87#cmakedefine HAVE_GETCWD 1
88/* Define if you have the getwd function.  */
89#cmakedefine HAVE_GETWD 1
90/* Define if you have snprintf */
91#cmakedefine HAVE_VSNPRINTF 1
92/* Define if you have readlink */
93#cmakedefine HAVE_READLINK 1
94/* Define if you have usleep */
95#cmakedefine HAVE_USLEEP 1
96/* Define if you have sleep */
97#cmakedefine HAVE_SLEEP 1
98/* Define if you have setenv */
99#cmakedefine HAVE_SETENV 1
100/* Define if you have petpwnam */
101#cmakedefine HAVE_GETPWNAM 1
102/* Define if you have popen */
103#cmakedefine HAVE_POPEN 1
104/* Define if you have sysconf */
105#cmakedefine HAVE_SYSCONF 1
106/* Define if you have siginterrupt (BSD4.3) */
107#cmakedefine HAVE_SIGINTERRUPT 1
108/* define for boost includes and lib */
109//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
110/* define for std:vector includes */
111#cmakedefine USE_STDVECBOOL 1
112/* Define sizeof(char) */
113#define SIZEOF_CHAR 1
114/* Define sizeof(short) */
115#define SIZEOF_SHORT 2
116/* Define sizeof(int) */
117#define SIZEOF_INT 4
118/* Define sizeof(long) */
119#define SIZEOF_LONG 4
120/* Define sizeof(void*) */
121#define SIZEOF_VOIDP 4
122/* Define sizeof(double) */
123#define SIZEOF_DOUBLE 8
124/* Define if your integer format is big endian */
125#cmakedefine WORDS_BIGENDIAN 1
126/* Define major version of Singular -- should be set in ../configure.in!!!*/
127#define SINGULAR_MAJOR_VERSION 0
128/* Define minor version of Singular -- should be set in ../configure.in!!! */
129#define SINGULAR_MINOR_VERSION 0
130/* Define sub version of Singular -- should be set in ../configure.in!!! */
131#define SINGULAR_SUB_VERSION 0
132/* Define version as a string */
133#define S_VERSION1 ""
134/* Define version date as a string */
135#define S_VERSION2 ""
136/* Define uname identifier as a string */
137#define S_UNAME ""
138/* Absolute pathname of root directory of Singular source */
139#define S_ROOT_DIR ""
140/* Define to enable dynamic module code */
141#cmakedefine HAVE_DYNAMIC_LOADING 1
142/* Define to enable plural */
143#cmakedefine HAVE_PLURAL 1
144/* Define to enable ratGB/ ratGRING */
145#cmakedefine HAVE_RATGRING 1
146/* Define to enable shiftbba */
147#cmakedefine HAVE_SHIFTBBA 1
148/* Define to enable libsvd */
149#cmakedefine HAVE_SVD 1
150/* CPU type: i[3456]86: */
151#cmakedefine SI_CPU_I386 1
152/* CPU type: sparc: */
153#cmakedefine SI_CPU_SPARC 1
154/* CPU type: ppc: */
155#cmakedefine SI_CPU_PPC 1
156/* CPU type: IA64: */
157#cmakedefine SI_CPU_IA64 1
158/* CPU type: x86_64: */
159#cmakedefine SI_CPU_X86_64 1
160
161/*******************************************************************
162 * Defines which are not set by configure
163 ******************************************************************/
164
165/* Default value for timer resolution in ticks per second */
166/* set to 10 for resolution of tenth of a second, etc */
167#define TIMER_RESOLUTION 1
168
169/* Undefine to disable the quote/eval of expressions */
170#define SIQ 1
171
172/* Define to enable TCL interface */
173#cmakedefine HAVE_TCL  1
174
175/* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */
176#define FAST_AND_DIRTY
177
178/* eigenvalues */
179#ifndef HAVE_DYNAMIC_LOADING
180#define HAVE_EIGENVAL 1
181
182/* Gauss-Manin system */
183#define HAVE_GMS 1
184#endif
185
186/* linear algebra extensions from pcv.h/pcv.cc */
187#define HAVE_PCV 1
188
189/* procedures to compute groebner bases with the f5 implementation */
190/* still testing */
191#cmakedefine HAVE_F5 1
192
193/* procedures to compute groebner bases with the f5c implementation */
194/* still testing */
195#cmakedefine HAVE_F5C 1
196
197/* letterplace gb:*/
198#define HAVE_SHIFTBBA 1
199
200/* rings as coefficients */
201#define HAVE_RINGS
202
203/* procedures to compute with units */
204#define HAVE_UNITS
205
206/* Define to use old mechanismen for saving currRing with procedures
207 */
208#cmakedefine USE_IILOCALRING
209
210
211/* Define to use scanner when loading libraries */
212#define HAVE_LIBPARSER
213
214/*#define PROFILING*/
215#ifdef PROFILING
216#define PROFILER ,0,0
217#else
218#define PROFILER
219#endif
220
221/*******************************************************************
222 * Evaluate the set defines
223 ******************************************************************/
224/* FGLM needs factory */
225#ifdef HAVE_FACTORY
226#define HAVE_FGLM
227#endif
228
229/* Define if you want fglm for homogeneous case */
230#ifdef HAVE_FGLM
231#undef HAVE_FGLM_HOME
232#endif
233
234/* Spectrum needs GMP */
235#define HAVE_SPECTRUM 1
236
237/* Undefine to disable real time measurments  */
238#ifdef HAVE_GETTIMEOFDAY
239#define HAVE_RTIMER
240#endif
241
242#if SIZEOF_VOIDP == 8
243/* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */
244#define ALIGN_8
245#define LOG_SIZEOF_LONG  3
246#define LOG_SIZEOF_VOIDP 3
247#else
248#define LOG_SIZEOF_LONG  2
249#define LOG_SIZEOF_VOIDP 2
250#endif
251
252#ifndef CHAR_BIT
253#define CHAR_BIT 8
254#endif
255
256#define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
257
258#define SINGULAR_PATCHLEVEL 6
259#define SINGULAR_VERSION ((SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION*10)+SINGULAR_PATCHLEVEL)
260
261/*******************************************************************
262 * Miscellanous Defines
263 ******************************************************************/
264/* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal
265   SIG_DFL. However, if it stays at SIG_DFL we get zombie processes
266   for terminated childs generated by fork. Therefors some special treatment
267   is necessary */
268#ifdef HPUX_9
269#include <stdlib.h>
270#define system hpux9_system
271#ifdef __cplusplus
272extern "C" {
273#endif
274int hpux9_system(const char* system);
275#ifdef __cplusplus
276}
277#endif
278#endif
279
280#ifndef HAVE_LIBPARSER
281#  undef YYLPDEBUG
282#else
283#  define YYLPDEBUG 1
284#endif
285
286#ifndef FALSE
287#define FALSE       0
288#endif
289
290#ifndef TRUE
291#define TRUE        1
292#endif
293
294#ifndef NULL
295#define NULL        (0)
296#endif
297
298#ifndef SEEK_END
299#define SEEK_END 2
300#endif
301
302#ifndef SEEK_SET
303#define SEEK_SET 0
304#endif
305
306#define HALT() m2_end(2)
307
308#define memcpy4 memcpy
309
310/* define OLD_RES for res/sres/mres(i,j,k) */
311#cmakedefine OLD_RES
312
313/* the maximal ascii length of an int number + 1 = 11 for 32 bit int */
314#define MAX_INT_LEN 11
315#define MAX_INT_VAL 0x7fffffff
316
317#ifdef DO_PROFILE
318/* define to enable explicit profiling of some crucial inline
319 * routines and defines  */
320#cmakedefine DO_DEEP_PROFILE
321#endif
322
323#define buildin_rand 1
324
325/* define to enable assume */
326#ifndef HAVE_ASSUME
327#cmakedefine HAVE_ASSUME
328#endif
329
330/* define LINKAGE to "extern C" if compiling for shared libs */
331#ifndef LINKAGE
332#if defined(PIC)
333#define LINKAGE extern "C"
334#else
335#define LINKAGE
336#endif
337#endif
338
339
340/*******************************************************************
341 * DEBUG OPTIONS
342 * -- only significant for for compiling without -DNDEBUG
343 * -- you better know what your are doing, if you touch this
344 ******************************************************************/
345#ifndef NDEBUG
346
347/* undefine to enable inline */
348#define NO_INLINE
349
350/* undefine to disable assume -- should normally be defined for NDEBUG */
351#define HAVE_ASSUME
352
353/* undef PDEBUG to disable checks of polys
354
355 define PDEBUG to
356  0 for enabling pTest
357  1 plus tests in Level 1 poly routines (operations on monomials)
358  2 plus tests in Level 2 poly routines (operations on single exponents)
359 -- see also polys.h for more info
360
361 NOTE: you can set the value of PDEBUG on a per-file basis, before
362       including mod2.h, provided ! PDEBUG is defined in mod2.h E.g.:
363
364       #define PDEBUG 2
365       #include <kernel/mod2.h>
366       ...
367
368       makes sure that all poly operations in your file are done with
369       PDEBUG == 2
370 To break after an error occured, set a debugger breakpoint on
371 dErrorBreak.
372*/
373#ifndef PDEBUG
374#define PDEBUG 0
375#endif
376
377/* define MDEBUG to enable memory checks */
378#define MDEBUG 0
379
380#ifdef MDEBUG
381/* If ! defined(OM_NDEBUG) and (defined(OM_TRACK) or defined(OM_CHECK)
382   then omDebug routines are used for memory allocation/free:
383
384   The omDebug routines are controlled by the values of OM_TRACK, OM_CHECK
385   and OM_KEEP.  There meaning is roughly as follows:
386   OM_TRACK: strored with address                              : extra space
387     0     : no additional info is stored                      : 0
388     1     : file:line of location where address was allocated : 1 word
389     2     : plus backtrace of stack where adress was allocated: 6 words
390     3     : plus size/bin info and front-, and back padding   : 9 words
391     4     : plus file:line of location where adress was freed : 10 words
392     5     : plus backtrace of stack where adress was allocated: 15 words
393   OM_CHECK: checks done
394     0     : no checks
395     1     : constant-time checks: i.e. addr checks only
396     2     : plus linear-time checks and constant related bin check
397     3     : plus quadratic-time checks and linear-time related bin checks and
398             constant time all memory checks
399     4     : and so on
400     ==> for OM_CHECK >= 3 it gets rather slow
401   OM_KEEP:  determines whether addresses are really freed  (
402     0     : addresses are really freed
403     1     : addresses are only marked as free and not really freed.
404
405   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
406   (as can OM_NDEBUG),  e.g.:
407     #define OM_CHECK 3
408     #define OM_TRACK 5
409     #define OM_KEEP  1
410     #include <kernel/mod2.h>
411     #include <omalloc/omalloc.h>
412   ensures that all memory allocs/free in this file are done with
413   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
414   in this file are only marked as free and never really freed.
415 
416   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
417   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
418   om_Opts.Keep to the number of addresses which are kept before they are
419   actually freed. E.g.:
420     int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
421     om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
422     ExternalRoutine();
423     om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
424   ensures that all calls omDebug routines  occuring during the computation of
425   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
426   calls to omFree only mark addresses as free and not really free them.
427
428   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
429   how many addresses are kept before they are actually freed, independently
430   of the value of OM_KEEP.
431
432   Some tips on possible values of OM_TRACK, OM_CHECK, OM_KEEP:
433   + To find out about an address that has been freed twice, first locate the
434     file(s) where the error occured, and then at the beginning of these files:
435       #define OM_CHECK 3
436       #define OM_TRACK 5
437       #define OM_KEEP  1
438       #include <kernel/mod2.h>
439       #include <omalloc/omalloc.h>
440     Under dynamic scope, do (e.g., from within the debugger):
441       om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
442   + to find out where "memory corruption" occured, increase value of
443     OM_CHECK - the higher this value is, the more consistency checks are
444     done (However a value > 3 checks the entire memory each time an omalloc
445     routine is used!)
446   
447   Some more tips on the usage of omalloc:
448   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
449     assume that sizes are > 0 and pointers are != NULL
450   + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
451     NULL pointers and sizes == 0
452   + You can safely use any free/realloc routine in combination with any alloc
453     routine (including the debug versions): E.g., an address allocated with
454     omAllocBin can be freed with omfree, or an adress allocated with
455     om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
456     However, keep in mind that the efficiency decreases from
457     Bin over Size to General routines (i.e., omFreeBin is more efficient than
458     omFreeSize which is more efficient than omFree, likewise with the alloc
459     routines).
460   + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
461   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
462     defined, then the "real" alloc/realloc/free macros are used, and all
463     omTest, omDebug and omCheck routines are undefined
464   + to break after an omError occured within a debugger,
465     set a breakpoint on dErrorBreak
466   + to do checks from within the debugger, or to do checks with explicit
467     check level, use omTest routines.
468*/
469
470/* by default, store alloc info and file/line where addr was freed */
471#ifndef OM_TRACK
472#define OM_TRACK 4
473#endif
474/* only do constant-time memory checks */
475#ifndef OM_CHECK
476#define OM_CHECK 1
477#endif
478/* Do actually free memory:
479   (be careful: if this is set, memory is never really freed,
480    but only marked as free) */
481#ifndef OM_KEEP
482#define OM_KEEP 0
483#endif
484/* but only after you have freed 1000 more addresses
485   (this is actually independent of the value of OM_KEEP and used
486   to initialize om_Opts.Keep) */
487#ifndef OM_SING_KEEP
488#define OM_SING_KEEP 1000
489#endif
490
491#endif /* MDEBUG */
492
493
494/* undef KDEBUG for check of data during std computations
495 *
496 * define KDEBUG to
497 * 0 for basic tests
498 * 1 for tests in kSpoly
499 * NOTE: You can locally enable tests in kspoly by setting the
500 *       define at the beginning of kspoly.cc
501 */
502#define KDEBUG 0
503
504/* define LDEBUG checking numbers, undefine otherwise */
505#define LDEBUG
506/* define RDEBUG checking rings (together with TRACE=9) */
507//#define RDEBUG
508/* define TEST for non time critical tests, undefine otherwise */
509#define TEST
510
511/* #define PAGE_TEST */
512
513/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
514#define YYDEBUG 1
515
516/* Undefine to disable debugging of MP stuff */
517#ifdef HAVE_MPSR
518#define MPSR_DEBUG
519#endif
520
521
522#ifdef TEST
523#ifndef buildin_rand
524#define buildin_rand 1
525#endif
526#endif
527
528/* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */
529/* define SPECTRUM_IOSTREAM to use C++ iostream for error messages          */
530
531/* #define SPECTRUM_DEBUG */
532/* #define SPECTRUM_PRINT */
533#cmakedefine  SPECTRUM_IOSTREAM
534
535#ifdef  SPECTRUM_DEBUG
536#define MULTICNT_DEBUG
537#define GMPRAT_DEBUG
538#define KMATRIX_DEBUG
539#define SPLIST_DEBUG
540#define NPOLYGON_DEBUG
541#define SEMIC_DEBUG
542#endif
543
544#ifdef  SPECTRUM_PRINT
545#define MULTICNT_PRINT
546#define GMPRAT_PRINT
547#define KMATRIX_PRINT
548#define SPLIST_PRINT
549#define NPOLYGON_PRINT
550#define SEMIC_PRINT
551#endif
552
553#ifdef  SPECTRUM_IOSTREAM
554#define MULTICNT_IOSTREAM
555#define GMPRAT_IOSTREAM
556#define KMATRIX_IOSTREAM
557#define SPLIST_IOSTREAM
558#define NPOLYGON_IOSTREAM
559#define SEMIC_IOSTREAM
560#endif
561
562
563#else /* not NDEBUG **************************************************** */
564
565#define NO_PDEBUG
566
567/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
568#define YYDEBUG 0
569
570#endif /* not NDEBUG */
571
572/*******************************************************************
573 *
574 * assume(x) -- a handy macro for assumptions
575 *
576 ******************************************************************/
577
578#ifdef __cplusplus
579extern "C" {
580#endif
581// routine which is used to report the error
582// returns 0
583extern int dReportError(const char* fmt, ...);
584// within a debugger, set a breakpoint on dErrorBreak
585// which is called after the error has been reported
586extern void dErrorBreak();
587#ifdef __cplusplus
588}
589#endif
590
591#ifndef HAVE_ASSUME
592#define assume(x) ((void) 0)
593#define r_assume(x) ((void) 0)
594#else /* ! HAVE_ASSUME */
595
596#define assume_violation(s,f,l) \
597  dReportError("assume violation at %s:%d condition: %s", f,l,s)
598
599#define assume(x)   _assume(x, __FILE__, __LINE__)
600#define r_assume(x) _r_assume(x, __FILE__, __LINE__)
601
602#define _assume(x, f, l)                        \
603do                                              \
604{                                               \
605  if (! (x))                                    \
606  {                                             \
607    assume_violation(#x, f, l);                 \
608  }                                             \
609}                                               \
610while (0)
611
612#define _r_assume(x, f, l)                      \
613do                                              \
614{                                               \
615  if (! (x))                                    \
616  {                                             \
617    assume_violation(#x, f, l);                 \
618    return 0;                                   \
619  }                                             \
620}                                               \
621while (0)
622#endif /* HAVE_ASSUME */
623
624/* do have RDEBUG, unless we are doing the very real thing */
625#ifdef HAVE_ASSUME
626#ifndef RDEBUG
627#define RDEBUG
628#endif
629#endif
630
631#if SIZEOF_VOIDP == 8
632#ifndef OM_CHECK
633#define OM_CHECK 0
634#endif
635#endif
636
637/* If we're not using GNU C, elide __attribute__ */
638#ifndef __GNUC__
639#  define  __attribute__(x)  /*NOTHING*/
640#endif
641
642#endif /* MOD2_H  */
643/* -*-c++-*- */
644/*******************************************************************
645 *  Computer Algebra System SINGULAR
646 *
647 *  mod2.h: Main configuration file for Singular
648 *          DO NOT EDIT!
649 *
650 *  Version: $Id: mod2.h.in,v 1.42 2009/08/21 11:00:48 Singular Exp $
651 *******************************************************************/
652#ifndef MOD2_H
653#define MOD2_H
654
655/*******************************************************************
656 * Defines which are set by configure
657 ******************************************************************/
658/* Define to use dynamic linking */
659#cmakedefine HAVE_DL 1
660/* Define to use readline lib for fancy display: configure result */
661#cmakedefine HAVE_LIBREADLINE 1
662/* Define to use static readline lib for fancy display */
663#cmakedefine HAVE_READLINE 1
664/* define to use dynamic version of readline lib */
665#cmakedefine HAVE_DYN_RL 1
666/* Define to have dbm links */
667#cmakedefine HAVE_DBM 1
668/* Define to have MP links */
669#cmakedefine HAVE_MPSR 1
670/* Define to have factory functionality added */
671#cmakedefine HAVE_FACTORY 1
672/* Define if you have stdc headers */
673#cmakedefine STDC_HEADERS 1
674/* Define if you have asm/sigcontext.h */
675#cmakedefine HAVE_ASM_SIGCONTEXT_H 1
676/* Define if you have sys/file.h */
677#cmakedefine HAVE_SYS_FILE_H 1
678/* Define if you have sys/stat.h */
679#cmakedefine HAVE_SYS_STAT_H 1
680/* Define if you have sys/param.h */
681#cmakedefine HAVE_SYS_PARAM_H 1
682/* Define if you have sys/file.h */
683#cmakedefine HAVE_SYS_TYPES_H 1
684/* Define if you have sys/ioctl.h */
685#cmakedefine HAVE_SYS_IOCTL_H 1
686/* Define if you have sys/time.h */
687#cmakedefine HAVE_SYS_TIME_H 1
688/* Define if you have sys/times.h */
689#cmakedefine HAVE_SYS_TIMES_H 1
690/* io header: */
691/* Define if you have termcap.h */
692#cmakedefine HAVE_TERMCAP_H 1
693/* Define if you have termios.h */
694#cmakedefine HAVE_TERMIOS_H 1
695/* Define if you have term.h */
696#cmakedefine HAVE_TERM_H 1
697/* Define if you have readline/history.h */
698#cmakedefine HAVE_READLINE_HISTORY_H 1
699/* Define if readline/readline.h is ok */
700#cmakedefine READLINE_READLINE_H_OK 1
701/* Define if time.h and sys/time.h can be included at the same time */
702#cmakedefine TIME_WITH_SYS_TIME 1
703/* Define if you have alloca.h */
704#cmakedefine HAVE_ALLOCA_H 1
705/* Define if you have pwd.h */
706#cmakedefine HAVE_PWD_H 1
707/* Define if you have unistd.h */
708#cmakedefine HAVE_UNISTD_H 1
709/* define if you have malloc.h */
710#cmakedefine HAVE_MALLOC_H 1
711/* Define if you have alloca */
712#cmakedefine HAVE_ALLOCA 1
713/* Define if you have getpagesize */
714#cmakedefine GETPAGESIZE 1
715/* Define if you have vprintf */
716#cmakedefine HAVE_VPRINTF 1
717/* Define if you have gettimeofday */
718#cmakedefine HAVE_GETTIMEOFDAY 1
719/* Define if you have atexit */
720#cmakedefine HAVE_ATEXIT 1
721/* Define if you have bcopy, bzero and bcmp
722   Linux needs that define! */
723#cmakedefine HAVE_BCOPY 1
724/* Define if sprintf does not return number of printed chars */
725#cmakedefine BSD_SPRINTF 1
726/* define if you have explicit C++ constructors */
727#cmakedefine HAVE_EXPLICIT_CONSTR 1
728/* Define if you have the getcwd function.  */
729#cmakedefine HAVE_GETCWD 1
730/* Define if you have the getwd function.  */
731#cmakedefine HAVE_GETWD 1
732/* Define if you have snprintf */
733#cmakedefine HAVE_VSNPRINTF 1
734/* Define if you have readlink */
735#cmakedefine HAVE_READLINK 1
736/* Define if you have usleep */
737#cmakedefine HAVE_USLEEP 1
738/* Define if you have sleep */
739#cmakedefine HAVE_SLEEP 1
740/* Define if you have setenv */
741#cmakedefine HAVE_SETENV 1
742/* Define if you have petpwnam */
743#cmakedefine HAVE_GETPWNAM 1
744/* Define if you have popen */
745#cmakedefine HAVE_POPEN 1
746/* Define if you have sysconf */
747#cmakedefine HAVE_SYSCONF 1
748/* Define if you have siginterrupt (BSD4.3) */
749#cmakedefine HAVE_SIGINTERRUPT 1
750/* define for boost includes and lib */
751//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
752/* define for std:vector includes */
753#cmakedefine USE_STDVECBOOL 1
754/* Define sizeof(char) */
755#define SIZEOF_CHAR 1
756/* Define sizeof(short) */
757#define SIZEOF_SHORT 2
758/* Define sizeof(int) */
759#define SIZEOF_INT 4
760/* Define sizeof(long) */
761#define SIZEOF_LONG 4
762/* Define sizeof(void*) */
763#define SIZEOF_VOIDP 4
764/* Define sizeof(double) */
765#define SIZEOF_DOUBLE 8
766/* Define if your integer format is big endian */
767#cmakedefine WORDS_BIGENDIAN 1
768/* Define major version of Singular -- should be set in ../configure.in!!!*/
769#define SINGULAR_MAJOR_VERSION 0
770/* Define minor version of Singular -- should be set in ../configure.in!!! */
771#define SINGULAR_MINOR_VERSION 0
772/* Define sub version of Singular -- should be set in ../configure.in!!! */
773#define SINGULAR_SUB_VERSION 0
774/* Define version as a string */
775#define S_VERSION1 ""
776/* Define version date as a string */
777#define S_VERSION2 ""
778/* Define uname identifier as a string */
779#define S_UNAME ""
780/* Absolute pathname of root directory of Singular source */
781#define S_ROOT_DIR ""
782/* Define to enable dynamic module code */
783#cmakedefine HAVE_DYNAMIC_LOADING 1
784/* Define to enable plural */
785#cmakedefine HAVE_PLURAL 1
786/* Define to enable ratGB/ ratGRING */
787#cmakedefine HAVE_RATGRING 1
788/* Define to enable shiftbba */
789#cmakedefine HAVE_SHIFTBBA 1
790/* Define to enable libsvd */
791#cmakedefine HAVE_SVD 1
792/* CPU type: i[3456]86: */
793#cmakedefine SI_CPU_I386 1
794/* CPU type: sparc: */
795#cmakedefine SI_CPU_SPARC 1
796/* CPU type: ppc: */
797#cmakedefine SI_CPU_PPC 1
798/* CPU type: IA64: */
799#cmakedefine SI_CPU_IA64 1
800/* CPU type: x86_64: */
801#cmakedefine SI_CPU_X86_64 1
802
803/*******************************************************************
804 * Defines which are not set by configure
805 ******************************************************************/
806
807/* Default value for timer resolution in ticks per second */
808/* set to 10 for resolution of tenth of a second, etc */
809#define TIMER_RESOLUTION 1
810
811/* Undefine to disable the quote/eval of expressions */
812#define SIQ 1
813
814/* Define to enable TCL interface */
815#cmakedefine HAVE_TCL  1
816
817/* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */
818#define FAST_AND_DIRTY
819
820/* eigenvalues */
821#ifndef HAVE_DYNAMIC_LOADING
822#define HAVE_EIGENVAL 1
823
824/* Gauss-Manin system */
825#define HAVE_GMS 1
826#endif
827
828/* linear algebra extensions from pcv.h/pcv.cc */
829#define HAVE_PCV 1
830
831/* procedures to compute groebner bases with the f5 implementation */
832/* still testing */
833#cmakedefine HAVE_F5 1
834
835/* procedures to compute groebner bases with the f5c implementation */
836/* still testing */
837#cmakedefine HAVE_F5C 1
838
839/* letterplace gb:*/
840#define HAVE_SHIFTBBA 1
841
842/* rings as coefficients */
843#define HAVE_RINGS
844
845/* procedures to compute with units */
846#define HAVE_UNITS
847
848/* Define to use old mechanismen for saving currRing with procedures
849 */
850#cmakedefine USE_IILOCALRING
851
852
853/* Define to use scanner when loading libraries */
854#define HAVE_LIBPARSER
855
856/*#define PROFILING*/
857#ifdef PROFILING
858#define PROFILER ,0,0
859#else
860#define PROFILER
861#endif
862
863/*******************************************************************
864 * Evaluate the set defines
865 ******************************************************************/
866/* FGLM needs factory */
867#ifdef HAVE_FACTORY
868#define HAVE_FGLM
869#endif
870
871/* Define if you want fglm for homogeneous case */
872#ifdef HAVE_FGLM
873#undef HAVE_FGLM_HOME
874#endif
875
876/* Spectrum needs GMP */
877#define HAVE_SPECTRUM 1
878
879/* Undefine to disable real time measurments  */
880#ifdef HAVE_GETTIMEOFDAY
881#define HAVE_RTIMER
882#endif
883
884#if SIZEOF_VOIDP == 8
885/* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */
886#define ALIGN_8
887#define LOG_SIZEOF_LONG  3
888#define LOG_SIZEOF_VOIDP 3
889#else
890#define LOG_SIZEOF_LONG  2
891#define LOG_SIZEOF_VOIDP 2
892#endif
893
894#ifndef CHAR_BIT
895#define CHAR_BIT 8
896#endif
897
898#define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
899
900#define SINGULAR_PATCHLEVEL 6
901#define SINGULAR_VERSION ((SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION*10)+SINGULAR_PATCHLEVEL)
902
903/*******************************************************************
904 * Miscellanous Defines
905 ******************************************************************/
906/* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal
907   SIG_DFL. However, if it stays at SIG_DFL we get zombie processes
908   for terminated childs generated by fork. Therefors some special treatment
909   is necessary */
910#ifdef HPUX_9
911#include <stdlib.h>
912#define system hpux9_system
913#ifdef __cplusplus
914extern "C" {
915#endif
916int hpux9_system(const char* system);
917#ifdef __cplusplus
918}
919#endif
920#endif
921
922#ifndef HAVE_LIBPARSER
923#  undef YYLPDEBUG
924#else
925#  define YYLPDEBUG 1
926#endif
927
928#ifndef FALSE
929#define FALSE       0
930#endif
931
932#ifndef TRUE
933#define TRUE        1
934#endif
935
936#ifndef NULL
937#define NULL        (0)
938#endif
939
940#ifndef SEEK_END
941#define SEEK_END 2
942#endif
943
944#ifndef SEEK_SET
945#define SEEK_SET 0
946#endif
947
948#define HALT() m2_end(2)
949
950#define memcpy4 memcpy
951
952/* define OLD_RES for res/sres/mres(i,j,k) */
953#cmakedefine OLD_RES
954
955/* the maximal ascii length of an int number + 1 = 11 for 32 bit int */
956#define MAX_INT_LEN 11
957#define MAX_INT_VAL 0x7fffffff
958
959#ifdef DO_PROFILE
960/* define to enable explicit profiling of some crucial inline
961 * routines and defines  */
962#cmakedefine DO_DEEP_PROFILE
963#endif
964
965#define buildin_rand 1
966
967/* define to enable assume */
968#ifndef HAVE_ASSUME
969#cmakedefine HAVE_ASSUME
970#endif
971
972/* define LINKAGE to "extern C" if compiling for shared libs */
973#ifndef LINKAGE
974#if defined(PIC)
975#define LINKAGE extern "C"
976#else
977#define LINKAGE
978#endif
979#endif
980
981
982/*******************************************************************
983 * DEBUG OPTIONS
984 * -- only significant for for compiling without -DNDEBUG
985 * -- you better know what your are doing, if you touch this
986 ******************************************************************/
987#ifndef NDEBUG
988
989/* undefine to enable inline */
990#define NO_INLINE
991
992/* undefine to disable assume -- should normally be defined for NDEBUG */
993#define HAVE_ASSUME
994
995/* undef PDEBUG to disable checks of polys
996
997 define PDEBUG to
998  0 for enabling pTest
999  1 plus tests in Level 1 poly routines (operations on monomials)
1000  2 plus tests in Level 2 poly routines (operations on single exponents)
1001 -- see also polys.h for more info
1002
1003 NOTE: you can set the value of PDEBUG on a per-file basis, before
1004       including mod2.h, provided ! PDEBUG is defined in mod2.h E.g.:
1005
1006       #define PDEBUG 2
1007       #include <kernel/mod2.h>
1008       ...
1009
1010       makes sure that all poly operations in your file are done with
1011       PDEBUG == 2
1012 To break after an error occured, set a debugger breakpoint on
1013 dErrorBreak.
1014*/
1015#ifndef PDEBUG
1016#define PDEBUG 0
1017#endif
1018
1019/* define MDEBUG to enable memory checks */
1020#define MDEBUG 0
1021
1022#ifdef MDEBUG
1023/* If ! defined(OM_NDEBUG) and (defined(OM_TRACK) or defined(OM_CHECK)
1024   then omDebug routines are used for memory allocation/free:
1025
1026   The omDebug routines are controlled by the values of OM_TRACK, OM_CHECK
1027   and OM_KEEP.  There meaning is roughly as follows:
1028   OM_TRACK: strored with address                              : extra space
1029     0     : no additional info is stored                      : 0
1030     1     : file:line of location where address was allocated : 1 word
1031     2     : plus backtrace of stack where adress was allocated: 6 words
1032     3     : plus size/bin info and front-, and back padding   : 9 words
1033     4     : plus file:line of location where adress was freed : 10 words
1034     5     : plus backtrace of stack where adress was allocated: 15 words
1035   OM_CHECK: checks done
1036     0     : no checks
1037     1     : constant-time checks: i.e. addr checks only
1038     2     : plus linear-time checks and constant related bin check
1039     3     : plus quadratic-time checks and linear-time related bin checks and
1040             constant time all memory checks
1041     4     : and so on
1042     ==> for OM_CHECK >= 3 it gets rather slow
1043   OM_KEEP:  determines whether addresses are really freed  (
1044     0     : addresses are really freed
1045     1     : addresses are only marked as free and not really freed.
1046
1047   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
1048   (as can OM_NDEBUG),  e.g.:
1049     #define OM_CHECK 3
1050     #define OM_TRACK 5
1051     #define OM_KEEP  1
1052     #include <kernel/mod2.h>
1053     #include <omalloc/omalloc.h>
1054   ensures that all memory allocs/free in this file are done with
1055   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
1056   in this file are only marked as free and never really freed.
1057 
1058   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
1059   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
1060   om_Opts.Keep to the number of addresses which are kept before they are
1061   actually freed. E.g.:
1062     int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
1063     om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
1064     ExternalRoutine();
1065     om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
1066   ensures that all calls omDebug routines  occuring during the computation of
1067   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
1068   calls to omFree only mark addresses as free and not really free them.
1069
1070   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
1071   how many addresses are kept before they are actually freed, independently
1072   of the value of OM_KEEP.
1073
1074   Some tips on possible values of OM_TRACK, OM_CHECK, OM_KEEP:
1075   + To find out about an address that has been freed twice, first locate the
1076     file(s) where the error occured, and then at the beginning of these files:
1077       #define OM_CHECK 3
1078       #define OM_TRACK 5
1079       #define OM_KEEP  1
1080       #include <kernel/mod2.h>
1081       #include <omalloc/omalloc.h>
1082     Under dynamic scope, do (e.g., from within the debugger):
1083       om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
1084   + to find out where "memory corruption" occured, increase value of
1085     OM_CHECK - the higher this value is, the more consistency checks are
1086     done (However a value > 3 checks the entire memory each time an omalloc
1087     routine is used!)
1088   
1089   Some more tips on the usage of omalloc:
1090   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
1091     assume that sizes are > 0 and pointers are != NULL
1092   + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
1093     NULL pointers and sizes == 0
1094   + You can safely use any free/realloc routine in combination with any alloc
1095     routine (including the debug versions): E.g., an address allocated with
1096     omAllocBin can be freed with omfree, or an adress allocated with
1097     om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
1098     However, keep in mind that the efficiency decreases from
1099     Bin over Size to General routines (i.e., omFreeBin is more efficient than
1100     omFreeSize which is more efficient than omFree, likewise with the alloc
1101     routines).
1102   + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
1103   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
1104     defined, then the "real" alloc/realloc/free macros are used, and all
1105     omTest, omDebug and omCheck routines are undefined
1106   + to break after an omError occured within a debugger,
1107     set a breakpoint on dErrorBreak
1108   + to do checks from within the debugger, or to do checks with explicit
1109     check level, use omTest routines.
1110*/
1111
1112/* by default, store alloc info and file/line where addr was freed */
1113#ifndef OM_TRACK
1114#define OM_TRACK 4
1115#endif
1116/* only do constant-time memory checks */
1117#ifndef OM_CHECK
1118#define OM_CHECK 1
1119#endif
1120/* Do actually free memory:
1121   (be careful: if this is set, memory is never really freed,
1122    but only marked as free) */
1123#ifndef OM_KEEP
1124#define OM_KEEP 0
1125#endif
1126/* but only after you have freed 1000 more addresses
1127   (this is actually independent of the value of OM_KEEP and used
1128   to initialize om_Opts.Keep) */
1129#ifndef OM_SING_KEEP
1130#define OM_SING_KEEP 1000
1131#endif
1132
1133#endif /* MDEBUG */
1134
1135
1136/* undef KDEBUG for check of data during std computations
1137 *
1138 * define KDEBUG to
1139 * 0 for basic tests
1140 * 1 for tests in kSpoly
1141 * NOTE: You can locally enable tests in kspoly by setting the
1142 *       define at the beginning of kspoly.cc
1143 */
1144#define KDEBUG 0
1145
1146/* define LDEBUG checking numbers, undefine otherwise */
1147#define LDEBUG
1148/* define RDEBUG checking rings (together with TRACE=9) */
1149//#define RDEBUG
1150/* define TEST for non time critical tests, undefine otherwise */
1151#define TEST
1152
1153/* #define PAGE_TEST */
1154
1155/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
1156#define YYDEBUG 1
1157
1158/* Undefine to disable debugging of MP stuff */
1159#ifdef HAVE_MPSR
1160#define MPSR_DEBUG
1161#endif
1162
1163
1164#ifdef TEST
1165#ifndef buildin_rand
1166#define buildin_rand 1
1167#endif
1168#endif
1169
1170/* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */
1171/* define SPECTRUM_IOSTREAM to use C++ iostream for error messages          */
1172
1173/* #define SPECTRUM_DEBUG */
1174/* #define SPECTRUM_PRINT */
1175#cmakedefine  SPECTRUM_IOSTREAM
1176
1177#ifdef  SPECTRUM_DEBUG
1178#define MULTICNT_DEBUG
1179#define GMPRAT_DEBUG
1180#define KMATRIX_DEBUG
1181#define SPLIST_DEBUG
1182#define NPOLYGON_DEBUG
1183#define SEMIC_DEBUG
1184#endif
1185
1186#ifdef  SPECTRUM_PRINT
1187#define MULTICNT_PRINT
1188#define GMPRAT_PRINT
1189#define KMATRIX_PRINT
1190#define SPLIST_PRINT
1191#define NPOLYGON_PRINT
1192#define SEMIC_PRINT
1193#endif
1194
1195#ifdef  SPECTRUM_IOSTREAM
1196#define MULTICNT_IOSTREAM
1197#define GMPRAT_IOSTREAM
1198#define KMATRIX_IOSTREAM
1199#define SPLIST_IOSTREAM
1200#define NPOLYGON_IOSTREAM
1201#define SEMIC_IOSTREAM
1202#endif
1203
1204
1205#else /* not NDEBUG **************************************************** */
1206
1207#define NO_PDEBUG
1208
1209/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
1210#define YYDEBUG 0
1211
1212#endif /* not NDEBUG */
1213
1214/*******************************************************************
1215 *
1216 * assume(x) -- a handy macro for assumptions
1217 *
1218 ******************************************************************/
1219
1220#ifdef __cplusplus
1221extern "C" {
1222#endif
1223// routine which is used to report the error
1224// returns 0
1225extern int dReportError(const char* fmt, ...);
1226// within a debugger, set a breakpoint on dErrorBreak
1227// which is called after the error has been reported
1228extern void dErrorBreak();
1229#ifdef __cplusplus
1230}
1231#endif
1232
1233#ifndef HAVE_ASSUME
1234#define assume(x) ((void) 0)
1235#define r_assume(x) ((void) 0)
1236#else /* ! HAVE_ASSUME */
1237
1238#define assume_violation(s,f,l) \
1239  dReportError("assume violation at %s:%d condition: %s", f,l,s)
1240
1241#define assume(x)   _assume(x, __FILE__, __LINE__)
1242#define r_assume(x) _r_assume(x, __FILE__, __LINE__)
1243
1244#define _assume(x, f, l)                        \
1245do                                              \
1246{                                               \
1247  if (! (x))                                    \
1248  {                                             \
1249    assume_violation(#x, f, l);                 \
1250  }                                             \
1251}                                               \
1252while (0)
1253
1254#define _r_assume(x, f, l)                      \
1255do                                              \
1256{                                               \
1257  if (! (x))                                    \
1258  {                                             \
1259    assume_violation(#x, f, l);                 \
1260    return 0;                                   \
1261  }                                             \
1262}                                               \
1263while (0)
1264#endif /* HAVE_ASSUME */
1265
1266/* do have RDEBUG, unless we are doing the very real thing */
1267#ifdef HAVE_ASSUME
1268#ifndef RDEBUG
1269#define RDEBUG
1270#endif
1271#endif
1272
1273#if SIZEOF_VOIDP == 8
1274#ifndef OM_CHECK
1275#define OM_CHECK 0
1276#endif
1277#endif
1278
1279/* If we're not using GNU C, elide __attribute__ */
1280#ifndef __GNUC__
1281#  define  __attribute__(x)  /*NOTHING*/
1282#endif
1283
1284#endif /* MOD2_H  */
Note: See TracBrowser for help on using the repository browser.