source: git/Singular/mod2.h.in @ 3037783

spielwiese
Last change on this file since 3037783 was 3037783, checked in by Hans Schönemann <hannes@…>, 24 years ago
* hannes: libreadline and sunsos-4 git-svn-id: file:///usr/local/Singular/svn/trunk@3828 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 14.4 KB
Line 
1/*******************************************************************
2 *  Computer Algebra System SINGULAR
3 *
4 *  mod2.h: Main configuration file for Singular
5 *          DO NOT EDIT!
6 *
7 *  Version: $Id: mod2.h.in,v 1.76 1999-11-16 10:52:41 hannes Exp $
8 *******************************************************************/
9#ifndef MOD2_H
10#define MOD2_H
11
12/*******************************************************************
13 * Defines which are set by configure
14 ******************************************************************/
15/* Define to use dynamic linking */
16#undef HAVE_DL
17/* Define to use readline lib for fancy display */
18#undef HAVE_READLINE
19/* Define to use built-in command line parser */
20#undef HAVE_FEREAD
21/* Define if you want to use dld's */
22#undef HAVE_DLD
23/* Define to have dbm links */
24#undef HAVE_DBM
25/* Define to have smallgmp */
26#undef HAVE_SMALLGMP
27/* Define to have MP links */
28#undef HAVE_MPSR
29/* Define to have factory functionality added */
30#undef HAVE_FACTORY
31/* Define to have libfac functionality added */
32#undef HAVE_LIBFAC_P
33/* Define if you have stdc headers */
34#undef STDC_HEADERS
35/* Define if you have asm/sigcontext.h */
36#undef HAVE_ASM_SIGCONTEXT_H
37/* Define if you have sys/file.h */
38#undef HAVE_SYS_FILE_H
39/* Define if you have sys/stat.h */
40#undef HAVE_SYS_STAT_H
41/* Define if you have sys/param.h */
42#undef HAVE_SYS_PARAM_H
43/* Define if you have sys/file.h */
44#undef HAVE_SYS_TYPES_H
45/* Define if you have sys/ioctl.h */
46#undef HAVE_SYS_IOCTL_H
47/* Define if you have sys/time.h */
48#undef HAVE_SYS_TIME_H
49/* Define if you have sys/times.h */
50#undef HAVE_SYS_TIMES_H
51/* io header: */
52/* Define if you have termcap.h */
53#undef HAVE_TERMCAP_H
54/* Define if you have termios.h */
55#undef HAVE_TERMIOS_H
56/* Define if you have readline/history.h */
57#undef HAVE_READLINE_HISTORY_H
58/* Define if readline/readline.h is ok */
59#undef READLINE_READLINE_H_OK
60/* Define if time.h and sys/time.h can be included at the same time */
61#undef TIME_WITH_SYS_TIME
62/* Define if you have alloca.h */
63#undef HAVE_ALLOCA_H
64/* Define if you have pwd.h */
65#undef HAVE_PWD_H
66/* Define if you have unistd.h */
67#undef HAVE_UNISTD_H
68/* define if you have malloc.h */
69#undef HAVE_MALLOC_H
70/* define if you have pwd.h*/
71#undef HAVE_PWD_H
72/* Define if you have alloca */
73#undef HAVE_ALLOCA
74/* Define if you have getpagesize */
75#undef GETPAGESIZE
76/* Define if you have vprintf */
77#undef HAVE_VPRINTF
78/* Define if you have gettimeofday */
79#undef HAVE_GETTIMEOFDAY
80/* Define if you have atexit */
81#undef HAVE_ATEXIT
82/* Define if you have bcopy, bzero and bcmp
83   Linux needs that define! */
84#undef HAVE_BCOPY
85/* Define if sprintf does not return number of printed chars */
86#undef BSD_SPRINTF
87/* define if you have explicit C++ constructors */
88#undef HAVE_EXPLICIT_CONSTR
89/* Define if you have the getcwd function.  */
90#undef HAVE_GETCWD
91/* Define if you have the getwd function.  */
92#undef HAVE_GETWD
93/* Define if you have snprintf */
94#undef HAVE_VSNPRINTF
95/* Define if you have sbrk */
96#undef HAVE_SBRK
97/* Define if you have readlink */
98#undef HAVE_READLINK
99/* Define if you have usleep */
100#undef HAVE_USLEEP
101/* Define if you have sleep */
102#undef HAVE_SLEEP
103/* Define if you have setenv */
104#undef HAVE_SETENV
105/* Define if you have petpwnam */
106#undef HAVE_GETPWNAM
107/* Define sizeof(char) */
108#define SIZEOF_CHAR 1
109/* Define sizeof(short) */
110#define SIZEOF_SHORT 2
111/* Define sizeof(int) */
112#define SIZEOF_INT 4
113/* Define sizeof(long) */
114#define SIZEOF_LONG 4
115/* Define sizeof(void*) */
116#define SIZEOF_VOIDP 4
117/* Define sizeof(double) */
118#define SIZEOF_DOUBLE 8
119/* Define if your integer format is big endian */
120#undef WORDS_BIGENDIAN
121/* Define the type of the exponents to be used in monomials */
122#define EXPONENT_TYPE short
123/* Define the size of exponent */
124#define SIZEOF_EXPONENT SIZEOF_SHORT
125/* Define major version of Singular -- should be set in ../configure.in!!!*/
126#define SINGULAR_MAJOR_VERSION 0
127/* Define minor version of Singular -- should be set in ../configure.in!!! */
128#define SINGULAR_MINOR_VERSION 0
129/* Define sub version of Singular -- should be set in ../configure.in!!! */
130#define SINGULAR_SUB_VERSION 0
131/* Define version as a string */
132#define S_VERSION1 ""
133/* Define version date as a string */
134#define S_VERSION2 ""
135/* Define uname identifier as a string */
136#define S_UNAME ""
137/* Absolute pathname of root directory of Singular source */
138#define S_ROOT_DIR ""
139/* Define if our gmalloc is to be used */
140#undef HAVE_GMALLOC
141/* Define pagesize of your system */
142#define SIZE_OF_SYSTEM_PAGE 4096
143/* size of page as we can use it */
144#define SIZE_OF_PAGE SIZE_OF_SYSTEM_PAGE
145/* valloc routine which returns chunk of SIZE_OF_PAGE */
146#define PALLOC malloc
147#define PFREE  free
148/* define if you have the MTRACK utilities (only on linux/elf) */
149#undef HAVE_MTRACK
150
151/*******************************************************************
152 * Defines which are not set by configure
153 ******************************************************************/
154/* define to use the dynamic linking of readline in non-distributions builds */
155/* #undef USE_STATIC_RL */
156
157/* Default value for timer resolution in ticks per second */
158/* set to 10 for resolution of tenth of a second, etc */
159#define TIMER_RESOLUTION 1
160
161/* Undefine to disable the quote/eval of expressions */
162#define SIQ 1
163
164/* Define to enable TCL interface */
165#undef HAVE_TCL
166
167/* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */
168#define FAST_AND_DIRTY
169#ifdef __MWERKS__
170/* includes for Metrowerks */
171#include "mod2.mwerks.h"
172#else
173/* works around a quirk in the generation of parser tables */
174#define INIT_BUG
175#endif
176
177/* linear algebra extensions from pcv.h/pcv.cc */
178#define HAVE_PCV 1
179
180/* Define to use old mechanismen for saving currRing with procedures
181 * Does not work with HAVE_NAMESPACES enabled
182 */
183#undef USE_IILOCALRING
184
185/* Define to use new namespaces techniks */
186#undef HAVE_NAMESPACES
187
188/* Define to enable dynamic module code */
189#undef HAVE_DYNAMIC_LOADING
190
191/* Define to use scanner when loading libraries */
192#define HAVE_LIBPARSER
193
194/*#define PROFILING*/
195#ifdef PROFILING
196#define PROFILER ,0,0
197#else
198#define PROFILER
199#endif
200
201/* Define to use gmp for rational arithmetic */
202#define HAVE_GMP
203
204/*******************************************************************
205 * Evaluate the set defines
206 ******************************************************************/
207/* dynamic readline or readline ? */
208#ifdef HAVE_DL
209  #if !defined(USE_STATIC_RL)
210    #define HAVE_DYN_RL
211  #endif
212#endif
213
214/* FGLM needs factory */
215#ifdef HAVE_FACTORY
216#define HAVE_FGLM
217#endif
218
219/* Define if you want fglm for homogeneous case */
220#ifdef HAVE_FGLM
221#undef HAVE_FGLM_HOME
222#endif
223
224/* Spectrum needs GMP */
225#ifdef HAVE_GMP
226/* #define HAVE_SPECTRUM */
227#endif
228
229/* Undefine to disable real time measurments  */
230#ifdef HAVE_GETTIMEOFDAY
231#if ! defined(__MWERKS__) && ! defined(MSDOS)
232#define HAVE_RTIMER
233#else
234#undef HAVE_RTIMER
235#endif
236#endif
237
238#if SIZEOF_VOIDP == 8
239/* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */
240#define ALIGN_8
241#define LOG_SIZEOF_LONG  3
242#define LOG_SIZEOF_VOIDP 3
243#else
244#define LOG_SIZEOF_LONG  2
245#define LOG_SIZEOF_VOIDP 2
246#endif
247
248#ifndef CHAR_BIT
249#define CHAR_BIT 8
250#endif
251
252#define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
253
254#define SINGULAR_VERSION (SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION)
255
256#if SIZEOF_EXPONENT == 1
257#define MAX_EXPONENT 0x7f
258#define MAX_COMPONENT 0xff
259#elif SIZEOF_EXPONENT == 2
260#define MAX_EXPONENT 0x7fff
261#define MAX_COMPONENT 0xffff
262#else /* SIZEOF_EXPONENT == 4 */
263#define MAX_EXPONENT 0x7fffffff
264#define MAX_COMPONENT 0xffffffff
265#endif
266
267/*******************************************************************
268 * Miscellanous Defines
269 ******************************************************************/
270/* define MM_COUNT to enable "memory(0)" (resp. memory(1))*/
271#define MM_COUNT 1
272
273
274#ifndef HAVE_LIBPARSER
275#  undef YYLPDEBUG
276#else
277#  define YYLPDEBUG 1
278#endif
279
280#ifndef FALSE
281#define FALSE       0
282#endif
283
284#ifndef TRUE
285#define TRUE        1
286#endif
287
288#ifndef NULL
289#define NULL        (0)
290#endif
291
292#ifndef SEEK_END
293#define SEEK_END 2
294#endif
295
296#ifndef SEEK_SET
297#define SEEK_SET 0
298#endif
299
300#define HALT() m2_end(2)
301
302#define memcpy4 memcpy
303
304/* define OLD_RES for res/sres/mres(i,j,k) */
305#undef OLD_RES
306
307/* the maximal ascii length of an int number + 1 = 11 for 32 bit int */
308#define MAX_INT_LEN 11
309#define MAX_INT_VAL 0x7fffffff
310extern int pShortOut;
311
312#ifdef DO_PROFILE
313/* define to enable explicit profiling of some crucial inline
314 * routines and defines  */
315#undef DO_DEEP_PROFILE
316#endif
317
318#define buildin_rand 1
319
320/* define to enable assume */
321#ifndef HAVE_ASSUME
322#undef HAVE_ASSUME
323#endif
324
325/* set to 0 to disable aso memory mamagent */
326#ifndef HAVE_ASO
327#define HAVE_ASO 1
328#endif
329#if defined(HAVE_ASO) && HAVE_ASO == 1
330/* define to enable ASO debugging */
331#undef ASO_DEBUG
332#endif
333
334/*******************************************************************
335 * DEBUG OPTIONS
336 * -- only significant for for compiling without -DNDEBUG
337 * -- you better know what your are doing, if you touch this
338 ******************************************************************/
339#ifndef NDEBUG
340
341/* undefine to disable assume -- should normally be defined for NDEBUG */
342#define HAVE_ASSUME
343
344/* undef MDEBUG to disable memory checks
345 *
346 * define MDEBUG to
347 * -1 to enable MTRACK, but to skip memory checks
348 * 0 to enable basic memory checks (at least on each alloc/free)
349 * 1 for addtl. containment checks in free/alloc list for each memory check
350 * 2 for addtl. checks of entire free/alloc list at each memory check
351 * 3 for addtl. checks of all heaps at each memory check
352 * NOTE: For MDEBUG > 1, it gets very slow
353 * You can control MDEBUG at run-time by setting the value of the
354 * variable mm_MDEBUG (defined in mmcheck.c) to the appropriate value.
355 */
356#define MDEBUG 0
357
358/* undef HEAP_DEBUG to disable heap checks
359 *
360 * define HEAP_DEBUG to
361 * 0 to enable basic heap addr checks (at least on each alloc/free)
362 * 1 for addtl. containment checks in free/alloc list of heap
363 * 2 for addtl. check of entire  heap at each heap addr check
364 * NOTE: For HEAP_DEBUG > 1 on, it gets very slow
365 * You can control HEAP_DEBUG at run-time by setting the value of the
366 * variable mm_HEAP_DEBUG (defined in mmheap.c) to the appropriate value.
367 */
368/* #define HEAP_DEBUG 0 */
369
370/* define PAGE_DEBUG for page accesses -- never re-uses freed pages */
371#ifndef PAGE_DEBUG
372#undef PAGE_DEBUG
373#endif
374
375/* undef PDEBUG to disable checks of polys
376 *
377 * define PDEBUG to
378 * 0 for basic, explicitely requested tests
379 * 1 for tests in pProcs
380 * 2 for low-level tests (Exponent access, primitive monom operations)
381 * NOTE: for PDEBUG > 1 it gets very slow
382 *       You can locally enable tests in pProcs by setting the
383 *       define at the beginning of pProcs.cc
384 */
385#define PDEBUG 0
386
387/* undef KDEBUG for checck of data during std computations
388 *
389 * define KDEBUG to
390 * 0 for basic tests
391 * 1 for tests in kSpoly
392 * NOTE: You can locally enable tests in kspoly by setting the
393 *       define at the beginning of kspoly.cc
394 */
395#define KDEBUG 0
396
397/* define LDEBUG checking numbers, undefine otherwise */
398#define LDEBUG
399/* define RDEBUG checking rings (together with TRACE=9) */
400#define RDEBUG
401/* define TEST for non time critical tests, undefine otherwise */
402#define TEST
403/* define MLIST for printing block of used memory on exit */
404#define MLIST 1
405
406#ifdef HAVE_MTRACK
407/* define MTRACK for allowing to keep track of Alloc/Free with a backtrace */
408/* works only under linux/elf */
409#define MTRACK
410/* define to enable stack storing of free calls, as well */
411#undef MTRACK_FREE
412
413#endif /* !NDEBUG  */
414
415
416/* #define PAGE_TEST */
417
418/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
419#define YYDEBUG 1
420
421/* Undefine to disable debugging of MP stuff */
422#ifdef HAVE_MPSR
423#define MPSR_DEBUG
424#endif
425
426/* PDEBUG requires MDEBUG */
427#ifdef PDEBUG
428#ifndef MDEBUG
429#define MDEBUG 0
430#endif
431#endif
432
433#ifdef TEST
434#ifndef buildin_rand
435#define buildin_rand 1
436#endif
437#endif
438
439/* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */
440/* define SPECTRUM_IOSTREAM to use C++ iostream for error messages          */
441
442/* #define SPECTRUM_DEBUG */
443/* #define SPECTRUM_PRINT */
444#undef  SPECTRUM_IOSTREAM
445
446#ifdef  SPECTRUM_DEBUG
447#define MULTICNT_DEBUG
448#define GMPRAT_DEBUG
449#define KMATRIX_DEBUG
450#define SPLIST_DEBUG
451#define NPOLYGON_DEBUG
452#define SEMIC_DEBUG
453#endif
454
455#ifdef  SPECTRUM_PRINT
456#define MULTICNT_PRINT
457#define GMPRAT_PRINT
458#define KMATRIX_PRINT
459#define SPLIST_PRINT
460#define NPOLYGON_PRINT
461#define SEMIC_PRINT
462#endif
463
464#ifdef  SPECTRUM_IOSTREAM
465#define MULTICNT_IOSTREAM
466#define GMPRAT_IOSTREAM
467#define KMATRIX_IOSTREAM
468#define SPLIST_IOSTREAM
469#define NPOLYGON_IOSTREAM
470#define SEMIC_IOSTREAM
471#endif
472
473
474#else /* not NDEBUG **************************************************** */
475
476/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
477#define YYDEBUG 0
478
479#endif /* not NDEBUG */
480
481/* MLIST requires MDEBUG */
482#ifdef MLIST
483#ifndef MDEBUG
484#define MDEBUG 0
485#endif
486#endif
487
488/* MTRACK requires MDEBUG and MLIST*/
489#ifdef MTRACK
490#ifndef MDEBUG
491#define MDEBUG -1
492#endif
493#ifndef MLIST
494#define MLIST
495#endif
496#endif
497
498
499#ifdef HAVE_DYNAMIC_LOADING
500#   define HAVE_NAMESPACES 1
501#endif /* HAVE_DYNAMIC_LOADING */
502#ifdef HAVE_NAMESPACES
503#  undef USE_IILOCALRING
504#endif
505
506/*******************************************************************
507 *
508 * assume(x) -- a handy macro for assumptions
509 *
510 ******************************************************************/
511
512#ifndef HAVE_ASSUME
513#define assume(x) ((void*) 0)
514#define r_assume(x) ((void*) 0)
515#else /* ! HAVE_ASSUME */
516
517#ifdef __cplusplus
518extern "C" {
519#endif
520/* Set a breakpoint on this function */
521extern void assume_violation(char* file, int line);
522#ifdef __cplusplus
523}
524#endif
525
526
527#define assume(x)   _assume(x, __FILE__, __LINE__)
528#define r_assume(x) _r_assume(x, __FILE__, __LINE__)
529
530#define _assume(x, f, l)                        \
531do                                              \
532{                                               \
533  if (! (x))                                    \
534  {                                             \
535    assume_violation(f, l);                     \
536  }                                             \
537}                                               \
538while (0)
539
540#define _r_assume(x, f, l)                      \
541do                                              \
542{                                               \
543  if (! (x))                                    \
544  {                                             \
545    assume_violation(f, l);                     \
546    return 0;                                   \
547  }                                             \
548}                                               \
549while (0)
550#endif /* HAVE_ASSUME */
551
552#endif /* MOD2_H  */
Note: See TracBrowser for help on using the repository browser.