Codebase list ntl / debian/5.4.2-1 doc / config.txt
debian/5.4.2-1

Tree @debian/5.4.2-1 (Download .tar.gz)

config.txt @debian/5.4.2-1raw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
usage: ./configure [ variable=value ]...

This configure script generates the file 'makefile' and the file
'../include/NTL/config.h', based upon the values assigned to the
variables on the command line.

Note that all of these configuration options can also be set 
by editing these two (well documented) files by hand.

This command is intended only to provide a slightly more convenient
and (perhaps more importantly) non-interactive way to do this.
This script does not perform any 'magic', like finding out what
the local C compiler is called, etc.  If the defaults are not
correct for your platform, you have to set an appropriate variable.


########### Here are the most important variables, and their default values.

CC=gcc               # The C compiler
CXX=g++              # The C++ compiler
CFLAGS=-O2           # C complilation flags
CXXFLAGS=$(CFLAGS)   # C++ compilation flags (by default, same as CFLAGS)

PREFIX=/usr/local    # Directory in which to install NTL library components

NTL_STD_CXX=on       # ISO Mode switch

NTL_GMP_LIP=off      # Switch to enable the use of GMP as primary 
                     #   long integer package

GMP_PREFIX=undefined # Directory in which GMP components have been installed


########## Here are more detailed description of these variables.

########## Basic compilation variables:

CC=gcc

# A C or C++ compiler, e. g., gcc, cc, xlc.
# There are a few components written in C which may be compiled
# under C++, but C compilers tend to generate slightly better code.
# The C++ and C compilers (if different) must generate
# compatible code.



CXX=g++

# A C++ compiler, e.g., g++, CC, xlC
# Note that NTL appends a ".c" siffix to both C and C++ files,
# so you must, for example, use g++ (rather than gcc) as your C++ 
# compiler.



CFLAGS=-O2

# Flags for the C compiler
# Some useful flags:
#   -O2   --  recommended level of optimization
#   -g    --  debugging
#   -mcpu=v8  --  needed with gcc/g++ to get the full instruction set
#                 of a SparcStation
#   -qarch=ppc  -- needed with xlc/C to get the full instruction set
#                  of a PowerPC



CXXFLAGS=$(CFLAGS)

# Flags for the C++ compiler (usually the same as CFLAGS)
# Some useful flags:
#   -+  -- needed with xlC to make it treat .c files as C++ files



########## Installation path:

PREFIX=/usr/local

# Set this to the directory in which you want NTL components to be
# installed.  When 'make install' is executed, the header
# files are copied into $(PREFIX)/include/NTL, the library itself is
# copied to $(PREFIX)/lib/libntl.a, and the documentation files
# are copied into $(PREFIX)/doc/NTL.
# Unless you have root permissions when running 'make install',
# you will have to override the default PREFIX value with the
# name of your own local directory.
# If you want finer-grained control over where the different
# library components are installed, set the variables 
# INCLUDEDIR, LIBDIR, and DOCDIR (see below).

########## ISO mode switch:

NTL_STD_CXX=on

# Set to 'off' if you do not want to use the "Standard C++" version of NTL.
# In this version, all of NTL is "wrapped" inside the namespace NTL,
# and are no longer directly accessible---you must either use
# explicit qualification, or using directives, or using declarations.
# However, note that all names that begin with "NTL_" are macros,
# and as such do not belong to any namespace.
# Additionally, instead of including the traditional headers
# <stdlib.h>, <math.h>, and <iostream.h>, the standard headers
# <cstdlib>, <cmath>, and <iostream> are included.
# These "wrap" some (but not all) names in namespace std.

# If your compiler is not yet up to date, but you want some
# of the benefits of Standard C++, you might try the "partial Standard C++"
# switches NTL_PSTD_NNS, NTL_PSTD_NHF, NTL_PSTD_NTN (see below).

########## GMP variables:

NTL_GMP_LIP=off

# Set to 'on' if you want to use GMP, the GNU Multi-Precision package,
# as the primary long integer package.
# This will typically yield significantly faster long integer arithmetic 
# compared to the traditional long integer package, and will yield somewhat
# faster long integer arithmetic compared the traditinal package
# supplemented by GMP (i.e., the NTL_GMP_HACK flag, see below).

