1-*- text -*- 2 3Note: You are looking in the wrong place if you intend to compile a 4 Unix version using the MINGW32 or the DJGPP development 5 environments. As far as the S-Lang library is concerned, these 6 do not constitute Unix environments. Read INSTALL.pc. 7 8This distribution contains the source for the slang library, a 9``slang-shell'' program called slsh, and dynamically loadable modules 10that may be ``imported'' into the interpreter. Be sure to install all 113 components. 12 13--------------------------------------------------------------------- 14 Prerequisites 15--------------------------------------------------------------------- 16 17Some of the modules require third party libraries. If the configure 18script cannot find one of the libraries, the corresponding module will 19not be built. Currently, the following additional libraries are 20strongly recommended: 21 22 PCRE (Perl Compatible Regular Expression) 23 URL: <http://www.pcre.org> 24 *** Note: PCRE2, released in 2015 is currently unsupported. 25 26 PNG (Portable Network Graphics) 27 URL: <http://www.libpng.org/pub/png/> 28 29 ZLIB (Z compression library) 30 URL: <http://www.zlib.net/> 31 32 ONIGURUMA (Regular expression library) 33 URL: <https://github.com/kkos/oniguruma> 34 35On a Debian system, these libraries can be installed using: 36 37 apt-get install libpng12-dev zlib1g-dev libpcre3-dev libonig-dev 38 39 (Double check the package names-- the ones quoted above are 40 appropriate for Debian Lenny) 41 42If you have these installed in non-standard places and the configure 43script cannot find them, then run configure with the "--with-pcre" and 44"--with-png" options. Use "./configure --help" to see other options. 45In any case, these libraries are not required but without them the png 46and pcre modules will not be created. 47 48--------------------------------------------------------------------- 49Building and installing the S-Lang library 50--------------------------------------------------------------------- 51 52Under Unix, the S-Lang library makes use of the GNU autoconf package. 53The process may be as simple as: 54 55 ./configure 56 make (or make static) 57 make runtests (this builds the static library) 58 make install (or `make install-static` to install the static library) 59 make clean 60 61The first two steps: 62 63 ./configure 64 make 65 66will cause the (shared) library and the .o files to be placed 67src/elfobjs. Using 68 69 make static 70 71will build a static version of the library in src/objs. By default, 72`make` builds the shared version of the library. 73 74The 'runtests' step is designed to test the interpreter. It uses the 75static version of the library for this. 76 77 ***Note: If you are installing the library for other users, be sure 78 to set your umask value to 022 before running `make install`, 79 i.e., 80 81 umask 022 82 make install 83 84 ***Note: If you have the png, pcre, etc libraries installed in a 85 non-standard location, e.g., /opt/software, then the script 86 may not be able to find them. The locations may be 87 specified using, e.g., 88 89 ./configure --with-pcre=/opt/software --with-png=/opt/software 90 91 This assumes that the header files and the libraries are in 92 include/ and lib of /opt/software, resp. If not, run 93 94 ./configure --help 95 96 for other options regarding the locations of the pcre and png. 97 98 In any case, the pcre and png libraries are NOT REQUIRED. 99 But without them, the corresponding modules will not be created. 100 101 ***Note: By default, slsh is built using the slang readline 102 interface. To use GNU readline use the --with-readline=gnu 103 option. 104 105 ***Note: Object files are placed in subdirectories with names 106 ${ARCH}objs and ${ARCH}elfobjs, where ${ARCH} is set from 107 the environment. This may be exploited for the purposes of 108 building the library for multiple architectures. For 109 example, one might use ARCH=sun4 for a Sun 4 system, and 110 ARCH=i686 on a Linux system with a 32 bit processor. 111 112 In principle, any file generated by the configure process is 113 architecture specific and should be placed in an 114 architecture-specific directory. This is currently not 115 supported by the configure script. For this reason, when 116 building for a different architecture, the configure script 117 must be re-run. 118 119 ***Note: This package does not support the --srcdir command line 120 option. This option is typically used to compile separate 121 versions of the library. If your intent is to do something 122 like 123 124 mkdir foo; cd foo; ../configure --srcdir=..; make 125 126 then after reading the previous note, try: 127 128 setenv ARCH foo; ./configure; make (csh syntax) 129 ARCH=foo; export ARCH; ./configure make (/bin/sh) 130 131 The reason that --srcdir is not supported is that it fails 132 in the presence of symbolic links, e.g., 133 134 cd foo; cd .. 135 136 does not bring you back where you started if foo is a 137 symbolic link. 138 139By default, the slang library (libslang.so.*) will be installed into 140/usr/local/lib and slang.h into /usr/local/include. To install it 141under some other directory, e.g.., /opt, the use the --prefix argument 142when running the configure script, e.g., 143 144 ./configure --prefix=/opt 145 146As mentioned above, simply running `make` will create a shared version 147of the library. If your system does not support such libraries, or 148the build process fails to create a shared version of the library, you 149may want to install the static version: 150 151 make static 152 make install-static 153 154Below, I have attached the generic INSTALL instructions included in the 155autoconf distribution. 156---------------------------------------------------------------------------- 157Basic Installation 158================== 159 160 These are generic installation instructions. 161 162 The `configure' shell script attempts to guess correct values for 163various system-dependent variables used during compilation. It uses 164those values to create a `Makefile' in each directory of the package. 165It may also create one or more `.h' files containing system-dependent 166definitions. Finally, it creates a shell script `config.status' that 167you can run in the future to recreate the current configuration, a file 168`config.cache' that saves the results of its tests to speed up 169reconfiguring, and a file `config.log' containing compiler output 170(useful mainly for debugging `configure'). 171 172 If you need to do unusual things to compile the package, please try 173to figure out how `configure' could check whether to do them, and mail 174diffs or instructions to the address given in the `README' so they can 175be considered for the next release. If at some point `config.cache' 176contains results you don't want to keep, you may remove or edit it. 177 178 The file `configure.in' is used to create `configure' by a program 179called `autoconf'. You only need `configure.in' if you want to change 180it or regenerate `configure' using a newer version of `autoconf'. 181 182The simplest way to compile this package is: 183 184 1. `cd' to the directory containing the package's source code and type 185 `./configure' to configure the package for your system. If you're 186 using `csh' on an old version of System V, you might need to type 187 `sh ./configure' instead to prevent `csh' from trying to execute 188 `configure' itself. 189 190 Running `configure' takes awhile. While running, it prints some 191 messages telling which features it is checking for. 192 193 2. Type `make' to compile the package. 194 195 3. Optionally, type `make check' to run any self-tests that come with 196 the package. 197 198 4. Type `make install' to install the programs and any data files and 199 documentation. 200 201 5. You can remove the program binaries and object files from the 202 source code directory by typing `make clean'. To also remove the 203 files that `configure' created (so you can compile the package for 204 a different kind of computer), type `make distclean'. There is 205 also a `make maintainer-clean' target, but that is intended mainly 206 for the package's developers. If you use it, you may have to get 207 all sorts of other programs in order to regenerate files that came 208 with the distribution. 209 210Compilers and Options 211===================== 212 213 Some systems require unusual options for compilation or linking that 214the `configure' script does not know about. You can give `configure' 215initial values for variables by setting them in the environment. Using 216a Bourne-compatible shell, you can do that on the command line like 217this: 218 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure 219 220Or on systems that have the `env' program, you can do it like this: 221 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 222 223Compiling For Multiple Architectures 224==================================== 225 226 You can compile the package for more than one kind of computer at the 227same time, by placing the object files for each architecture in their 228own directory. To do this, you must use a version of `make' that 229supports the `VPATH' variable, such as GNU `make'. `cd' to the 230directory where you want the object files and executables to go and run 231the `configure' script. `configure' automatically checks for the 232source code in the directory that `configure' is in and in `..'. 233 234 If you have to use a `make' that does not supports the `VPATH' 235variable, you have to compile the package for one architecture at a time 236in the source code directory. After you have installed the package for 237one architecture, use `make distclean' before reconfiguring for another 238architecture. 239 240Installation Names 241================== 242 243 By default, `make install' will install the package's files in 244`/usr/local/bin', `/usr/local/man', etc. You can specify an 245installation prefix other than `/usr/local' by giving `configure' the 246option `--prefix=PATH'. 247 248 You can specify separate installation prefixes for 249architecture-specific files and architecture-independent files. If you 250give `configure' the option `--exec-prefix=PATH', the package will use 251PATH as the prefix for installing programs and libraries. 252Documentation and other data files will still use the regular prefix. 253 254 In addition, if you use an unusual directory layout you can give 255options like `--bindir=PATH' to specify different values for particular 256kinds of files. Run `configure --help' for a list of the directories 257you can set and what kinds of files go in them. 258 259 If the package supports it, you can cause programs to be installed 260with an extra prefix or suffix on their names by giving `configure' the 261option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 262 263Optional Features 264================= 265 266 Some packages pay attention to `--enable-FEATURE' options to 267`configure', where FEATURE indicates an optional part of the package. 268They may also pay attention to `--with-PACKAGE' options, where PACKAGE 269is something like `gnu-as' or `x' (for the X Window System). The 270`README' should mention any `--enable-' and `--with-' options that the 271package recognizes. 272 273 For packages that use the X Window System, `configure' can usually 274find the X include and library files automatically, but if it doesn't, 275you can use the `configure' options `--x-includes=DIR' and 276`--x-libraries=DIR' to specify their locations. 277 278Specifying the System Type 279========================== 280 281 There may be some features `configure' can not figure out 282automatically, but needs to determine by the type of host the package 283will run on. Usually `configure' can figure that out, but if it prints 284a message saying it can not guess the host type, give it the 285`--host=TYPE' option. TYPE can either be a short name for the system 286type, such as `sun4', or a canonical name with three fields: 287 CPU-COMPANY-SYSTEM 288 289See the file `config.sub' for the possible values of each field. If 290`config.sub' isn't included in this package, then this package doesn't 291need to know the host type. 292 293 If you are building compiler tools for cross-compiling, you can also 294use the `--target=TYPE' option to select the type of system they will 295produce code for and the `--build=TYPE' option to select the type of 296system on which you are compiling the package. 297 298Sharing Defaults 299================ 300 301 If you want to set default values for `configure' scripts to share, 302you can create a site shell script called `config.site' that gives 303default values for variables like `CC', `cache_file', and `prefix'. 304`configure' looks for `PREFIX/share/config.site' if it exists, then 305`PREFIX/etc/config.site' if it exists. Or, you can set the 306`CONFIG_SITE' environment variable to the location of the site script. 307A warning: not all `configure' scripts look for a site script. 308 309Operation Controls 310================== 311 312 `configure' recognizes the following options to control how it 313operates. 314 315`--cache-file=FILE' 316 Use and save the results of the tests in FILE instead of 317 `./config.cache'. Set FILE to `/dev/null' to disable caching, for 318 debugging `configure'. 319 320`--help' 321 Print a summary of the options to `configure', and exit. 322 323`--quiet' 324`--silent' 325`-q' 326 Do not print messages saying which checks are being made. 327 328`--srcdir=DIR' 329 Look for the package's source code in directory DIR. Usually 330 `configure' can determine that directory automatically. 331 332`--version' 333 Print the version of Autoconf used to generate the `configure' 334 script, and exit. 335 336`configure' also accepts some other, not widely useful, options. 337 338