File: INSTALL

package info (click to toggle)
gprolog 1.1.0-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 7,996 kB
  • ctags: 5,690
  • sloc: ansic: 43,119; perl: 15,971; sh: 1,852; makefile: 770
file content (223 lines) | stat: -rw-r--r-- 7,273 bytes parent folder | download
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
			INSTALLATION PROCEDURE
			----------------------



This system is currently available for the following architectures:

   - GNU/Linux / ix86
   - SunOS 4.1.3 / sparc
   - Solaris 2 / sparc



Installing the source distribution
**********************************

1) Introduction
---------------

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

The whole package will be installed in the directory INSTALL_DIR which is
either:

   - PREFIX/gprolog-VERSION_NUMBER (this is the default)
	the default value of PREFIX is /usr/local but can be explicitely
        specified using the --prefix=PREFIX option

   - the source distribution directory (i.e. where reside this INSTALL file)
	this in-place installation can be specified using --prefix==in-place

The following sub-directories will be created under INSTALL_DIR:

   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
   INSTALL_DIR/doc        the documentation
   INSTALL_DIR/ExamplesPl some classical Prolog examples
   INSTALL_DIR/ExamplesFD some examples using FD constraint solving

The installation procedure can also create link to binaries of
INSTALL_DIR/bin. Those links will reside in the directory LINKS_DIR. The
default value for LINKS_DIR is EPREFIX/bin. The value of EPREFIX is the same
as PREFIX but can be explicitely specified using the --exec-prefix=EPREFIX
option. It is also possible to specify the full value of LINKS_DIR using
--with-links=LINKS_DIR option. Finally it is possible to prevent the
installation procedure from creating those links using the --without-links
option. This is the default when doing an in-place installation (see above).

The configure command displays the value of INSTALL_DIR and LINKS_DIR.

To summarize, by default the package is installed in /usr/local/gprolog-xxx
and linked files are installed in /usr/local/bin.


2) 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 (try also './configure --help'). The GNU-Prolog specific options
are:

Options to control the installation directory:

   --prefix=PREFIX         configure for installation in PREFIX/gprolog-xxx
   --prefix=in-place       configure for installation in-place

   Default: --prefix=/usr/local

Options to control the links to binaries directory:

   --without-links         do not create link to binaries
   --with-links=LINKS_DIR  create links in LINKS_DIR
   --with-links            create links in EPREFIX/bin
   --exec-prefix=EPREFIX   set install prefix directory for the links

   Default: for an in-place installation: --without-links
            else: --with-links --exec-prefix=PREFIX

Options to control optimization C compiler flags:

   --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 '-g -Wall'

   Default: --with-c-flags

Options to control GNU feature to use/include:

   --disable-regs          do not use machine registers to optimize speed
   --disable-linedit       do not include line editor facility
   --disable-sockets       do not include sockets facility
   --disable-fd-solver     do not include the finite domain constraint solver

   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/i386 use

   % ./configure --prefix=$HOME --with-links=$HOME/bin/i386

To configure the package for an in-place installation:

   % ./configure --prefix=in-place


3) Compiling the package locally
--------------------------------

To locally compile the package:

   % make


4) 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).


5) 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


6) Rebuilding a source distribution
-----------------------------------

To rebuild a source distribution file:

   % make dist

this will create a file gprolog-xxx.tgz (in the src directory).



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 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).

You can also send a mail to the author (Daniel.Diaz@inria.fr).