1 | |
---|
2 | usage: ./configure [ variable=value ]... |
---|
3 | |
---|
4 | This configure script generates the file 'makefile' and the file |
---|
5 | '../include/NTL/config.h', based upon the values assigned to the |
---|
6 | variables on the command line. |
---|
7 | |
---|
8 | Note that all of these configuration options can also be set |
---|
9 | by editing these two (well documented) files by hand. |
---|
10 | |
---|
11 | This command is intended only to provide a slightly more convenient |
---|
12 | and (perhaps more importantly) non-interactive way to do this. |
---|
13 | This script does not perform any 'magic', like finding out what |
---|
14 | the local C compiler is called, etc. If the defaults are not |
---|
15 | correct for your platform, you have to set an appropriate variable. |
---|
16 | |
---|
17 | |
---|
18 | ########### Here are the most important variables, and their default values. |
---|
19 | |
---|
20 | CC=gcc # The C compiler |
---|
21 | CXX=g++ # The C++ compiler |
---|
22 | CFLAGS=-O2 # C complilation flags |
---|
23 | CXXFLAGS=$(CFLAGS) # C++ compilation flags (by default, same as CFLAGS) |
---|
24 | |
---|
25 | PREFIX=/usr/local # Directory in which to install NTL library components |
---|
26 | |
---|
27 | NTL_STD_CXX=off # ISO Mode switch |
---|
28 | |
---|
29 | NTL_GMP_LIP=off # Switch to enable the use of GMP as primary |
---|
30 | # long integer package |
---|
31 | |
---|
32 | NTL_GMP_HACK=off # Switch to enable the use of GMP as supplemental |
---|
33 | # long integer package |
---|
34 | |
---|
35 | GMP_PREFIX=none # Directory in which GMP components have been installed |
---|
36 | |
---|
37 | |
---|
38 | ########## Here are more detailed description of these variables. |
---|
39 | |
---|
40 | ########## Basic compilation variables: |
---|
41 | |
---|
42 | CC=gcc |
---|
43 | # A C or C++ compiler, e. g., gcc, cc, xlc. |
---|
44 | # There are a few components written in C which may be compiled |
---|
45 | # under C++, but C compilers tend to generate slightly better code. |
---|
46 | # The C++ and C compilers (if different) must generate |
---|
47 | # compatible code. |
---|
48 | |
---|
49 | |
---|
50 | CXX=g++ |
---|
51 | # A C++ compiler, e.g., g++, CC, xlC |
---|
52 | |
---|
53 | |
---|
54 | CFLAGS=-O2 |
---|
55 | # Flags for the C compiler |
---|
56 | # Some useful flags: |
---|
57 | # -O2 -- recommended level of optimization |
---|
58 | # -g -- debugging |
---|
59 | # -mv8 -- needed with gcc/g++ to get the full instruction set |
---|
60 | # of a SparcStation |
---|
61 | # -qarch=ppc -- needed with xlc/C to get the full instruction set |
---|
62 | # of a PowerPC |
---|
63 | |
---|
64 | |
---|
65 | |
---|
66 | CXXFLAGS=$(CFLAGS) |
---|
67 | # Flags for the C++ compiler (usually the same as CFLAGS) |
---|
68 | # Some useful flags: |
---|
69 | # -+ -- needed with xlC to make it treat .c files as C++ files |
---|
70 | |
---|
71 | ########## Installation path: |
---|
72 | |
---|
73 | PREFIX=/usr/local |
---|
74 | # Set this to the directory in which you want NTL components to be |
---|
75 | # installed. When 'make install' is executed, the header |
---|
76 | # files are copied into $(PREFIX)/include/NTL, the library itself is |
---|
77 | # copied to $(PREFIX)/lib/libntl.a, and the documentation files |
---|
78 | # are copied into $(PREFIX)/doc/NTL. |
---|
79 | # Unless you have root permissions when running 'make install', |
---|
80 | # you will have to override the default PREFIX value with the |
---|
81 | # name of your own local directory. |
---|
82 | # If you want finer-grained control over where the different |
---|
83 | # library components are installed, set the variables |
---|
84 | # INCLUDEDIR, LIBDIR, and DOCDIR (see below). |
---|
85 | |
---|
86 | ########## ISO mode switch: |
---|
87 | |
---|
88 | NTL_STD_CXX=off |
---|
89 | # Set to 'on' if you want to use the "Standard C++" version of NTL. |
---|
90 | # In this version, all of NTL is "wrapped" inside the namespace NTL, |
---|
91 | # and are no longer directly accessible---you must either use |
---|
92 | # explicit qualification, or using directives, or using declarations. |
---|
93 | # However, note that all names that begin with "NTL_" are macros, |
---|
94 | # and as such do not belong to any namespace. |
---|
95 | # Additionally, instead of including the standard headers |
---|
96 | # <stdlib.h>, <math.h>, and <iostream.h>, the standard headers |
---|
97 | # <cstdlib>, <cmath>, and <iostream> are included. |
---|
98 | # These "wrap" some (but not all) names in namespace std. |
---|
99 | |
---|
100 | # If your compiler is not yet up to date, but you want some |
---|
101 | # of the benefits of Standard C++, you might try the "partial Standard C++" |
---|
102 | # switches NTL_PSTD_NNS, NTL_PSTD_NHF, NTL_PSTD_NTN (see below). |
---|
103 | |
---|
104 | ########## GMP variables: |
---|
105 | |
---|
106 | NTL_GMP_LIP=off |
---|
107 | # Set to 'on' if you want to use GMP, the GNU Multi-Precision package, |
---|
108 | # as the primary long integer package. |
---|
109 | # This will typically yield significantly faster long integer arithmetic |
---|
110 | # compared to the traditional long integer package, and will yield somewhat |
---|
111 | # faster long integer arithmetic compared the traditinal package |
---|
112 | # supplemented by GMP (i.e., the NTL_GMP_HACK flag). |
---|
113 | |
---|
114 | NTL_GMP_HACK=off |
---|
115 | # Set to 'on' if you want to use GMP, the GNU Multi-Precision package, |
---|
116 | # as a supplemental long integer package. |
---|
117 | # This will typically yield significantly faster long integer arithmetic |
---|
118 | # compared to the traditional long integer package, while still maintaining |
---|
119 | # complete backward compataibility with code that uses the traditional |
---|
120 | # long integer package. |
---|
121 | |
---|
122 | # If you set either of the above two flags, note the following. |
---|
123 | # If you have installed GMP in a standard location, this is |
---|
124 | # all you have to do. Otherwise, if GMP is built, but not installed |
---|
125 | # in a standard place, you have to set either the variable GMP_PREFIX, |
---|
126 | # or alternatively, the the variables GMP_INC and GMP_LIB as well (see below). |
---|
127 | |
---|
128 | GMP_PREFIX=none |
---|
129 | # If GMP was installed in a standard system directory, e.g., /usr/local, |
---|
130 | # then do not set this variable. |
---|
131 | # Otherwise, if you want to use GMP and GMP was installed in |
---|
132 | # a directory <gmp_prefix>, then set GMP_PREFIX=<gmp_prefix>. |
---|
133 | # This works if the directory <gmp_prefix>/include contains gmp.h |
---|
134 | # and <gmp_prefix>/lib contains libgmp.a; otherwise, do not set |
---|
135 | # this variable, and set the variables GMP_INC and GMP_LIB below. |
---|
136 | |
---|
137 | |
---|
138 | ########### Examples: |
---|
139 | |
---|
140 | # If you are happy with all the default values: |
---|
141 | ./configure |
---|
142 | # Actually, the initially installed makefile and config.h files |
---|
143 | # already reflect the default values. |
---|
144 | |
---|
145 | # If your C/C++ compilers are called cc/CC: |
---|
146 | ./configure CC=cc CXX=CC |
---|
147 | |
---|
148 | # If GMP is installed in a standard system directory, and you want to use it: |
---|
149 | ./configure NTL_GMP_LIP=on |
---|
150 | |
---|
151 | # If GMP was installed in a non-standard directory foo: |
---|
152 | ./configure NTL_GMP_LIP=on GMP_PREFIX=foo |
---|
153 | |
---|
154 | # If you want to use the options -g and -O for compiling C and C++, |
---|
155 | # just execute |
---|
156 | ./configure "CFLAGS=-g -O" |
---|
157 | # Note the use of quotes to keep the argument in one piece. |
---|
158 | |
---|
159 | # If you want to use GMP as well as ISO mode: |
---|
160 | ./configure NTL_GMP_LIP=on NTL_STD_CXX=on |
---|
161 | |
---|
162 | |
---|
163 | |
---|
164 | ########### Here is a complete list of the remaining variables, |
---|
165 | ########### with their default values. These variables are pretty |
---|
166 | ########### esoteric, and you will probably never change their |
---|
167 | ########### default values. |
---|
168 | |
---|
169 | AR=ar |
---|
170 | ARFLAGS=ruv |
---|
171 | RANLIB=ranlib |
---|
172 | LDFLAGS= |
---|
173 | LDFLAGS_CXX=$(LDFLAGS) |
---|
174 | LDLIBS=-lm |
---|
175 | LDLIBS_CXX=$(LDLIBS) |
---|
176 | CPPFLAGS= |
---|
177 | |
---|
178 | LIBDIR=$(PREFIX)/lib |
---|
179 | INCLUDEDIR=$(PREFIX)/include |
---|
180 | DOCDIR=$(PREFIX)/include |
---|
181 | |
---|
182 | NTL_PSTD_NNS=off |
---|
183 | NTL_PSTD_NHF=off |
---|
184 | NTL_PSTD_NTN=off |
---|
185 | |
---|
186 | NTL_LONG_LONG_TYPE=long long |
---|
187 | NTL_CXX_ONLY=off |
---|
188 | NTL_RANGE_CHECK=off |
---|
189 | NTL_X86_FIX=off |
---|
190 | NTL_NO_X86_FIX=off |
---|
191 | NTL_NO_INIT_TRANS=off |
---|
192 | |
---|
193 | WIZARD=on |
---|
194 | NTL_LONG_LONG=off |
---|
195 | NTL_AVOID_FLOAT=off |
---|
196 | NTL_TBL_REM=off |
---|
197 | NTL_AVOID_BRANCHING=off |
---|
198 | NTL_FFT_PIPELINE=off |
---|
199 | |
---|
200 | |
---|
201 | ########### Here is a more detailed description of these variables. |
---|
202 | |
---|
203 | ########### Further compilation variables: |
---|
204 | |
---|
205 | |
---|
206 | AR=ar |
---|
207 | # command to make a library |
---|
208 | |
---|
209 | ARFLAGS=ruv |
---|
210 | # arguments for AR |
---|
211 | |
---|
212 | RANLIB=ranlib |
---|
213 | # set to echo if you want to disable it completely |
---|
214 | |
---|
215 | LDFLAGS= |
---|
216 | # arguments for linker for C++ programs |
---|
217 | |
---|
218 | LDFLAGS_CXX=$(LDFLAGS) |
---|
219 | # libraries for linking C programs |
---|
220 | |
---|
221 | LDLIBS=-lm |
---|
222 | # libraries for linking C++ programs |
---|
223 | |
---|
224 | LDLIBS_CXX=$(LDLIBS) |
---|
225 | # libraries for linking C++ programs |
---|
226 | |
---|
227 | CPPFLAGS= |
---|
228 | # arguments for the C preprocessor |
---|
229 | |
---|
230 | |
---|
231 | ########### Details of the compilation process: |
---|
232 | |
---|
233 | # When a C file foo.c is compiled: |
---|
234 | $(CC) -I../include $(CPPFLAGS) $(CFLAGS) -c foo.c |
---|
235 | |
---|
236 | # When a C file foo.c is compiled and linked: |
---|
237 | $(CC) -I../include $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o foo foo.c $(LDLIBS) |
---|
238 | |
---|
239 | # When a C++ file foo.c is compiled: |
---|
240 | $(CXX) -I../include $(CPPFLAGS) $(CXXFLAGS) -c foo.c |
---|
241 | |
---|
242 | # When a C++ file foo.c is compiled and linked: |
---|
243 | $(CXX) -I../include $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS_CXX) \ |
---|
244 | -o foo foo.c $(LDLIBS_CXX) |
---|
245 | |
---|
246 | # When the library ntl.a is built: |
---|
247 | $(AR) $(ARFLAGS) ntl.a [ object files ]... |
---|
248 | $(RANLIB) ntl.a |
---|
249 | # If the ranlib command does not exist, everything will still function OK. |
---|
250 | |
---|
251 | |
---|
252 | ########### Further installation variables: |
---|
253 | |
---|
254 | LIBDIR=$(PREFIX)/lib |
---|
255 | INCLUDEDIR=$(PREFIX)/include |
---|
256 | DOCDIR=$(PREFIX)/doc |
---|
257 | # Where to install NTL. |
---|
258 | # Execution of 'make install' copies header files into $(INCLUDEDIR)/NTL, |
---|
259 | # copies the library itself to $(LIBDIR)/libntl.a, and copies the |
---|
260 | # documentation files into $(DOCDIR)/NTL. |
---|
261 | |
---|
262 | |
---|
263 | ########## Partial ISO modes |
---|
264 | |
---|
265 | NTL_PSTD_NNS=off |
---|
266 | # NTL namespace -- wraps NTL in a namespace |
---|
267 | |
---|
268 | NTL_PSTD_NHF=off |
---|
269 | # new header files -- use <cstdlib>, etc., instead of <stdlib.h>, etc. |
---|
270 | |
---|
271 | NTL_PSTD_NTN=off |
---|
272 | # nothrow new -- use the nothrow version of new. |
---|
273 | |
---|
274 | # Any combination of these PSTD swtiches may be set -- setting them all |
---|
275 | # is equvalent to setting NTL_STD_CXX. |
---|
276 | |
---|
277 | |
---|
278 | ########### Basic Configuration Options: |
---|
279 | |
---|
280 | NTL_LONG_LONG_TYPE=long long |
---|
281 | # Name of double-word signed integer type. |
---|
282 | # This is a non-standard type, and is called 'long long' by many |
---|
283 | # compilers. MS C++ calls it '__int64'. |
---|
284 | |
---|
285 | |
---|
286 | NTL_CXX_ONLY=off |
---|
287 | # It is possible to compile everything using C++ only. |
---|
288 | # If you want to do this, CC and CXX should both be C++ compilers. |
---|
289 | # You may also want to set NTL_CXX_ONLY=on, which eliminates some |
---|
290 | # "C" linkage that is no longer necessary. |
---|
291 | # However, it should still work without it. |
---|
292 | # |
---|
293 | # This flag can be set independently of NTL_STD_CXX. |
---|
294 | # All functions that may have "C" linkage are never wrapped in |
---|
295 | # namespace NTL; instead, their names always start with "_ntl_", |
---|
296 | # and as such, they should not conflict with other global names. |
---|
297 | |
---|
298 | NTL_RANGE_CHECK=off |
---|
299 | # Setting this to 'on' will generate vector subscript range-check code. |
---|
300 | # Useful for debugging, but it slows things down of course. |
---|
301 | |
---|
302 | |
---|
303 | NTL_X86_FIX=off |
---|
304 | # Set to 'on' to force the "x86 floating point fix", |
---|
305 | # overriding the default behavior. |
---|
306 | # By default, NTL will apply the "fix" if it looks like it is |
---|
307 | # necessary, and if knows how to fix it. |
---|
308 | # The problem addressed here is that x86 processors sometimes |
---|
309 | # run in a mode where FP registers have more precision than doubles. |
---|
310 | # This will cause code in quad_float.c some trouble. |
---|
311 | # NTL can normally correctly detect the problem, and fix it, |
---|
312 | # so you shouldn't need to worry about this or the next flag. |
---|
313 | |
---|
314 | NTL_NO_X86_FIX=off |
---|
315 | # Set to 'on' to forces no "x86 floating point fix", |
---|
316 | # overriding the default behavior. |
---|
317 | |
---|
318 | |
---|
319 | NTL_NO_INIT_TRANS=off |
---|
320 | # When 'off', NTL uses a special code sequence to avoid |
---|
321 | # copying large objects in return statements. However, if your |
---|
322 | # compiler optimizes away the return of a *named* local object, |
---|
323 | # this is not necessary, and setting this flag to 'on' will result |
---|
324 | # in *slightly* more compact and efficient code. Although |
---|
325 | # the emeriging C++ standard allows compilers to perform |
---|
326 | # this optimization, I know of none that currently do. |
---|
327 | # Most will avoid copying *temporary* objects in return statements, |
---|
328 | # and NTL's default code sequence exploits this fact. |
---|
329 | |
---|
330 | |
---|
331 | |
---|
332 | ########## Performance Options: |
---|
333 | |
---|
334 | WIZARD=on |
---|
335 | # Set to 'off' if you want to bypass the wizard; otherwise, set to 'on'. |
---|
336 | # The wizard is a script that runs when NTL is built that sets the following |
---|
337 | # flags to 'optimize' performance on the current platform. |
---|
338 | |
---|
339 | NTL_LONG_LONG=off |
---|
340 | # For platforms that support it, this flag can be set to cause |
---|
341 | # the low-level multiplication code to use the type "long long", |
---|
342 | # which on some platforms yields a significant performance gain, |
---|
343 | # but on others, it can yield no improvement and can even |
---|
344 | # slow things down. |
---|
345 | # The variable NTL_LONG_LONG_TYPE can be defined to use a type name |
---|
346 | # other than "long long". |
---|
347 | # If you set NTL_LONG_LONG, you might also want to set |
---|
348 | # the flag NTL_TBL_REM. |
---|
349 | |
---|
350 | NTL_AVOID_FLOAT=off |
---|
351 | # On machines with slow floating point or---more comminly---slow int/float |
---|
352 | # conversions, this flag can lead to faster code. |
---|
353 | # If you set NTL_AVOID_FLOAT, you should probably also |
---|
354 | # set NTL_TBL_REM. |
---|
355 | # Note that at most one of NTL_LONG_LONG and NTL_AVOID_FLOAT may be set. |
---|
356 | |
---|
357 | NTL_TBL_REM=off |
---|
358 | # With this flag, some divisions are avoided in the |
---|
359 | # ZZ_pX multiplication routines. If you use the NTL_AVOID_FLOAT |
---|
360 | # or NTL_LONG_LONG flags, then you should probably use this one too. |
---|
361 | |
---|
362 | NTL_AVOID_BRANCHING=off |
---|
363 | # With this option, branches are replaced at several |
---|
364 | # key points with equivalent code using shifts and masks. |
---|
365 | # Recommended for use with RISC architectures, especially |
---|
366 | # ones with deep pipelines and high branch penalities. |
---|
367 | # This flag is becoming less helpful as newer machines |
---|
368 | # have much smaller branch penalties, but still may be worth a try. |
---|
369 | |
---|
370 | |
---|
371 | NTL_FFT_PIPELINE=off |
---|
372 | # If using NTL_AVOID_BRANCHING, you might want to try this as well. |
---|
373 | #This causes the FFT routine to use a software pipeline. |
---|
374 | |
---|