OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [INSTALL] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
This file is INSTALL.  It contains installation instructions for Expect.
2
 
3
If you do not have Tcl, get it (Expect's README explains how) and
4
install it.  The rest of these instructions assume that you have Tcl
5
installed.
6
 
7
If you are installing Expect on a single architecture, or are just
8
trying it out to see whether it is worth installing, follow the
9
"Simple Installation" below.  If you are installing Expect on multiple
10
architectures or the "Simple Installation" instructions are not
11
sufficient, see "Sophisticated Installations" below.
12
 
13
--------------------
14
Permissions
15
--------------------
16
 
17
On a Cray, you must be root to compile Expect.  See the FAQ for why
18
this is.
19
 
20
If you want shared libs on Linux, you must be root in order to run
21
ldconfig.  See the ldconfig man page for more info.
22
 
23
--------------------
24
Simple Installation
25
--------------------
26
 
27
By default, the Tcl source directory is assumed to be in the same
28
directory as the Expect source directory.  For example, in this
29
listing, Expect and Tcl are both stored in /usr/local/src:
30
 
31
        /usr/local/src/tcl8.0           (actual version may be different)
32
        /usr/local/src/expect-5.24      (actual version may be different)
33
 
34
If Tcl is stored elsewhere, the easiest way to deal with this is to
35
create a symbolic link to its real directory.  For example, from the
36
Expect directory, type:
37
 
38
        ln -s /some/where/else/src/tcl8.0 ..
39
 
40
The same applies for Tk, if you have it.  (Tk is optional.)
41
 
42
Run "./configure".  This will generate a Makefile (from a prototype
43
called "Makefile.in") appropriate to your system.  (This step must be
44
done in the foreground because configure performs various tests on
45
your controlling tty.  If you want to do this step in the background
46
in the future, automate it using Expect!)
47
 
48
Most people will not need to make any changes to the generated
49
Makefile and can go on to the next step.  If you want though, you can
50
edit the Makefile and change any definitions as appropriate for your
51
site.  All the definitions you are likely to want to change are
52
clearly identified and described at the beginning of the file.
53
 
54
To build only the stand-alone Expect program, run "make expect".  This
55
is appropriate even if you still haven't decided whether to install
56
Expect, are still curious about it, and want to do the minimum
57
possible in order to experiment with it.
58
 
59
To build everything, run "make".  If "configure" found Tk and X on
60
your system, this will build "expectk" (Expect with Tk).
61
 
62
Once expect is built, you can cd to the example directory and try out
63
some of the examples (see the README file in the example directory).
64
 
65
"make install" will install Expect.  If you built Expectk, that will
66
be installed as well.  So will the documentation and some of the most
67
useful examples.
68
 
69
If you want shared libs on Linux, you must now su to root and run
70
ldconfig on the shared library.  See the ldconfig man page for more
71
info.
72
 
73
A handful of people running "pure" 4.2BSD systems have noted that
74
expect fails to link due to lack of getopt and vprintf.  You can get
75
these from uunet or any good archive site.
76
 
77
--------------------
78
Sophisticated Installations
79
--------------------
80
 
81
The following instructions provide some suggestions for handling
82
complex installations.
83
 
84
--------------------
85
Changing Defaults
86
--------------------
87
 
88
The configure script allows you to customize the Expect configuration
89
for your site; for details on how you can do this, type "./configure
90
-help" or refer to the autoconf documentation (not included here).
91
Expect's configure supports the following flags in addition to the
92
standard ones:
93
 
94
        --verbose               Cause configure to describe
95
                                what it is checking and what it decides.
96
 
97
        --enable-shared         Compile Expect as a shared library if it
98
                                can figure out how to do that on this
99
                                platform.  (You must have already
100
                                compiled Tcl with this flag.)
101
 
102
        --disable-load          This switch is ignored so that you can
103
                                configure Expect with the same configure
104
                                command as Tcl.  If you want to disable
105
                                dynamic loading, configure Tcl with this
106
                                flag and then reconfigure Expect.
107
 
108
        --enable-gcc            This switch is ignored so that you can
109
                                configure Expect with the same configure
110
                                command as Tcl.  If you want to enable gcc,
111
                                configure Tcl with it and then reconfigure
112
                                Expect.  Expect will inherit the definition
113
                                that way.  It is not safe to modify the
114
                                Makefile to use gcc by hand.  If you do
115
                                this, then information related to dynamic
116
                                linking will be incorrect.
117
 
118
        --with-tclconfig=...    Specifies the directory containing Tcl's
119
                                configure file (tclConfig.sh).
120
 
121
        --with-tclinclude=...   Specifies the directory containing Tcl's
122
                                private include files (such as tclInt.h)
123
 
124
        --with-tkconfig=...     Specifies the directory containing Tk's
125
                                configure file (tkConfig.sh).
126
 
127
        --with-tkinclude=...    Specifies the directory containing Tk's
128
                                private include files (such as tkInt.h)
129
 
130
Some of the defaults in "configure" can be overridden by environment
131
variables.  This is a convenience intended for environments that are
132
likely to affect any program that you configure and install.
133
 
134
The following environment variables are supported.  If you use these,
135
consider adding them to your .login file so that other installation
136
scripts can make use of them.
137
 
138
CC              C compiler
139
CFLAGS          Flags to C compiler
140
CPPFLAGS        Flags to C preprocessor
141
LDFLAGS         Flags to linker
142
LIBS            Libraries
143
CONFIG_SHELL    Shell for configure and Make
144
 
145
Settings can also be given on the command line.  For example, you
146
could tell configure about flags from a Bourne-compatible shell as
147
follows:
148
 
149
     CFLAGS=-O2 LIBS=-lposix ./configure
150
 
151
Although configure will do some searching for Tcl (and all of this
152
discussion holds true for Tk as well), configure likes to find the Tcl
153
source directory in the parent directory of Expect and will use that
154
Tcl if it exists.  To make sure Tcl can be found this way (if it is
155
located somewhere else), create a symbolic link in Expect's parent
156
directory to where the Tcl directory is.
157
 
158
By default, configure uses the latest Tcl it can find.  You can
159
override this by creating a symbolic link of "tcl" which points to the
160
release you want.
161
 
162
If you can't or don't want to create symbolic links, you can instead
163
indicate where Tcl and Tk are by using the following environment variables:
164
 
165
with_tclconfig          Directory containing Tcl configure file (tclConfig.h)
166
with_tclinclude         Directory containing Tcl include files
167
with_tkinclude          Directory containing Tk include files
168
with_tkconfig           Directory containing Tk binary library (tkConfig.h)
169
 
170
--------------------
171
Multiple-Architecture Installation
172
--------------------
173
 
174
You might want to compile a software package in a different directory
175
from the one that contains the source code.  Doing this allows you to
176
compile the package for several architectures simultaneously from the
177
same copy of the source code and keep multiple sets of object files on
178
disk.
179
 
180
To compile the package in a different directory from the one
181
containing the source code, you must use a version of make that
182
supports the VPATH variable.  GNU make and most other recent make
183
programs can do this.
184
 
185
cd to the directory where you want the object files and executables to
186
go and run configure.  configure automatically checks for the source
187
code in the directory that configure is in and in ..  If configure
188
reports that it cannot find the source code, run configure with the
189
option --srcdir=dir, where dir is the directory that contains the
190
source code.
191
 
192
You can save some disk space by installing architecture-independent
193
files (e.g., scripts, include files) in a different place than
194
architecture-dependent files (e.g., binaries, libraries).  To do this,
195
edit the Makefile after configure builds it, or have configure create
196
the Makefile with the right definitions in the first place.  To have
197
configure do it, use the following options to configure:
198
 
199
        --prefix=indep
200
        --exec-prefix=dep
201
 
202
where dep is the root of the tree in which to store
203
architecture-dependent files and indep is the root in which to
204
store -dependent files.  For example, you might invoke configure this
205
way:
206
 
207
        configure --prefix=/usr/local/bin --exec-prefix=/usr/local/bin/arch
208
 
209
--------------------
210
Test Suite
211
--------------------
212
 
213
Patterned after the Tcl test suite, I have begun building a test suite
214
in the subdirectory "test".  It is still incomplete however you may
215
use by typing "make test" in this directory.  You should then see a
216
printout of the test files processed.  If any errors occur, you'll see
217
a much more substantial printout for each error.  See the README file
218
in the "tests" directory for more information on the test suite.
219
 
220
Note that the test suite assumes the existence of certain programs to
221
use as interactive programs.  If you are missing these or they behave
222
differently, errors may be reported.  Similarly, the test suite
223
assumes certain other things about your system, such as the sane stty
224
parameters.
225
 
226
You may also try some of the programs distribute in the example
227
directory (see the README file in the example directory).  They are a
228
strong indication of whether Expect works or not.  If you have any
229
problems with them, let me know.
230
 
231
--------------------
232
Uninstalling
233
--------------------
234
 
235
"make uninstall" removes all the files that "make install" creates
236
(excluding those in the current directory).
237
 
238
--------------------
239
Cleaning Up
240
--------------------
241
 
242
Several "clean" targets are available to reduce space consumption of
243
the Expect source.  The two most useful are as follows:
244
 
245
"make clean" deletes all files from the current directory that were
246
created by "make"
247
 
248
"make distclean" is like "make clean", but it also deletes files
249
created by "configure"
250
 
251
Other targets can be found in the Makefile.  They follow the GNU
252
Makefile conventions.
253
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.