# If you set this flag, please note the following.
# If you have installed GMP in a standard "system" location, this is
# all you have to do.  Otherwise, if GMP is built, but not installed
# in a standard place, you have to set the variable GMP_PREFIX.


GMP_PREFIX=undefined

# If GMP was installed in a standard system directory, e.g., /usr/local,
# then do not set this variable.
# Otherwise, if you want to use GMP and GMP was installed in
# a directory <gmp_prefix>, then set GMP_PREFIX=<gmp_prefix>.
# This works if the directory <gmp_prefix>/include contains gmp.h
# and <gmp_prefix>/lib contains libgmp.a.  
# For finer-grained control, set the variables GMP_INCDIR and GMP_LIBDIR 
# instead (see below).


########### Examples:

# If you are happy with all the default values:

   ./configure

# Actually, the initially installed makefile and config.h files
# already reflect the default values. 




# If your C/C++ compilers are called cc/CC:

   ./configure CC=cc CXX=CC



# If GMP is installed in a standard system directory, and you want to use it:

   ./configure NTL_GMP_LIP=on



# If GMP was installed in a non-standard directory, say,  $HOME/sw:

   ./configure NTL_GMP_LIP=on GMP_PREFIX=$HOME/sw 



# If you want to use the options -g and -O for compiling C and C++,
# just execute

   ./configure "CFLAGS=-g -O"

# Note the use of quotes to keep the argument in one piece.




# If you want to use GMP as well as traditional (non-ISO) mode:

   ./configure NTL_GMP_LIP=on NTL_STD_CXX=off



########### Here is a complete list of the remaining variables,
########### with their default values.  These variables are pretty 
########### esoteric, and you will probably never change their
########### default values.

AR=ar
ARFLAGS=ruv
RANLIB=ranlib
LDFLAGS=
LDFLAGS_CXX=$(LDFLAGS)
LDLIBS=-lm
LDLIBS_CXX=$(LDLIBS)
CPPFLAGS=

LIBDIR=$(PREFIX)/lib
INCLUDEDIR=$(PREFIX)/include
DOCDIR=$(PREFIX)/include

NTL_PSTD_NNS=off
NTL_PSTD_NHF=off
NTL_PSTD_NTN=off

NTL_LONG_LONG_TYPE=undefined
NTL_UNSIGNED_LONG_LONG_TYPE=undefined
NTL_CXX_ONLY=off
NTL_CLEAN_INT=off
NTL_CLEAN_PTR=off
NTL_RANGE_CHECK=off
NTL_X86_FIX=off
NTL_NO_X86_FIX=off
NTL_NO_INIT_TRANS=off

WIZARD=on
NTL_LONG_LONG=off
NTL_AVOID_FLOAT=off
NTL_SPMM_UL=off
NTL_SPMM_ULL=off
NTL_SPMM_ASM=off
NTL_TBL_REM=off
NTL_AVOID_BRANCHING=off
NTL_GF2X_NOINLINE=off
NTL_GF2X_ALTCODE=off
NTL_GF2X_ALTCODE1=off

NTL_GMP_HACK=off
GMP_INCDIR=undefined
GMP_LIBDIR=undefined



########### Here is a more detailed description of these variables.

########### Further compilation variables:


AR=ar

# command to make a library



ARFLAGS=ruv

# arguments for AR



RANLIB=ranlib

# set to echo if you want to disable it completely



LDFLAGS=

# arguments for linker for C++ programs



LDFLAGS_CXX=$(LDFLAGS)

# libraries for linking C programs



LDLIBS=-lm

# libraries for linking C++ programs



LDLIBS_CXX=$(LDLIBS)

# libraries for linking C++ programs



CPPFLAGS=

# arguments for the C preprocessor



########### Details of the compilation process:

# When a C file foo.c is compiled:
   $(CC) -I../include $(CPPFLAGS) $(CFLAGS) -c foo.c

# When a C file foo.c is compiled and linked:
   $(CC) -I../include $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o foo foo.c $(LDLIBS)

# When a C++ file foo.c is compiled:
   $(CXX) -I../include $(CPPFLAGS) $(CXXFLAGS) -c foo.c

