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