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
|
INSTALLATION PROCEDURE
----------------------
See file README for a list of currently available ports:
The file PROBLEMS contains a list of known problems/limitations depending on
the architecure. Please consult it before reporting a problem.
Installing the source distribution
**********************************
1) Introduction
---------------
** Win32 preamble **
To compile GNU-Prolog under win32 see file src/WINDOWS.
The following tools are required to compile and install the source package:
gcc, as, ranlib (if needed), sh, mkdir, cp, rm, sed, test,...
The installation process is as follows:
cd src go to source directory
./configure [OPTIONS] configure the system
make compile locally the package
make install or (make install-strip) install the package
you can check the result of the local compilation using:
make check
2) Installation directories
---------------------------
Directories used for the installation are as follows:
INSTALL_DIR the root directory for the core package, contains:
INSTALL_DIR/bin all binaries (compiler, top-level,...)
INSTALL_DIR/lib all libraries and objects
INSTALL_DIR/include header files needed to write foreign C code
These other directories are optional:
LINKS_DIR the directory for links to binaries of INSTALL_DIR/bin
DOC_DIR the directory for the documentation (LaTeX, DVI, PostScript,...)
HTML_DIR the directory for the HTML documentation
EXAMPLES_DIR the directory for the examples, contains:
EXAMPLES_DIR/ExamplsPl some classical Prolog examples
EXAMPLES_DIR/ExamplesFD some examples using FD constraint solving
Default directory values and associated configuration options are as follows:
The value of INSTALL_DIR is as follows:
- PREFIX/gprolog-VERSION_NUMBER (this is the default)
the default value of PREFIX is /usr/local but can be explicitely
specified using --prefix=PREFIX
- another location can be specified using --with-install-dir=INSTALL_DIR
- the source distribution directory (i.e. where reside this INSTALL file)
This in-place installation can be specified using --prefix=in-place or
--with-install-dir=in-place
The value of LINKS_DIR is as follows:
- EPREFIX/bin. The value of EPREFIX is the same as PREFIX but can be
explicitely specified using --exec-prefix=EPREFIX
- another location can be specified --with-links-dir=LINKS_DIR
- To prevent the installation of the links use --without-links-dir
(this is the default when doing an in-place installation).
The default value of DOC_DIR is INSTALL_DIR/doc
another location can be specified using --with-doc-dir=DOC_DIR
To prevent the installation of documentation --without-doc-dir
(this is the default when doing an in-place installation).
The default value of HTML_DIR is DOC_DIR/Html
another location can be specified using --with-html-dir=HTML_DIR
To prevent the installation of the HTML documentation --without-html-dir
(this is the default when doing an in-place installation).
The default value of EXAMPLES_DIR is INSTALL_DIR
another location can be specified using --with-examples-dir=EXAMPLES_DIR
To prevent the installation of the examples --without-examples-dir
(this is the default when doing an in-place installation).
The configure command displays the value of INSTALL_DIR, LINKS_DIR, DOC_DIR,
HTML_DIR and EXAMPLES_DIR.
To summarize, by default the whole package (+ documentation + HTML +
examples) is installed in /usr/local/gprolog-xxx and linked files are installed
in /usr/local/bin.
3) Configuration
----------------
GNU Prolog uses autoconf. To configure the package:
./configure [OPTIONS]
This script attempts to guess correct values for various system-dependent
variables used during compilation. For more detail about autoconf refer to
src/AUTOCONF-INFO (try also './configure --help'). The GNU-Prolog specific
options are:
Options to control the installation directory:
--with-install-dir=INSTALL_DIR specify INSTALL_DIR
--prefix=PREFIX specify PREFIX (INSTALL_DIR=PREFIX/gprolog-xxx)
--prefix=in-place specify an in-place installation
Default: --prefix=/usr/local
Options to control the location of links to binaries:
--with-links-dir=LINKS_DIR specify LINKS_DIR
--without-links-dir do not create link to binaries
--exec-prefix=EPREFIX specify EPREFIX (LINKS_DIR=EPREFIX/bin)
Default: --exec-prefix=PREFIX
(links are not installed for an in-place installation).
Options to control the location of other components:
--with-doc-dir=DOC_DIR specify DOC_DIR
--without-doc-dir do not install the documentation
--with-html-dir=HTML_DIR specify HTML_DIR
--without-thml-dir do not install the HTML documentation
--with-examples-dir=EXAMPLES_DIR specify EXAMPLESS_DIR
--without-examples-dir do not install the examples
Defaults: INSTALL_DIR/doc for DOC_DIR, DOC_DIR/Html for HTML_DIR
INSTALL_DIR for EXAMPLES_DIR
(these components are not installed for an in-place installation).
Options to control C compiler optimization flags:
--with-msvc use MSVC++ compiler under Win32 (else use gcc)
--without-c-flags do not use any optimization flag
--with-c-flags use default C optimization flags
--with-c-flags=CFLAGS use CFLAGS (instead of default optimization flags)
--with-c-flags=debug use C debug flags (e.g. '-g -Wall' for gcc)
Default: --with-c-flags
Options to control GNU features to include/exclude:
--disable-regs do not use machine registers to optimize speed
--enable-ebp use the ebp register on ix86 machines
--disable-fast-call do not use fast call mechanism for ix86 processors
--disable-linedit do not include line editor facility
--disable-piped-consult do not pipe stdin of pl2wam when consult/1
--disable-sockets do not include sockets facility
--disable-fd-solver do not include the finite domain constraint solver
--disable-gui-console do not use a GUI console (only with MSVC++ or MinGW)
Default: all features are included.
Some examples of using configure:
To configure the package for an installation in the default directory
/usr/local and links to binaries in /usr/local/bin:
./configure
To configure the package for an installation in the home directory with
linked files in ~/bin/i586 use
./configure --prefix=$HOME --with-links-dir=$HOME/bin/i586
To configure the package for an in-place installation:
./configure --prefix=in-place
4) Compiling the package locally
--------------------------------
To locally compile the package:
make
5) Installing the package
-------------------------
To install the package according to options given to ./configure (see 2):
make install
You can either install stripped versions of the binaries (whose size is then
reduced):
make install-strip
It is possible to re-run './configure' to change the value of some
installation directories (see 2) after the local compilation (i.e. the
compilation will not be done again).
6) Cleaning
-----------
To remove installed files (remove the content of INSTALL_DIR):
make uninstall
To clean up the local compilation (does not erase configuration files):
make clean
To fully clean up the local compilation:
make distclean
Setting up environment variables
********************************
To be able to execute GNU Prolog from anywhere the directory LINKS_DIR should
be a part of your PATH environment variable (generally this directory is
already in the PATH variable). However, if no links have been creeated
(either --without-links-dir has been specified or in case of default in-place
installation) you should add the directory INSTALL_DIR/bin to your PATH
variable. This can be done as follows (let us suppose INSTALL_DIR is
/usr/local/gprolog-xxx):
under sh/bash: PATH=$PATH:/usr/local/gprolog-xxx/bin; export PATH
under csh/tcsh: setenv PATH ${PATH}:/usr/local/gprolog-xxx/bin
GNU Prolog needs to know the value of INSTALL_DIR (to locate its
libraries). To do this, it uses its own path at execution-time, expanding
symbolic links. So you should not move or copy the executables, but you can
create links to them (as done by the installation procedure in LINKS_DIR).
However, to prevent this case, GNU Prolog first consults the value of the
PL_PATH environment variable. If it is defined GNU Prolog uses this path. If
you want to define it, simply set it to the value of INSTALL_DIR as follows:
under sh/bash: PL_PATH=/usr/local/gprolog-xxx; export PL_PATH
under csh/tcsh: setenv PL_PATH /usr/local/gprolog-xxx
To summarize, by default you can avoid to define PATH and PL_PATH. If you
need to defines these variables it is a good idea to put them in your shell
start-up file ($HOME/.bashrc / .cshrc / .tcshrc depending on the used shell).
Problems
********
See file PROBLEMS for more information on architecture-dependent known
problems.
If your installation does not work (compilation is ok but when running the
system fails) you can try to recompile the whole system with --disable-regs
(after make distclean).
Finally you can use the GNU Prolog mailing lists to ask for help or to report
a bug/problem.
|