source: git/ntl/doc/config.txt @ 26e030

spielwiese
Last change on this file since 26e030 was 26e030, checked in by Hans Schönemann <hannes@…>, 14 years ago
*hannes: update to 5.5.1 git-svn-id: file:///usr/local/Singular/svn/trunk@11949 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 18.1 KB
Line 
1
2usage: ./configure [ variable=value ]...
3
4This configure script generates the file 'makefile' and the file
5'../include/NTL/config.h', based upon the values assigned to the
6variables on the command line.
7
8Note that all of these configuration options can also be set
9by editing these two (well documented) files by hand.
10
11This command is intended only to provide a slightly more convenient
12and (perhaps more importantly) non-interactive way to do this.
13This script does not perform any 'magic', like finding out what
14the local C compiler is called, etc.  If the defaults are not
15correct for your platform, you have to set an appropriate variable.
16
17
18########### Here are the most important variables, and their default values.
19
20CC=gcc               # The C compiler
21CXX=g++              # The C++ compiler
22CFLAGS=-O2           # C complilation flags
23CXXFLAGS=$(CFLAGS)   # C++ compilation flags (by default, same as CFLAGS)
24
25DEF_PREFIX=/usr/local # Default software directory
26PREFIX=$(DEF_PREFIX) # Directory in which to install NTL library components
27SHARED=off           # Generate a shared library (as well as static)
28
29NTL_STD_CXX=on       # ISO Mode switch
30
31NTL_GMP_LIP=off      # Switch to enable the use of GMP as primary
32                     #   long integer package
33
34GMP_PREFIX=$(DEF_PREFIX) # Directory in which GMP components are installed
35
36NTL_GF2X_LIB=off     # Switch to enable the use of the gf2x package
37                     #   for faster arithmetic over GF(2)[X]
38
39GF2X_PREFIX=$(DEF_PREFIX) # Directory in which gf2x components are installed
40
41
42########## Here are more detailed description of these variables.
43
44########## Basic compilation variables:
45
46CC=gcc
47
48# A C or C++ compiler, e. g., gcc, cc, xlc.
49# There are a few components written in C which may be compiled
50# under C++, but C compilers tend to generate slightly better code.
51# The C++ and C compilers (if different) must generate
52# compatible code.
53
54
55
56CXX=g++
57
58# A C++ compiler, e.g., g++, CC, xlC
59# Note that NTL appends a ".c" siffix to both C and C++ files,
60# so you must, for example, use g++ (rather than gcc) as your C++
61# compiler.
62
63
64
65CFLAGS=-O2
66
67# Flags for the C compiler
68# Some useful flags:
69#   -O2   --  recommended level of optimization
70#   -g    --  debugging
71#   -mcpu=v8  --  needed with gcc/g++ to get the full instruction set
72#                 of a SparcStation
73#   -qarch=ppc  -- needed with xlc/C to get the full instruction set
74#                  of a PowerPC
75
76
77
78CXXFLAGS=$(CFLAGS)
79
80# Flags for the C++ compiler (usually the same as CFLAGS)
81# Some useful flags:
82#   -+  -- needed with xlC to make it treat .c files as C++ files
83
84
85
86
87########## Installation path:
88
89DEF_PREFIX=/usr/local
90
91# Default software directory
92
93PREFIX=$(DEF_PREFIX)
94
95# Set this to the directory in which you want NTL components to be
96# installed.  When 'make install' is executed, the header
97# files are copied into $(PREFIX)/include/NTL, the library itself is
98# copied to $(PREFIX)/lib/libntl.a, and the documentation files
99# are copied into $(PREFIX)/share/doc/NTL.
100# Unless you have root permissions when running 'make install',
101# you will have to override the default PREFIX value with the
102# name of your own local directory.
103# If you want finer-grained control over where the different
104# library components are installed, set the variables
105# INCLUDEDIR, LIBDIR, and DOCDIR (see below).
106
107########## Shared library switch:
108
109SHARED=off
110
111# Set this to 'on' if you want to generate a shared library, in addition to
112# a static library.   Shared libraries have many advantages, but
113# unfortunately, their use is rather less portable than that of good,
114# old-fashioned static libraries.  If you set SHARED=on, then the makefile
115# attempts to make use of the GNU libtool program, which is meant to work
116# around these portability issues.  You may also want to set the
117# configuration variable LIBTOOL (see below), to point to another version of
118# libtool.  For example, on Mac OSX, the built-in command libtool is not
119# actually the GNU libtool program; in this case, you will want to set
120# LIBTOOL=glibtool.  On other systems, it may be necssary to downlaod and
121# install a fresh copy of the libtool program (which can be obtained from
122# http://www.gnu.org/software/libtool). Note that if SHARED=on, then
123# in addition to using the libtool program, the makefile relies on
124# features specific to GNU make.
125
126
127
128########## ISO mode switch:
129
130NTL_STD_CXX=on
131
132# Set to 'off' if you do not want to use the "Standard C++" version of NTL.
133# In this version, all of NTL is "wrapped" inside the namespace NTL,
134# and are no longer directly accessible---you must either use
135# explicit qualification, or using directives, or using declarations.
136# However, note that all names that begin with "NTL_" are macros,
137# and as such do not belong to any namespace.
138# Additionally, instead of including the traditional headers
139# <stdlib.h>, <math.h>, and <iostream.h>, the standard headers
140# <cstdlib>, <cmath>, and <iostream> are included.
141# These "wrap" some (but not all) names in namespace std.
142
143# If your compiler is not yet up to date, but you want some
144# of the benefits of Standard C++, you might try the "partial Standard C++"
145# switches NTL_PSTD_NNS, NTL_PSTD_NHF, NTL_PSTD_NTN (see below).
146
147########## GMP variables:
148
149NTL_GMP_LIP=off
150
151# Set to 'on' if you want to use GMP, the GNU Multi-Precision package,
152# as the primary long integer package.
153# This will typically yield significantly faster long integer arithmetic
154# compared to the traditional long integer package, and will yield somewhat
155# faster long integer arithmetic compared the traditinal package
156# supplemented by GMP (i.e., the NTL_GMP_HACK flag, see below).
157
158# If you set this flag, please note the following.
159# If you have installed GMP in a standard "system" location, this is
160# all you have to do.  Otherwise, if GMP is built, but not installed
161# in a standard place, you have to set the variable GMP_PREFIX.
162
163
164GMP_PREFIX=$(DEF_PREFIX)
165
166# If GMP was installed in a standard system directory, e.g., /usr/local,
167# then do not set this variable.
168# Otherwise, if you want to use GMP and GMP was installed in
169# a directory <gmp_prefix>, then set GMP_PREFIX=<gmp_prefix>.
170# This works if the directory <gmp_prefix>/include contains gmp.h
171# and <gmp_prefix>/lib contains libgmp.a. 
172# For finer-grained control, set the variables GMP_INCDIR and GMP_LIBDIR
173# instead (see below).
174
175
176########## GF2X variables:
177
178NTL_GF2X_LIB=off
179
180# Set to 'on' if you want to use the gf2x library for faster
181# arithmetic over GF(2)[X] (the NTL class GF2X).
182
183# If you set this flag, please note the following.
184# If you have installed gf2x in a standard "system" location, this is
185# all you have to do.  Otherwise, if gf2x is built, but not installed
186# in a standard place, you have to set the variable GF2X_PREFIX.
187
188
189GF2X_PREFIX=$(DEF_PREFIX)
190
191# If gf2x was installed in a standard system directory, e.g., /usr/local,
192# then do not set this variable.
193# Otherwise, if you want to use gf2x and gf2x was installed in
194# a directory <gf2x_prefix>, then set GF2X_PREFIX=<gf2x_prefix>.
195# This works if the directory <gf2x_prefix>/include contains gf2x.h
196# and <gf2x_prefix>/lib contains libgf2x.a. 
197# For finer-grained control, set the variables GF2X_INCDIR and GF2X_LIBDIR
198# instead (see below).
199
200
201
202########### Examples:
203
204# If you are happy with all the default values:
205
206   ./configure
207
208# Actually, the initially installed makefile and config.h files
209# already reflect the default values.
210
211
212
213
214# If your C/C++ compilers are called cc/CC:
215
216   ./configure CC=cc CXX=CC
217
218
219
220# If GMP is installed in a standard system directory, and you want to use it:
221
222   ./configure NTL_GMP_LIP=on
223
224
225
226# If GMP was installed in a non-standard directory, say,  $HOME/sw:
227
228   ./configure NTL_GMP_LIP=on GMP_PREFIX=$HOME/sw
229
230
231
232# If you want to use the options -g and -O for compiling C and C++,
233# just execute
234
235   ./configure "CFLAGS=-g -O"
236
237# Note the use of quotes to keep the argument in one piece.
238
239
240# If you want to use both GMP and the gf2x library:
241
242   ./configure NTL_GMP_LIP=on NTL_GF2X_LIB=on
243
244
245# If you want to use GMP as well as traditional (non-ISO) mode:
246
247   ./configure NTL_GMP_LIP=on NTL_STD_CXX=off
248
249
250
251
252########### Here is a complete list of the remaining variables,
253########### with their default values.  These variables are pretty
254########### esoteric, and you will probably never change their
255########### default values.
256
257AR=ar
258ARFLAGS=ruv
259RANLIB=ranlib
260LDFLAGS=
261LDFLAGS_CXX=$(LDFLAGS)
262LDLIBS=-lm
263LDLIBS_CXX=$(LDLIBS)
264CPPFLAGS=
265LIBTOOL=libtool
266
267LIBDIR=$(PREFIX)/lib
268INCLUDEDIR=$(PREFIX)/include
269DOCDIR=$(PREFIX)/share/doc
270
271
272NTL_PSTD_NNS=off
273NTL_PSTD_NHF=off
274NTL_PSTD_NTN=off
275
276NTL_LONG_LONG_TYPE=undefined
277NTL_UNSIGNED_LONG_LONG_TYPE=undefined
278NTL_CXX_ONLY=off
279NTL_CLEAN_INT=off
280NTL_CLEAN_PTR=off
281NTL_RANGE_CHECK=off
282NTL_X86_FIX=off
283NTL_NO_X86_FIX=off
284NTL_NO_INIT_TRANS=off
285
286WIZARD=on
287NTL_LONG_LONG=off
288NTL_AVOID_FLOAT=off
289NTL_SPMM_UL=off
290NTL_SPMM_ULL=off
291NTL_SPMM_ASM=off
292NTL_TBL_REM=off
293NTL_AVOID_BRANCHING=off
294NTL_GF2X_NOINLINE=off
295NTL_GF2X_ALTCODE=off
296NTL_GF2X_ALTCODE1=off
297
298NTL_GMP_HACK=off
299GMP_INCDIR=$(GMP_PREFIX)/include
300GMP_LIBDIR=$(GMP_PREFIX)/lib
301
302GF2X_INCDIR=$(GF2X_PREFIX)/include
303GF2X_LIBDIR=$(GF2X_PREFIX)/lib
304
305
306
307
308########### Here is a more detailed description of these variables.
309
310########### Further compilation variables:
311
312
313AR=ar
314
315# command to make a library
316
317
318
319ARFLAGS=ruv
320
321# arguments for AR
322
323
324
325RANLIB=ranlib
326
327# set to echo if you want to disable it completely
328
329
330
331LDFLAGS=
332
333# arguments for linker for C++ programs
334
335
336
337LDFLAGS_CXX=$(LDFLAGS)
338
339# libraries for linking C programs
340
341
342
343LDLIBS=-lm
344
345# libraries for linking C programs
346
347
348
349LDLIBS_CXX=$(LDLIBS)
350
351# libraries for linking C++ programs
352
353
354
355CPPFLAGS=
356
357# arguments for the C preprocessor
358
359LIBTOOL=libtool
360
361# the libtool command -- only needed if SHARED=on
362
363
364
365########### Details of the compilation process (when SHARED=off)
366
367
368# When a C file foo.c is compiled:
369   $(CC) -I../include $(CPPFLAGS) $(CFLAGS) -c foo.c
370
371# When a C file foo.c is compiled and linked:
372   $(CC) -I../include $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o foo foo.c $(LDLIBS)
373
374# When a C++ file foo.c is compiled:
375   $(CXX) -I../include $(CPPFLAGS) $(CXXFLAGS) -c foo.c
376
377# When a C++ file foo.c is compiled and linked:
378   $(CXX) -I../include $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS_CXX) \
379      -o foo foo.c $(LDLIBS_CXX)
380
381# When the library ntl.a is built
382   $(AR) $(ARFLAGS) ntl.a [ object files ]...
383   $(RANLIB) ntl.a
384# If the ranlib command does not exist, everything will still function OK.
385
386
387
388########### Further installation variables:
389
390LIBDIR=$(PREFIX)/lib
391INCLUDEDIR=$(PREFIX)/include
392DOCDIR=$(PREFIX)/share/doc
393# Where to install NTL.
394# Execution of 'make install' copies header files into $(INCLUDEDIR)/NTL,
395# copies the library itself to $(LIBDIR)/libntl.a, and copies the
396# documentation files into $(DOCDIR)/NTL.
397
398
399
400########## Partial ISO modes
401
402NTL_PSTD_NNS=off
403
404# NTL namespace --  wraps NTL in a namespace
405
406
407
408NTL_PSTD_NHF=off
409 
410# new header files -- use <cstdlib>, etc., instead of <stdlib.h>, etc. 
411
412
413
414NTL_PSTD_NTN=off
415
416# nothrow new -- use the nothrow version of new. 
417
418# Any combination of these PSTD swtiches may be set -- setting them all
419# is equvalent to setting NTL_STD_CXX.  Make sure you also unset NTL_STD_CXX;
420# otherwise, they have no effect.
421
422
423########### Basic Configuration Options:
424
425NTL_LONG_LONG_TYPE=undefined
426
427# Name of double-word signed integer type.
428# This is a non-standard type, and is called 'long long' by many
429# compilers.  MS C++ calls it '__int64'.
430#
431# Note that the new C99 standard defines the type 'long long'
432# to be at least 64-bits wide.  On 32-bit machines, this is just right.
433# Although not officially part of the C++ standard (which predates C99),
434# it is widely supported by C++ compilers, and is likely to be added
435# to the C++ standard.
436#
437# Unfortunately, 64-bit machines usually define 'long long'
438# to also be 64-bits wide, which is kind of useless.
439# However, GCC provides a type __int128_t which does the job.
440#
441# If left undefined, NTL will use somee "ifdef magic" to find
442# the type most suitable for your machine (based on compiler and
443# word size).
444
445NTL_UNSIGNED_LONG_LONG_TYPE=undefined
446
447# Name of double-word unsigned integer type.
448#
449# If left undefined, NTL will use somee "ifdef magic" to find
450# the type most suitable for your machine (based on compiler and
451# word size).
452
453
454
455
456
457NTL_CXX_ONLY=off
458
459# It is possible to compile everything using C++ only.
460# If you want to do this, CC and CXX should both be C++ compilers.
461# You may also want to set NTL_CXX_ONLY=on, which eliminates some
462# "C" linkage that is no longer necessary.
463# However, it should still work without it.
464#
465# This flag can be set independently of NTL_STD_CXX.
466# All functions that may have "C" linkage are never wrapped in
467# namespace NTL;  instead, their names always start with "_ntl_",
468# and as such, they should not conflict with other global names.
469
470
471
472NTL_CLEAN_INT=off
473
474# Setting this to 'on' disables the use of some non-standard
475# integer arithmetic which would yield slightly better performance.
476
477
478NTL_CLEAN_PTR=off
479
480# Setting this to 'on' disables the use of some non-standard
481# pointer arithmetic which would yield slightly better performance.
482
483
484NTL_RANGE_CHECK=off
485
486# Setting this to 'on' will generate vector subscript range-check code.
487# Useful for debugging, but it slows things down of course.
488
489
490
491NTL_X86_FIX=off
492
493# Set to 'on' to force the "x86 floating point fix",
494# overriding the default behavior.
495# By default, NTL will apply the "fix" if it looks like it is
496# necessary, and if it knows how to fix it.
497# The problem addressed here is that x86 processors sometimes
498# run in a mode where FP registers have more precision than doubles.
499# This will cause code in quad_float.c some trouble.
500# NTL can normally automatically detect the problem, and fix it,
501# so you shouldn't need to worry about this or the next flag.
502
503
504
505NTL_NO_X86_FIX=off
506
507# Set to 'on' to forces no "x86 floating point fix",
508# overriding the default behavior.
509
510
511
512NTL_NO_INIT_TRANS=off
513
514# When 'off', NTL uses a special code sequence to avoid
515# copying large objects in return statements.  However, if your
516# compiler optimizes away the return of a *named* local object,
517# this is not necessary, and setting this flag to 'on' will result
518# in *slightly* more compact and efficient code.  The C++
519# standard explicitly allows compilers to perform this optimization,
520# and with time, more compilers actually do this.
521# Traditionally, however, most will only avoid copying *temporary*
522# objects in return statements, and NTL's default code sequence
523# exploits this fact.
524
525
526
527########## Performance Options:
528
529WIZARD=on
530
531# Set to 'off' if you want to bypass the wizard; otherwise, set to 'on'.
532# The wizard is a script that runs when NTL is built that sets the following
533# flags to 'optimize' performance on the current platform.
534
535
536
537NTL_LONG_LONG=off
538
539# For platforms that support it, this flag can be set to cause
540# the long-integer multiplication code to use the type "long long",
541# which on some platforms yields a significant performance gain,
542# but on others, it can yield no improvement and can even
543# slow things down.
544# The variable NTL_LONG_LONG_TYPE can be defined to use a type name
545# other than "long long".
546# If you set NTL_LONG_LONG, you might also want to set
547# the flag NTL_TBL_REM.
548
549
550
551NTL_AVOID_FLOAT=off
552
553# On machines with slow floating point or---more comminly---slow int/float
554# conversions, this flag can lead to faster long-integer multiplication code.
555# If you set NTL_AVOID_FLOAT, you should probably also
556# set NTL_TBL_REM.
557# Note that at most one of NTL_LONG_LONG and NTL_AVOID_FLOAT may be set.
558
559
560NTL_SPMM_UL=off
561
562# On machines with slow floating point or---more comminly---slow int/float
563# conversions, this flag can lead to faster single-precision multiplication
564# with preconditioning (see MulModPrecon in the ZZ module).
565# This sounds esoteric, but it is actually important.
566
567
568NTL_SPMM_ULL=off
569
570# Similar to NTL_SPMM_UL, but relies on double-word unsigned multiplication.
571# This is (usually) done using the type 'unsigned long long',
572# but you can set the variable NTL_UNSIGNED_LONG_LONG_TYPE to
573# override the default.
574
575
576NTL_SPMM_ASM=off
577
578# Similar to NTL_SPMM_ULL, but relies on double-word unsigned multiplication
579# using assembly code.  Only supported on select machines
580# and only under GCC.
581
582
583
584
585NTL_TBL_REM=off
586
587# With this flag, some divisions are avoided in the
588# ZZ_pX multiplication routines.  If you use the NTL_AVOID_FLOAT
589# or NTL_LONG_LONG flags, then you should probably use this one too.
590
591
592
593
594NTL_AVOID_BRANCHING=off
595
596# With this option, branches are replaced at several
597# key points with equivalent code using shifts and masks.
598# Recommended for use with RISC architectures, especially
599# ones with deep pipelines and high branch penalities.
600# This flag is becoming less helpful as newer machines
601# have much smaller branch penalties, but still may be worth a try.
602
603
604
605
606NTL_GF2X_NOINLINE=off
607
608# By default, the low-level GF2X multiplication routine in inlined.
609# This can potentially lead to some trouble on some platforms,
610# and you can override the default by setting this flag.
611
612
613
614
615NTL_GF2X_ALTCODE=off
616
617# With this option, the default strategy for implmenting low-level
618# GF2X multiplication is replaced with an alternative strategy.
619# This alternative strategy seems to work better on RISC machines
620# with deep pipelines and high branch penalties (like a powerpc),
621# but does no better (or even worse) on x86s.
622
623
624NTL_GF2X_ALTCODE1=off
625
626# Yet another alternative implementation for GF2X multiplication.
627
628
629
630########## More GMP Options:
631
632
633NTL_GMP_HACK=off
634
635# Set to 'on' if you want to use GMP, the GNU Multi-Precision package,
636# as a supplemental long integer package.
637# This will typically yield significantly faster long integer arithmetic
638# compared  to the traditional long integer package, while still maintaining
639# complete backward compataibility with code that uses the traditional
640# long integer package.  However, this flag is mainly for
641# enabling backward compatibility, and you are much better off
642# using the NTL_GMP_LIP flag. 
643
644# If you set this flag, you may have to set GMP_PREFIX as well.
645
646GMP_INCDIR=$(GMP_PREFIX)/include
647# directory containing gmp.h
648
649GMP_LIBDIR=$(GMP_PREFIX)/lib
650# directory containing libgmp.a
651
652
653####### More gf2x options:
654
655GF2X_INCDIR=$(GF2X_PREFIX)/include
656# directory containing gf2x.h
657
658GF2X_LIBDIR=$(GF2X_PREFIX)/lib
659# directory containing libgf2x.a
660
Note: See TracBrowser for help on using the repository browser.