1 | |
---|
2 | |
---|
3 | --- This INSTALL file corresponds to Factory version 1.3a --- |
---|
4 | |
---|
5 | |
---|
6 | INSTALL file for Factory |
---|
7 | ======================== |
---|
8 | |
---|
9 | NOTE: The copyright state of Factory is still unclear. Sooner or later it |
---|
10 | will be free software, but by now please do *not* distribute the sources. |
---|
11 | |
---|
12 | Overview Installation for the impatient |
---|
13 | ======== ============================== |
---|
14 | 1. Configuring Factory ./configure |
---|
15 | 2. Building Factory make all |
---|
16 | 3. Creating GF(q) tables make gftables |
---|
17 | 4. Installing Factory make install |
---|
18 | 5. Installing GF(q) tables make installgftables |
---|
19 | |
---|
20 | |
---|
21 | 1. Configuring Factory |
---|
22 | ====================== |
---|
23 | The configure shell script attempts to guess correct values for various |
---|
24 | system-dependent variables used during compilation. It uses those values |
---|
25 | to create a GNUmakefile and a config.h file containing system-dependent |
---|
26 | definitions. Finally, it creates a shell script config.status that you can |
---|
27 | run in the future to recreate the current configuration, a file |
---|
28 | config.cache that saves the results of its tests to speed up reconfiguring, |
---|
29 | and a file config.log containing compiler output (useful mainly for |
---|
30 | debugging configure). |
---|
31 | |
---|
32 | If you need to do unusual things to compile the package, please try to |
---|
33 | figure out how configure could check whether to do them, and mail diffs or |
---|
34 | instructions to the address given in the README file so they can be |
---|
35 | considered for the next release. If at some point config.cache contains |
---|
36 | results you don't want to keep, you may remove or edit it. |
---|
37 | |
---|
38 | The file configure.in is used to create configure by a program called |
---|
39 | autoconf. You only need configure.in if you want to change it or |
---|
40 | regenerate configure using a newer version of autoconf. |
---|
41 | |
---|
42 | Compiler options |
---|
43 | ---------------- |
---|
44 | Some systems require unusual options for compilation or linking that the |
---|
45 | configure script does not know about. You can give configure initial |
---|
46 | values for variables by setting them in the environment. Using a |
---|
47 | Bourne-compatible shell, you can do that on the command line like this: |
---|
48 | |
---|
49 | CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure |
---|
50 | |
---|
51 | Or on systems that have the env program, you can do it like this: |
---|
52 | |
---|
53 | env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure |
---|
54 | |
---|
55 | In contrast to the GNU-world, Factory is translated with 'CFLAGS=-O2 |
---|
56 | -fomit-frame-pointer' 'CXXFLAGS=-O2 -fomit-frame-pointer' by default. If |
---|
57 | you do not like this, configure with |
---|
58 | |
---|
59 | CFLAGS='-g -O' CXXFLAGS='-g -O' ./configure |
---|
60 | |
---|
61 | Specifying source and installation directories |
---|
62 | ---------------------------------------------- |
---|
63 | configure recognizes the '--srcdir=<srcdir>' option and looks in <srcdir> |
---|
64 | for the source files when building Factory. This is useful if you want to |
---|
65 | translate Factory with different configurations (see the corresponding |
---|
66 | section). |
---|
67 | |
---|
68 | By default, 'make install' will install the package's files in |
---|
69 | /usr/local/lib, /usr/local/include, etc. You can specify an installation |
---|
70 | prefix other than /usr/local by giving configure the option |
---|
71 | --prefix=<path>. |
---|
72 | You can specify seperate installation prefixes for architecture-specific |
---|
73 | files and architecture-independent files. If you give configure the option |
---|
74 | '--exec-prefix=<path>' the package will use <path> as the prefix for |
---|
75 | installing the libraries. The other data files will still use the regular |
---|
76 | prefix. |
---|
77 | |
---|
78 | Configuring and building Factory for different configurations |
---|
79 | ------------------------------------------------------------- |
---|
80 | The configure script that comes with Factory recognizes a number of |
---|
81 | additional options. Here is a list of them which you can get entering |
---|
82 | './configure --help': |
---|
83 | |
---|
84 | --with-memman(=<memman>) specify Factory memory manager. |
---|
85 | <memman> is either 'old' (default), 'new', or 'no'. |
---|
86 | --with-gmp(=<gmp_inc_path>(,<gmp_lib_path>)) |
---|
87 | specify where to find gmp library. |
---|
88 | --with-Singular build for use with computer algebra system Singular. |
---|
89 | --disable-streamio build Factory without stream IO |
---|
90 | --enable-memdebug=<level> switch on memory management debugging. Meaningful |
---|
91 | with --with-memman=new only. <level> may be either |
---|
92 | 'no' (default), 'normal', or 'full'. |
---|
93 | --enable-assertions build Factory with assertions activated |
---|
94 | --enable-timing build Factory so it will print timing information |
---|
95 | --enable-debugoutput build Factory so it will print debugging information |
---|
96 | --enable-gmp together with --with-Singular means: installation |
---|
97 | in process, be graceful when there is no gmp.h |
---|
98 | |
---|
99 | For more detailed information, see the README file. Note that not all |
---|
100 | possible combinations of the --with's and --enable's are meaningful. The |
---|
101 | dependencies between them are described in the README file, too. |
---|
102 | |
---|
103 | You can compile the package for more than one configuration at the same |
---|
104 | time. I recommend to build an optimized and a debug version. The debug |
---|
105 | version is much slower but includes many assertions that will show you a |
---|
106 | probable misuse or malfunction of the library. Here is the sequence of |
---|
107 | commands necessary to do that: |
---|
108 | |
---|
109 | # debug version |
---|
110 | cd factory-<version> |
---|
111 | mkdir DEBUGDIR |
---|
112 | cd DEBUGDIR |
---|
113 | CFLAGS=-g CXXFLAGS=-g ../configure \ |
---|
114 | --srcdir=.. --prefix=/usr/local/factory.dbg --enable-assertions |
---|
115 | make install |
---|
116 | make installgftables |
---|
117 | cd ../.. |
---|
118 | |
---|
119 | # optimized version |
---|
120 | cd factory-<version> |
---|
121 | mkdir OPTDIR |
---|
122 | cd OPTDIR |
---|
123 | ../configure --srcdir=.. --prefix=/usr/local/factory.opt |
---|
124 | make install |
---|
125 | # Better set a symbolic link from one $(gftabledir) to the other. They |
---|
126 | # GF(q) tables are the same for all configurations. |
---|
127 | make installgftables |
---|
128 | |
---|
129 | |
---|
130 | Configuring for Macintosh or other non-Unix platforms |
---|
131 | ----------------------------------------------------- |
---|
132 | Factory translates on Macintosh with the Metroworks CodeWarrior compile |
---|
133 | now. If you want to build Factory on this or other non-Unix platforms you |
---|
134 | either have to configure config.h and GNUmakefile by hand or you have to |
---|
135 | create a suitable config.cache file and run configure on a machine that |
---|
136 | supports it. |
---|
137 | |
---|
138 | |
---|
139 | 2. Building Factory |
---|
140 | =================== |
---|
141 | Targets/commands for building Factory: |
---|
142 | |
---|
143 | 'make all' |
---|
144 | ---------- |
---|
145 | Builds Factory. According to configuration, 'make all' builds only |
---|
146 | Factory ('make cf') or Factory and the Factory memory manager ('make cf; |
---|
147 | make mem'). |
---|
148 | |
---|
149 | 'make clean', 'make mostlyclean', 'make distclean' |
---|
150 | -------------------------------------------------- |
---|
151 | Deletes all files from the current directory that have been created by |
---|
152 | building Factory. In addition, 'make mostlyclean' deletes the GF(q) tables |
---|
153 | if they have been created by 'make gftables'. 'make distclean' is like |
---|
154 | 'make mostlyclean', but also deletes all files from the current directoy |
---|
155 | that have been created by configuring. If you have unpacked the source and |
---|
156 | built the program without creating any other files, 'make distclean' leaves |
---|
157 | only the files that were in the distribution. |
---|
158 | |
---|
159 | 'make TAGS' |
---|
160 | ----------- |
---|
161 | Updates a tags table for Factory. |
---|
162 | |
---|
163 | 'make depend' |
---|
164 | ------------- |
---|
165 | Creates dependencies. Once created, they will be automatically updated as |
---|
166 | source files change. Intended to be used by developers. |
---|
167 | |
---|
168 | 'make ftmpl_inst.o' |
---|
169 | ------------------- |
---|
170 | Creates the Factory template instantiation. Necessary when linking |
---|
171 | Factory with your application. |
---|
172 | |
---|
173 | |
---|
174 | 3. Creating GF(q) tables |
---|
175 | ======================== |
---|
176 | |
---|
177 | NOTE: Since the format of the GF(q) tables changed from Factory Version |
---|
178 | 1.2b to Factory Version 1.3a you should get/create them by new! |
---|
179 | |
---|
180 | There are two possibilities to get the tables: |
---|
181 | a) Get them from the net where you got Factory from. Unpack the archive |
---|
182 | factory-gftables.tgz in the source directory (factory-<version>.tgz). |
---|
183 | b) Create them using Factory itself. Since this process does not require |
---|
184 | arithmetics in GF(q) there are not any bootstrapping problems. There |
---|
185 | are two targets which accomplish this, the second depending from the |
---|
186 | first: |
---|
187 | |
---|
188 | 'make gengftables' |
---|
189 | ------------------ |
---|
190 | Creates the executable gengftables necessary to build the tables. |
---|
191 | |
---|
192 | 'make gftables' |
---|
193 | --------------- |
---|
194 | Creates a directory gftables/ and executes gengftables. This is a |
---|
195 | rather time consuming process, so you may want to start it in the |
---|
196 | background or as 'nohup' ('nohup make gftables &'). |
---|
197 | |
---|
198 | |
---|
199 | 4. Installing Factory |
---|
200 | ===================== |
---|
201 | Targets/commands for installing Factory: |
---|
202 | |
---|
203 | 'make install' |
---|
204 | -------------- |
---|
205 | Builds and installs Factory. This target also creates the directories |
---|
206 | in which Factory will be installed if they do not already exist. |
---|
207 | The files are installed in the following directories: |
---|
208 | |
---|
209 | File Symb.Name (Default) phys. location |
---|
210 | ------------------------------------------------------------------------ |
---|
211 | libcf.a $(libdir) = /usr/local/lib |
---|
212 | (Factory itself) |
---|
213 | libcfmem.a $(libdir) = /usr/local/lib |
---|
214 | (Factory memory manager) |
---|
215 | |
---|
216 | factory.h $(includedir) = /usr/local/include |
---|
217 | (Factory user interface header file) |
---|
218 | factoryconf.h $(includedir) = /usr/local/include |
---|
219 | (Factory template configuration header) |
---|
220 | |
---|
221 | templates/* $(templatedir) = /usr/local/include/templates |
---|
222 | (Factory templates) |
---|
223 | ftmpl_inst.cc $(templatedir) = /usr/local/include/templates |
---|
224 | (Factory template instantiation) |
---|
225 | |
---|
226 | gftables/* $(gftabledir) = /usr/local/share/factory/gftables |
---|
227 | (Factory GF(q) tables, installed by 'make installgftables') |
---|
228 | |
---|
229 | 'make uninstall' |
---|
230 | ---------------- |
---|
231 | Deletes all the installed files that the install target created. Also |
---|
232 | attempts to delete the directories created by the installation process. |
---|
233 | |
---|
234 | |
---|
235 | 5. Installing GF(q) tables |
---|
236 | ========================== |
---|
237 | 'make installgftables' |
---|
238 | ---------------------- |
---|
239 | Installs the GF(q) tables in $(gftabledir). |
---|
240 | |
---|
241 | 'make unistallgftables' |
---|
242 | ----------------------- |
---|
243 | Uninstalls the GF(q) tables and attempts to delete the directories created |
---|
244 | by the installation process. |
---|