# When a C++ file foo.c is compiled and linked:
   $(CXX) -I../include $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS_CXX) \ 
      -o foo foo.c $(LDLIBS_CXX)

# When the library ntl.a is built:
   $(AR) $(ARFLAGS) ntl.a [ object files ]...
   $(RANLIB) ntl.a
# If the ranlib command does not exist, everything will still function OK.


########### Further installation variables:

LIBDIR=$(PREFIX)/lib
INCLUDEDIR=$(PREFIX)/include
DOCDIR=$(PREFIX)/doc
# Where to install NTL.
# Execution of 'make install' copies header files into $(INCLUDEDIR)/NTL,
# copies the library itself to $(LIBDIR)/libntl.a, and copies the
# documentation files into $(DOCDIR)/NTL.


########## Partial ISO modes

NTL_PSTD_NNS=off 

# NTL namespace --  wraps NTL in a namespace



NTL_PSTD_NHF=off
 
# new header files -- use <cstdlib>, etc., instead of <stdlib.h>, etc.  



NTL_PSTD_NTN=off 

# nothrow new -- use the nothrow version of new.  

# Any combination of these PSTD swtiches may be set -- setting them all
# is equvalent to setting NTL_STD_CXX.  Make sure you also unset NTL_STD_CXX;
# otherwise, they have no effect.


########### Basic Configuration Options:

NTL_LONG_LONG_TYPE=undefined

# Name of double-word signed integer type.
# This is a non-standard type, and is called 'long long' by many
# compilers.  MS C++ calls it '__int64'.
#
# Note that the new C99 standard defines the type 'long long'
# to be at least 64-bits wide.  On 32-bit machines, this is just right.
# Although not officially part of the C++ standard (which predates C99),
# it is widely supported by C++ compilers, and is likely to be added
# to the C++ standard.
#
# Unfortunately, 64-bit machines usually define 'long long'
# to also be 64-bits wide, which is kind of useless.
# However, GCC provides a type __int128_t which does the job.
#
# If left undefined, NTL will use somee "ifdef magic" to find
# the type most suitable for your machine (based on compiler and
# word size).

NTL_UNSIGNED_LONG_LONG_TYPE=undefined

# Name of double-word unsigned integer type.
#
# If left undefined, NTL will use somee "ifdef magic" to find
# the type most suitable for your machine (based on compiler and
# word size).





NTL_CXX_ONLY=off

# It is possible to compile everything using C++ only.
# If you want to do this, CC and CXX should both be C++ compilers.
# You may also want to set NTL_CXX_ONLY=on, which eliminates some
# "C" linkage that is no longer necessary.
# However, it should still work without it.
# 
# This flag can be set independently of NTL_STD_CXX.
# All functions that may have "C" linkage are never wrapped in
# namespace NTL;  instead, their names always start with "_ntl_",
# and as such, they should not conflict with other global names.



NTL_CLEAN_INT=off

# Setting this to 'on' disables the use of some non-standard
# integer arithmetic which would yield slightly better performance.


NTL_CLEAN_PTR=off

# Setting this to 'on' disables the use of some non-standard
# pointer arithmetic which would yield slightly better performance.


NTL_RANGE_CHECK=off

# Setting this to 'on' will generate vector subscript range-check code.
# Useful for debugging, but it slows things down of course.



NTL_X86_FIX=off

# Set to 'on' to force the "x86 floating point fix", 
# overriding the default behavior.
# By default, NTL will apply the "fix" if it looks like it is
# necessary, and if it knows how to fix it.
# The problem addressed here is that x86 processors sometimes
# run in a mode where FP registers have more precision than doubles.
# This will cause code in quad_float.c some trouble.
# NTL can normally automatically detect the problem, and fix it,
# so you shouldn't need to worry about this or the next flag.



NTL_NO_X86_FIX=off

# Set to 'on' to forces no "x86 floating point fix", 
# overriding the default behavior.



NTL_NO_INIT_TRANS=off

# When 'off', NTL uses a special code sequence to avoid
# copying large objects in return statements.  However, if your
# compiler optimizes away the return of a *named* local object,
# this is not necessary, and setting this flag to 'on' will result
# in *slightly* more compact and efficient code.  The C++
# standard explicitly allows compilers to perform this optimization,
# and with time, more compilers actually do this.
# Traditionally, however, most will only avoid copying *temporary* 
# objects in return statements, and NTL's default code sequence 
# exploits this fact.



########## Performance Options:

WIZARD=on

# Set to 'off' if you want to bypass the wizard; otherwise, set to 'on'.
# The wizard is a script that runs when NTL is built that sets the following
# flags to 'optimize' performance on the current platform.



NTL_LONG_LONG=off

# For platforms that support it, this flag can be set to cause
# the long-integer multiplication code to use the type "long long",
# which on some platforms yields a significant performance gain,
# but on others, it can yield no improvement and can even
# slow things down.
# The variable NTL_LONG_LONG_TYPE can be defined to use a type name
# other than "long long".
# If you set NTL_LONG_LONG, you might also want to set
# the flag NTL_TBL_REM.



NTL_AVOID_FLOAT=off

# On machines with slow floating point or---more comminly---slow int/float
# conversions, this flag can lead to faster long-integer multiplication code.
# If you set NTL_AVOID_FLOAT, you should probably also
# set NTL_TBL_REM.
# Note that at most one of NTL_LONG_LONG and NTL_AVOID_FLOAT may be set.


NTL_SPMM_UL=off

# On machines with slow floating point or---more comminly---slow int/float
# conversions, this flag can lead to faster single-precision multiplication
# with preconditioning (see MulModPrecon in the ZZ module).
# This sounds esoteric, but it is actually important.


NTL_SPMM_ULL=off

# Similar to NTL_SPMM_UL, but relies on double-word unsigned multiplication.
# This is (usually) done using the type 'unsigned long long',
# but you can set the variable NTL_UNSIGNED_LONG_LONG_TYPE to
# override the default.


NTL_SPMM_ASM=off

# Similar to NTL_SPMM_ULL, but relies on double-word unsigned multiplication
# using assembly code.  Only supported on select machines 
# and only under GCC.




NTL_TBL_REM=off

# With this flag, some divisions are avoided in the
# ZZ_pX multiplication routines.  If you use the NTL_AVOID_FLOAT
# or NTL_LONG_LONG flags, then you should probably use this one too.




NTL_AVOID_BRANCHING=off

# With this option, branches are replaced at several
# key points with equivalent code using shifts and masks.
# Recommended for use with RISC architectures, especially
# ones with deep pipelines and high branch penalities.
# This flag is becoming less helpful as newer machines
# have much smaller branch penalties, but still may be worth a try.




NTL_GF2X_NOINLINE=off

# By default, the low-level GF2X multiplication routine in inlined.
# This can potentially lead to some trouble on some platforms,
# and you can override the default by setting this flag.




NTL_GF2X_ALTCODE=off

# With this option, the default strategy for implmenting low-level
# GF2X multiplication is replaced with an alternative strategy.
# This alternative strategy seems to work better on RISC machines
# with deep pipelines and high branch penalties (like a powerpc),
# but does no better (or even worse) on x86s.


NTL_GF2X_ALTCODE1=off

# Yet another alternative implementation for GF2X multiplication.



########## More GMP Options:


NTL_GMP_HACK=off

# Set to 'on' if you want to use GMP, the GNU Multi-Precision package,
# as a supplemental long integer package.
# This will typically yield significantly faster long integer arithmetic 
# compared  to the traditional long integer package, while still maintaining
# complete backward compataibility with code that uses the traditional
# long integer package.  However, this flag is mainly for
# enabling backward compatibility, and you are much better off
# using the NTL_GMP_LIP flag.  

# If you set this flag, you may have to set GMP_PREFIX as well. 




GMP_INCDIR=undefined

# Set to -I<directory containing gmp.h> if using GMP and GMP
# is not installed in a standard system directory.



GMP_LIBDIR=undefined
# Set to -L<directory containing libgmp.a> if using GMP and GMP
# is not installed in a standard system directory.

# You do not need to define GMP_INCDIR or GMP_LIBDIR, if either
#   - you are not compiling NTL with GMP,
#   - you are compiling NTL with GMP, and GMP has been installed in
#     a standard system ocataion (e.g., /usr/local), or
#   - you are compiling NTL with GMP, GMP has been installed in
#     <gmp_prefix>, and you set GMP_PREFIX=<gmp_prefix>.