1
1
Fork 0

2.3.2 version (official tarball slang-2.3.3.tar.bz2)

This commit is contained in:
commit a1ff728eaf
573 changed files with 284180 additions and 0 deletions

339
COPYING Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

40
INSTALL.pc Normal file
View File

@ -0,0 +1,40 @@
-*- text -*-
The slang library is available for OS/2, MSDOS, and WIN32 (windows
9x/NT) systems. This _includes_ the various GNU environments such as
DJGPP, and MINGW32/64. For CYGWIN, follow the UNIX instructions.
Each of the src, modules, and slsh directories contains a mkfiles
subdirectory that can be used to create Makefiles for non-CYGWIN
builds. The simplest approach to building the distribution is to
invoke the build scripts located in the top-level mkfiles directory.
For example, from a CMD window, a mingw32 version may be built and
installed using a simple 3-step process:
1. C:\path\to\slang> mkfiles\m32init.bat
2. C:\path\to\slang> mingw32-make
3. C:\path\to\slang> mingw32-make install
The first step will generate makefiles for mingw32/mingw64. Note that
mingw32-make is used for both 32 and 64 bit builds. In particular,
this step will create a top-level makefile that contains the locations
where the library and its components will get installed. Before, going
on to step 2, it is a good idea to look at the makefile and edit it if
necessary.
The second step will build the library, slsh, and the modules. If
something goes wrong here, fix it before going to step 3.
The final step installs the library and its components. The actual
work is carried out by slsh, which was created in step 2. Please
note, if you make an changes the installation paths in the makefile
after completing step 2, then you will need to rebuild it. That is,
run `mingw32-make clean', then go to step 2.
Finally you will need to make sure that the $PREFIX/bin directory is
in your PATH. Assuming that this has been done, you should be able
to run `slsh' at the CMD prompt.
More information on the makefile generation process is available
in src/mkfiles/README.

337
INSTALL.unx Normal file
View File

@ -0,0 +1,337 @@
-*- text -*-
Note: You are looking in the wrong place if you intend to compile a
Unix version using the MINGW32 or the DJGPP development
environments. As far as the S-Lang library is concerned, these
do not constitute Unix environments. Read INSTALL.pc.
This distribution contains the source for the slang library, a
``slang-shell'' program called slsh, and dynamically loadable modules
that may be ``imported'' into the interpreter. Be sure to install all
3 components.
---------------------------------------------------------------------
Prerequisites
---------------------------------------------------------------------
Some of the modules require third party libraries. If the configure
script cannot find one of the libraries, the corresponding module will
not be built. Currently, the following additional libraries are
strongly recommended:
PCRE (Perl Compatible Regular Expression)
URL: <http://www.pcre.org>
*** Note: PCRE2, released in 2015 is currently unsupported.
PNG (Portable Network Graphics)
URL: <http://www.libpng.org/pub/png/>
ZLIB (Z compression library)
URL: <http://www.zlib.net/>
ONIGURUMA (Regular expression library)
URL: <https://github.com/kkos/oniguruma>
On a Debian system, these libraries can be installed using:
apt-get install libpng12-dev zlib1g-dev libpcre3-dev libonig-dev
(Double check the package names-- the ones quoted above are
appropriate for Debian Lenny)
If you have these installed in non-standard places and the configure
script cannot find them, then run configure with the "--with-pcre" and
"--with-png" options. Use "./configure --help" to see other options.
In any case, these libraries are not required but without them the png
and pcre modules will not be created.
---------------------------------------------------------------------
Building and installing the S-Lang library
---------------------------------------------------------------------
Under Unix, the S-Lang library makes use of the GNU autoconf package.
The process may be as simple as:
./configure
make (or make static)
make runtests (this builds the static library)
make install (or `make install-static` to install the static library)
make clean
The first two steps:
./configure
make
will cause the (shared) library and the .o files to be placed
src/elfobjs. Using
make static
will build a static version of the library in src/objs. By default,
`make` builds the shared version of the library.
The 'runtests' step is designed to test the interpreter. It uses the
static version of the library for this.
***Note: If you are installing the library for other users, be sure
to set your umask value to 022 before running `make install`,
i.e.,
umask 022
make install
***Note: If you have the png, pcre, etc libraries installed in a
non-standard location, e.g., /opt/software, then the script
may not be able to find them. The locations may be
specified using, e.g.,
./configure --with-pcre=/opt/software --with-png=/opt/software
This assumes that the header files and the libraries are in
include/ and lib of /opt/software, resp. If not, run
./configure --help
for other options regarding the locations of the pcre and png.
In any case, the pcre and png libraries are NOT REQUIRED.
But without them, the corresponding modules will not be created.
***Note: By default, slsh is built using the slang readline
interface. To use GNU readline use the --with-readline=gnu
option.
***Note: Object files are placed in subdirectories with names
${ARCH}objs and ${ARCH}elfobjs, where ${ARCH} is set from
the environment. This may be exploited for the purposes of
building the library for multiple architectures. For
example, one might use ARCH=sun4 for a Sun 4 system, and
ARCH=i686 on a Linux system with a 32 bit processor.
In principle, any file generated by the configure process is
architecture specific and should be placed in an
architecture-specific directory. This is currently not
supported by the configure script. For this reason, when
building for a different architecture, the configure script
must be re-run.
***Note: This package does not support the --srcdir command line
option. This option is typically used to compile separate
versions of the library. If your intent is to do something
like
mkdir foo; cd foo; ../configure --srcdir=..; make
then after reading the previous note, try:
setenv ARCH foo; ./configure; make (csh syntax)
ARCH=foo; export ARCH; ./configure make (/bin/sh)
The reason that --srcdir is not supported is that it fails
in the presence of symbolic links, e.g.,
cd foo; cd ..
does not bring you back where you started if foo is a
symbolic link.
By default, the slang library (libslang.so.*) will be installed into
/usr/local/lib and slang.h into /usr/local/include. To install it
under some other directory, e.g.., /opt, the use the --prefix argument
when running the configure script, e.g.,
./configure --prefix=/opt
As mentioned above, simply running `make` will create a shared version
of the library. If your system does not support such libraries, or
the build process fails to create a shared version of the library, you
may want to install the static version:
make static
make install-static
Below, I have attached the generic INSTALL instructions included in the
autoconf distribution.
----------------------------------------------------------------------------
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

10
INSTALL.vms Normal file
View File

@ -0,0 +1,10 @@
VMS Installation instructions:
In the source directory, you will find the following files:
vmsmake.com VMS DCL command procedure
On VMS, just type `@vmsmake' or if you have gcc, type `@vmsmake gcc'.
Note: Since I nolonger have access to VMS, I cannot guarantee that the
library will compile cleanly under VMS.

578
NEWS Normal file
View File

@ -0,0 +1,578 @@
NEWS for version 2.3.x -*-text-*-
24 bit color support (new for version 2.3.1)
============================================
The SLtt interface has been modified to support 24 bit (true)
colors. Until the next major release (version 3), this feature is
available for 64 bit Unix/VMS systems to keep binary compatibility.
Support for 32 bit systems will be added in version 3.
Since not all terminals support true color, and it is not supported
by terminfo, 24 bit color is disabled by default. A list of
terminals that support true color may be found at
<https://gist.github.com/XVilka/8346728>.
To indicate that a terminal supports true color, set the value of
the environment variable COLORTERM to either "24bit" or "truecolor",
e.g.,
export COLORTERM=truecolor
Then to use 24 bit color in applications such as jed and slrn, use a
24bit RGB value in the form "#RRGGBB" as the name of the color.
For example, to set the color of the status line in jed to AliceBlue
(#F0F8FF) on a SlateGray (#708090) background, use
set_color ("status", "#F0F8FF", "#708090");
in the .jedrc file. In slrn, to set the color of the author name to
the above colors use
color author "#F0F8FF" "#708090"
in the .slrnrc file. Also note other character attributes may be
specified, e.g., "#F0F8FF;italics;underline".
New Modules
===========
1. base64: A base64 encoder/decoder module
2. chksum: A module for computing various checksums (currently md5
and sha1)
3. stats: A statistics module
4. histogram: A histogram module
5. json: Encode/decode json structures
Module Updates
==============
stats-module: Added Anderson-Darling normality and
k-sample tests (version 2.3.1)
Intrinsic Functions
===================
The following intrinsic functions have been added for 2.3.x:
sincos : returns both sin and cos in one function call
get/setitimer: get/set an interval timer
wherefirstmin/max, wherelastmin/max: returns index for first/last
min/max values of an array
wherefirst_eq/ne/gt/lt/ge/le, where_last_eq/ne/gt/lt/ge/le:
returns first/last index of an array where the array value is
eq/ne/gt/lt/ge/le of a specified value. (version 2.3.1)
wherediff: returns indices where adjacient elements of an array
differ.
bstrjoin, bstrcat: like strjoin/strcat but for binary strings.
get_environ: returns an array of currently defined environment variables.
getrusage: Get resource usage
lchown: Change ownership of a symbolic link
get/set_printable_bstring_size: Get/set the length of the
printable representation of binary strings. (version 2.3.1)
statvfs: Intrinsic that wraps statvfs POSIX function that returns
file system statistics. (version 2.3.1)
_ftime: returns the number of (wallclock) seconds since an epoch
(version 2.3.1)
wchars_to_string/string_to_wchars: Convert a UTF-8 encoded string
to and from an array of Unicode characters. (version 2.3.1)
_array_byteswap: used to convert the values of an array from one
endianness to another (version 2.3.2)
The following functions have been enhanced:
array_map modified to support multiple return values.
is_substrbytes: Added support for an optional offset into the
string.
_push_struct_field_values: An optional argument may be used to
specify the fields to be pushed. (version 2.3.1)
Interpreter Syntax
==================
The step parameter was made optional for the _for statement.
Struct field names may be an arbitrary string:
X = struct {"some-field", some_other_field };
X.some_other_field = 3;
X."some-field" = 4;
String literals now support \uABCD to specify a 32 bit unicode
character. Previously, the braces were required (\u{ABCD}).
(version 2.3.1)
A reserved word may be used for a struct field name without quoting
it (version 2.3.2)
slsh library (used by conforming slang apps such as jed, slrn, ...)
===================================================================
fswalk.sl: Functions that facilitate walking the filesystem.
listfuns.sl: Set of functions dealing with lists and list-based
structures (e.g., heaps).
rearrange: Performs an in-place arrangement of values in an array
or list (defined in arrayfuns.sl).
slsh
====
Using "who" at the slsh> prompt will list the names/values of
variables and functions defined at the prompt.
API News
========
Note: The slang 2.3.x API is backward binary compatible with slang
2.y.z.
Font attributes (italics, bold, underline, ...) may be enabled for
terminals that support them by using a color name with a qualifier:
SLtt_set_color ("menu", "white;italics", "blue");
SLtt_set_color ("comment", "black;underline;italics", "cyan");
SLang_init_tty: if flow control parameter is negative, the
terminal's flow control setting will not be changed.
New functions:
Functions for dealing with qualifiers passed to intrinsic
functions:
SLang_qualifier_exists;
SLang_get_int_qualifier;
SLang_get_long_qualifier;
SLang_get_double_qualifier;
SLang_get_string_qualifier;
Callback functions that allow an app additional hooks into the
slang readline functions:
SLrline_set_free_update_cb;
SLrline_set_update_clear_cb;
SLrline_set_update_preread_cb;
SLrline_set_update_postread_cb;
SLrline_set_update_width_cb;
SLrline_get_update_client_data;
Functions for dealing with interpreter associative arrays:
SLang_create_assoc;
SLang_push_assoc;
SLang_pop_assoc;
SLang_free_assoc;
SLang_assoc_put;
SLang_assoc_get;
SLang_assoc_key_exists;
Functions for dealing with interpreter list objects:
SLang_create_list;
SLang_list_append;
SLang_list_insert;
SLang_push_list;
SLang_pop_list;
SLang_free_list;
Functions for dealing with interpreter structures:
SLang_create_struct;
SLang_push_struct_field;
SLang_pop_struct_field;
SLang_pop_struct_fields;
Miscellaneous Functions:
SLstack_exch;
SLcompute_string_hash;
SLpath_getcwd;
Unicode Support
===============
Unicode tables were updated to version 10.0.0 (version 2.3.2)
Miscellaneous
=============
Support was added to support 32-bit terminfo database
entries introduced by ncurses 6.1 (version 2.3.2)
=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=
NEWS for version 2.2.x -*-text-*-
Interpreter Enhancements
========================
1. The ternary expression was added:
expression = condition ? val1 : val2
If condition is non-zero, then expression = val1,
otherwise expression = val2
2. The break and condition statements support an optional integer
that indicates how many loop levels the statement affects, e.g.,
the break statement in
while (1)
{
loop (10)
{
break 2;
}
}
will cause both loops to be terminated.
3. Multiline strings have been added:
"This is a \
multiline \
string"
`This is
another multiline
string that
does not require
a \ for continuation`
4. List_Type objects may be indexed using an array of indices
instead of just a single scalar index.
5. (v2.2.3) Binary literal integers of the form 0bxx...x are supported.
Here, x is 0 or 1. The printf "%B" format specifier was added
to format integers as binary.
6. (v2.2.3) The dereference operator (@) may be used in a structure
definition to include the fields from the dereferenced
structure, e.g.,
space = struct {x, y, z};
spacetime = struct {@space, t};
7. (v2.2.3) Dereferencing a scalar or vector class type now
results in duplication of the object, e.g, @7 will produce 7.
8. (v2.2.3) Mergesort was made the default sorting algorithm. See the
array_sort for details.
Modules
=======
1. zlib: A module that wraps the popular z compression library.
2. fork: A module that wraps the fork, exec*, and waitpid functions.
slsh/lib/process.sl utilizes this module to allow an
application to easily create subprocesses and pipelines.
3. sysconf: Module that implements interfaces to the posix
sysconf, pathconf, etc. functions.
4. (2.2.3) csv: A module that supports the reading and writing of
so-called Comma Separated Values files.
Intrinsic Functions
===================
The following intrinsic functions have been added for 2.2.x:
sumsq
equivalent to sum(x*x)
expm1
More accurate version of exp(x)-1 for x near 0.
log1p
More accurate version of log(1+x) for x near 0
list_to_array
Creates an array from a list.
string_matches
A convenient alternative to string_match and string_match_nth
functions.
strskipbytes (v2.2.3)
Skip a range of bytes in a byte string.
is_substrbytes (v2.2.3)
Like is_substr except this works with binary strings
containing embedded null characters.
strskipchar, strbskipchar (v2.2.3)
Analogous to C ch=*p++ and ch=*p-- for UTF-8 encoded strings.
_close
Close an integer descriptor
_fileno
Returns the descriptor as an integer
dup2, getsid, killpg, getpriority/setpriority
Wraps the corresponding system functions.
utime (v2.2.3)
Change a file's last access and modification time.
ldexp, frexp:
If x == a*2^b, where 0.5<=a<1.0 then (a,b)=frexp(x),
and x=ldexp(a,b).
islower, isupper, isxdigit, isalnum, isalpha, iscntrl, isprint,
isgraph, ispunct, isblank, isascii, isspace (v2.2.3):
Character classification functions.
list_append, list_join (v2.2.3)
Functions for merging two lists together.
ttyname (v2.2.3)
Get the name of the terminal
timegm (v2.2.3)
Inverse of gmtime
The following functions have been enhanced:
hypot
If given a single array argument, it returns the equivalent
of sqrt(sum(X*X)).
Support for N arrays added for e.g., the Euclidean norm in
an N dimensional space (v2.2.3)
_min, _max: (v2.2.3)
Added support for more than two elements.
polynom
The calling interface to this function was changed and
support added for arrays.
strjoin (v2.2.3)
delimiter made optional
strreplace (v2.2.3)
New usage designed to facilitate the most common case where
one wants to replace all the substrings.
strtrans (v2.2.3)
Additional character classes added (see documentation).
string_match, string_matches (v2.2.3)
The position argument made optional
The following string functions have been vectorized to act upon
arrays of strings (v2.2.3):
is_substr
str_delete_chars
strbytelen
strcharlen
strcmp
strcompress
strlen
strlow
strnbytecmp
strncharcmp
strncmp
strtrans
strtrim
strtrim_beg
strtrim_end
strup
slsh
====
slang readline enhancements:
New functions:
rline_up/down_hist
Behaves similar to zsh up/down-line-or-search functions (v2.2.3).
rline_call_editor
rline_edit_history
rline_edit_line
Call external editor for line/history editing. (v2.2.3)
Structure field completion. (v2.2.3)
Instead of scrolling horizontally when editing a line,
attempt to wrap the line. (v2.2.3)
setfuns.sl: Various set functions: unique, intersection,
complement,union (v2.2.3)
Misc
====
Unicode tables updated to version 5.1.
=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x
NEWS for version 2.1
Building the library
====================
`make install' installs the shared version of the library.
Previously `make install' installed just the static version and a
separate step (`make install-elf') was required to install the
shared version. Now, `make install-static' is necessary to install
the static one.
Interpreter News
=================
Syntax enhancements:
--------------------
1. Short circuiting boolean operators:
if ((x == y) || (y == 3) && (x != 4)) ...
(orelse and andelse are deprecated)
2. Structure definitions allow embdedded assignment expressions:
s = struct {x = 3, name="foo", a = [1:10]};
3. Qualifiers (aka "keywords") added to the language:
save_file ("foo.c"; overwrite=1);
plot_points ([1:10], sin([1:10]); color="red", style="solid");
3. Expressions such as (a < b < c) now interpreted to mean
(a<b)and(b<c).
4. New keywords: ifnot, then
ifnot may be used instead of !if, which has been deprecated.
For "then" see the next item.
5. Looping constructs support a "then" clause that will get
executed if the loop runs to completion, e.g.,
loop (20)
{
if (this ())
break; % The then clause will NOT get executed
}
then do_that ();
6. A floating point array of exactly N elements may be created
using the form [a:b:#N], where the elements are uniformly
spaced and run from a to b, inclusive.
7. References to array elements and structure fields are
supported, e.g., &A[3], &s.foo.
8. An exception may be rethrown by calling "throw" without any
arguments:
try { something (); }
catch AnyError: { do_this (); throw; }
New Intrinsic Functions:
------------------------
wherenot(x) :
Equivalent to where (not(x))
_$(str) :
Evaluates strings with embedded "dollar" variables, e.g.,
_$("$TERM");
__push_list/__pop_list :
Push list items onto the stack
prod(x) :
Computes the product of an array a[0]*a[1]*...
minabs(x), maxabs(x):
Equivalent to min(abs(x)) and max(abs(x))
getpgrp,setgid, getpgid:
Get and set the process group (Unix)
setsid :
Create a new session
API News
========
Although not new I feel that this point should be stressed now
because it was not emphasized earlier: The SLarray_* functions that
deal with indices or sizes use `SLindex_Type' instead of `int'.
Currently, `SLindex_Type' is typedefed to be an `int', but this will
change in a future version. So for future compatibility, use
`SLindex_Type' instead of `int' in functions that deal with slang
arrays. Similarly, instead of using SLang_pop_int for obtaining an
array index, use SLang_pop_array_index. See the array-specific
examples in the documentation for more information.
There have been significant enhancements to the slang readline
interface. The interface has been opened up to the interpreter
allowing for such features as completion and a persistent history
mechanism. Applications wishing to take advantage of these features
should use the new function `SLrline_open2' instead of
`SLrline_open'. For an example, see how this function is used in
slsh/src/readline.c.
SLclass_patch_intrin_fun_table was added to facilitiate the patching
of intrinsic tables during runtime. If you have created dynamically
loaded modules, then you may have a good idea what this function is
for.
The SLang_Traceback variable is now interpreted as a bitmapped
integer providing greater flexibility and control over traceback
messages.
SLerr_throw was added to permit applications to mimic the semantics
of the `throw' statement.
SLang_verror_va was added to support calling the error routines with
a va_list argument.
slsh enhancements
=================
When configured to use slang's readline routines, new features
include filename completion and persistent history.
The profiler was rewritten to be much more friendly, flexible, and
more accurate.
struct_filter and struct_combine defined in structfuns.sl have been
made more flxible. See their documentation for more information.
A new function called readascii may be used for reading
non-binary (or so-called "ascii") data files.
New modules
===========
The following modules have been added:
iconv: Performs character-set conversion using the iconv library.
onig: A regular expression module using oniguruma RE library.
rand: A random number module

6
README Normal file
View File

@ -0,0 +1,6 @@
New features and upgrade information for version 2 are described in
the appendices of doc/text/slang.txt and doc/text/cslang.txt. If you
upgrading from version 1, then you should read these appendices.
One final note: The license for the library has changed to the GNU
Public License. The Perl Artistic License is no longer supported.

3
UPGRADE.txt Normal file
View File

@ -0,0 +1,3 @@
Information about upgrading from slang 1 is now contained in the
appendices of doc/txt/slang.txt (interpreter) and doc/text/cslang.txt
(C API).

8
autoconf/Makefile Normal file
View File

@ -0,0 +1,8 @@
../configure: aclocal.m4 configure.ac iconv.m4
/bin/rm -rf autom4te.cache
autoconf && mv ./configure ..
update: config.sub config.guess
config.guess: /usr/share/misc/config.guess
/bin/cp -f /usr/share/misc/config.guess config.guess
config.sub: /usr/share/misc/config.sub
/bin/cp -f /usr/share/misc/config.sub config.sub

109
autoconf/Makefile.in Normal file
View File

@ -0,0 +1,109 @@
# -*- make -*-
#This is a UNIX-only makefile. For other systems, get a makefile from
#src/mkfiles/
# If you want to change these variables, re-run the configure script.
INSTALL= @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
pkgconfigdir = @pkgconfigdir@
#---------------------------------------------------------------------------
# DESTDIR is designed to facilitate making packages. Normally it is empty
#---------------------------------------------------------------------------
#DESTDIR =
DEST_PKGCONFIGDIR = $(DESTDIR)$(pkgconfigdir)
#
MKINSDIR = autoconf/mkinsdir.sh
@SET_MAKE@
SHELL = /bin/sh
all: elf
Makefile: configure autoconf/Makefile.in
@echo "Makefile is older than the configure script".
@echo "Please re-run the configure script."
@exit 1
slsh/Makefile: configure slsh/Makefile.in
@echo "slsh/Makefile is older than its dependencies".
@echo "Please re-run the configure script."
@exit 1
modules/Makefile: configure modules/Makefile.in
@echo "modules/Makefile is older than its dependencies".
@echo "Please re-run the configure script."
@exit 1
src/Makefile: configure src/Makefile.in src/config.hin
@echo "src/Makefile is older than its dependencies".
@echo "Please re-run the configure script."
@exit 1
#
makefiles: Makefile slsh/Makefile modules/Makefile src/Makefile
help:
@echo "make install ==> shared version of the library, slsh and modules"
@echo "make install-static ==> static version of the library and slsh; no modules"
@echo "make install-all ==> shared/static versions of the library/modules + shared slsh."
@echo "make install-modules ==> install the modules"
@echo "make check ==> Build the library and run the regression tests"
slang.pc: configure autoconf/slangpc.in
@echo "slang.pc needs to be updated -- rerun configure"
@exit 1
static: makefiles slang.pc
cd src; $(MAKE) static
cd slsh; $(MAKE) static
modules:
cd modules; $(MAKE) all
elf: makefiles slang.pc
cd src; $(MAKE) elf
cd slsh; $(MAKE) all
cd modules; $(MAKE) all
@echo Use make install to install it.
runtests: all
@failed=0; \
cd src; $(MAKE) runtests || failed=1; cd ..; \
cd modules; $(MAKE) runtests || failed=1; cd ..; \
cd slsh; $(MAKE) runtests || failed=1; cd ..; \
exit $$failed
check: runtests
demos:
cd demo; $(MAKE)
clean:
/bin/rm -f *~
cd src; $(MAKE) clean
cd modules; $(MAKE) clean
cd slsh; $(MAKE) clean
cd demo; $(MAKE) clean
install-static: install-pkgconfig
cd src; $(MAKE) install-static
cd slsh; $(MAKE) install-static
install-pkgconfig: slang.pc
$(MKINSDIR) $(DEST_PKGCONFIGDIR)
$(INSTALL_DATA) slang.pc $(DEST_PKGCONFIGDIR)/
install-elf: install-pkgconfig
cd src; $(MAKE) install-elf
@echo Now installing slsh
cd slsh; $(MAKE) install
@echo Now installing the modules
cd modules; $(MAKE) install
@echo ""
@echo "On some systems, e.g., linux, you may also have to run ldconfig."
@echo ""
install: install-elf install-pkgconfig
install-all: install-elf
cd src; $(MAKE) install-static
install-modules:
cd modules; $(MAKE) install
install-links:
cd src; $(MAKE) install-links
#
distclean:
/bin/rm -f *~ Makefile config.status config.log config.cache files.pck slang.pc
cd src; $(MAKE) distclean
cd demo; $(MAKE) distclean
cd modules; $(MAKE) distclean
cd slsh; $(MAKE) distclean
#
.PHONY: all help static elf install clean check install-elf install-static makefiles install-pkgconfig
#

1096
autoconf/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

1454
autoconf/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1815
autoconf/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

411
autoconf/configure.ac Normal file
View File

@ -0,0 +1,411 @@
dnl# -*- sh -*-
dnl#
dnl# This file requires JD_* m4 macros that are defined in
dnl# the aclocal.m4 file.
dnl#
AC_INIT(src/slang.c)
#AC_PREFIX_DEFAULT($MY_PREFIX_DEAULT)
# Installation location
AC_PREFIX_DEFAULT("/usr/local"
dnl# if test -f "/usr/include/slang.h"; then
dnl# ac_default_prefix="/usr"
dnl# fi
)
AC_CONFIG_AUX_DIR(autoconf)
AC_CANONICAL_HOST
JD_INIT
JD_ANSI_CC
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_ARG_WITH(pkgconfigdir,
AC_HELP_STRING([--with-pkgconfigdir=DIR],
[pkgconfig dir (libdir/pkgconfig)]),
[pkgconfigdir=${withval}],
[pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST(pkgconfigdir)
dnl # Terminfo binary format
AC_ARG_WITH(terminfo,
[ --with-terminfo=xxx Terminfo layout: default, hpux11, osf1r5, aix4, uwin ],
[ jd_with_terminfo_arg=$withval ], [jd_with_terminfo_arg=default])
AC_MSG_CHECKING(terminfo layout)
if test "x$jd_with_terminfo_arg" = "x"
then
jd_with_terminfo_arg="default"
fi
if test -r src/terminfo/$jd_with_terminfo_arg.inc
then
AC_MSG_RESULT($jd_with_terminfo_arg)
TERMINFO_LAYOUT="$jd_with_terminfo_arg"
else
AC_MSG_ERROR(-"-with-terminfo=$jd_with_terminfo_arg is invalid. src/terminfo/$jd_with_terminfo_arg.inc does not exist")
fi
AC_SUBST(TERMINFO_LAYOUT)
dnl # Readline support for slsh
AC_ARG_WITH(readline,
[ --with-readline=xxx Use slang(default) or gnu readline for slsh ],
[ jd_with_readline_arg=$withval ], [jd_with_readline_arg=slang])
AC_MSG_CHECKING(type of readline support for slsh)
case "x$jd_with_readline_arg" in
xgnu|xGNU )
GNU_READLINE=1
LIB_READLINE=-lreadline
AC_MSG_RESULT(gnu);
;;
*)
GNU_READLINE=0
LIB_READLINE="# -lreadline"
AC_MSG_RESULT(slang);
;;
esac
AC_SUBST(GNU_READLINE)
AC_SUBST(LIB_READLINE)
dnl #
AC_ARG_WITH(slsyswrap,
[ --with-slsyswrap=DIR Not for production use],
[ jd_with_slsyswrap_arg=$withval ], [jd_with_slsyswrap_arg=no])
AC_MSG_CHECKING(for slsyswrap)
case "x$jd_with_slsyswrap_arg" in
x|xno)
DSLSYSWRAP=""
LIB_SLSYSWRAP=""
AC_MSG_RESULT(no);
;;
*)
DSLSYSWRAP="-I$jd_with_slsyswrap_arg/include -DSLSYSWRAP=1"
LIB_SLSYSWRAP="-L$jd_with_slsyswrap_arg/lib -lslsyswrap"
AC_MSG_RESULT(yes);
;;
esac
AC_SUBST(DSLSYSWRAP)
AC_SUBST(LIB_SLSYSWRAP)
# For the socket module
AC_PATH_XTRA
#Check these header since they cause trouble
AC_CHECK_HEADERS( \
stdlib.h \
unistd.h \
memory.h \
termios.h \
malloc.h \
locale.h \
xlocale.h \
langinfo.h \
fcntl.h \
sys/fcntl.h \
sys/types.h \
sys/wait.h \
sys/utsname.h \
sys/times.h \
sys/statvfs.h \
sys/time.h \
utime.h \
floatingpoint.h \
ieeefp.h \
nan.h \
fenv.h \
sys/mman.h \
sys/socket.h \
netinet/in.h \
arpa/inet.h \
sys/un.h \
sys/resource.h \
)
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_UID_T
dnl# AC_TYPE_OFF_T
AC_MSG_CHECKING([for socklen_t])
AC_EGREP_HEADER(socklen_t, sys/socket.h,
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
AC_DEFINE(socklen_t,int,
[ Define to 'int' if not in <sys/socket.h>]))
AC_HEADER_DIRENT
AC_CHECK_FUNCS(\
memset \
memcpy \
putenv \
getcwd \
setlocale \
tcgetattr \
tcsetattr \
cfgetospeed \
sigaction \
sigemptyset \
sigprocmask \
sigaddset \
alarm \
pause \
vfscanf \
lstat readlink symlink link \
kill killpg \
snprintf vsnprintf \
getppid getegid geteuid getuid getgid setgid setuid \
setpgid getpgid setpgrp getpgrp setsid getsid \
mmap \
chown lchown popen mkfifo \
atexit on_exit umask uname \
times gmtime mktime gettimeofday \
getitimer setitimer \
gmtime_r ctime_r localtime_r \
strtod atoll strtoll \
issetugid \
isnan \
finite \
isinf \
round \
siglongjmp \
fork waitpid \
socket socketpair \
confstr pathconf \
getpriority setpriority \
getrusage \
setvbuf \
utime utimes \
ttyname ttyname_r \
newlocale strtod_l localeconv \
statvfs \
)
if test x"$ac_cv_func_socketpair" != x"yes"; then
AC_CHECK_LIB(socket, socketpair, AC_DEFINE(HAVE_SOCKETPAIR,1))
fi
if test x"$ac_cv_func_socket" != x"yes"; then
AC_CHECK_LIB(socket, socket, AC_DEFINE(HAVE_SOCKET,1))
fi
dnl# Systems that have nl_langinfo may not have CODESET. Test for both here
AC_CACHE_CHECK([for nl_langinfo and CODESET], jd_cv_nl_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>], [char* cs = nl_langinfo(CODESET);],
jd_cv_nl_langinfo_codeset=yes, jd_cv_nl_langinfo_codeset=no)
])
if test $jd_cv_nl_langinfo_codeset = yes
then
AC_DEFINE(HAVE_NL_LANGINFO_CODESET, 1, [Set to 1 if you have the nl_langinfo(CODESET) function])
fi
AC_MSG_CHECKING(for environ variable)
AC_TRY_LINK([
#include <stdlib.h>
extern char **environ;
],
[exit (environ == NULL);],
have_environ=yes, have_environ=no)
AC_MSG_RESULT([$have_environ])
if test $have_environ = yes
then
AC_DEFINE(HAVE_ENVIRON, 1, [Set to 1 if environ exists])
fi
AC_CHECK_LIB(m, acosh, [AC_DEFINE(HAVE_ACOSH,1,[Set to 1 if you have the acosh function])])
AC_CHECK_LIB(m, asinh, [AC_DEFINE(HAVE_ASINH,1,[Set to 1 if you have the asinh function])])
AC_CHECK_LIB(m, atanh, [AC_DEFINE(HAVE_ATANH,1,[Set to 1 if you have the atanh function])])
AC_CHECK_LIB(m, hypot, [AC_DEFINE(HAVE_HYPOT,1,[Set to 1 if you have the hypot function])])
AC_CHECK_LIB(m, atan2, [AC_DEFINE(HAVE_ATAN2,1,[Set to 1 if you have the atan2 function])])
AC_CHECK_LIB(m, frexp, [AC_DEFINE(HAVE_FREXP,1,[Set to 1 if you have the frexp function])])
AC_CHECK_LIB(m, frexpf, [AC_DEFINE(HAVE_FREXPF,1,[Set to 1 if you have the frexpf function])])
AC_CHECK_LIB(m, ldexp, [AC_DEFINE(HAVE_LDEXP,1,[Set to 1 if you have the ldexp function])])
AC_CHECK_LIB(m, ldexpf, [AC_DEFINE(HAVE_LDEXPF,1,[Set to 1 if you have the ldexpf function])])
AC_CHECK_LIB(m, sincos, [AC_DEFINE(HAVE_SINCOS,1,[Set to 1 if you have the sincos function])])
AC_CHECK_LIB(m, sincosf, [AC_DEFINE(HAVE_SINCOSF,1,[Set to 1 if you have the sincosf function])])
AC_CHECK_LIB(m, feclearexcept, [AC_DEFINE(HAVE_FECLEAREXCEPT,1,[Set to 1 if you have the feclearexcept function])])
AC_CHECK_LIB(m, fpsetsticky, [AC_DEFINE(HAVE_FPSETSTICKY,1,[Set to 1 if you have the fpsetsticky function])])
JD_ELF_COMPILER
JD_IEEE_CFLAGS
ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
CFLAGS="$CFLAGS $IEEE_CFLAGS"
JD_SET_RPATH($libdir)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_TYPE(ptrdiff_t,long)
AC_TYPE_SIZE_T
AC_CHECK_SIZEOF(size_t)
JD_CHECK_LONG_LONG
JD_LARGE_FILE_SUPPORT
JD_TERMCAP
JD_GCC_WARNINGS
JD_SET_OBJ_SRC_DIR(src)
missingmodules=""
extramodules=""
JD_CHECK_FOR_LIBRARY(pcre)
if test $jd_with_pcre_library = yes
then
PCRE_MODULE="pcre-module.so"
AC_DEFINE(HAVE_PCRE_H,1,[Set to 1 if you have the pcre.h header])
extramodules="$extramodules pcre"
else
PCRE_MODULE=""
missingmodules="$missingmodules pcre"
fi
AC_SUBST(PCRE_MODULE)
JD_CHECK_FOR_LIBRARY(onig,oniguruma.h)
if test $jd_with_onig_library = yes
then
ONIG_MODULE="onig-module.so"
AC_DEFINE(HAVE_ONIGURUMA_H,1,[Set to 1 if you have the oniguruma.h header])
extramodules="$extramodules oniguruma"
else
ONIG_MODULE=""
missingmodules="$missingmodules oniguruma"
fi
AC_SUBST(ONIG_MODULE)
JD_CHECK_FOR_LIBRARY(png)
if test $jd_with_png_library = yes
then
PNG_MODULE="png-module.so"
AC_DEFINE(HAVE_PNG_H,1,[Set to 1 if you have the png.h header])
extramodules="$extramodules png"
else
PNG_MODULE=""
missingmodules="$missingmodules png"
fi
AC_SUBST(PNG_MODULE)
JD_CHECK_FOR_LIBRARY(z,zlib.h)
if test $jd_with_z_library = yes
then
ZLIB_MODULE="zlib-module.so"
AC_DEFINE(HAVE_ZLIB_H,1,[Set to 1 if you have the zlib.h header])
extramodules="$extramodules z"
else
ZLIB_MODULE=""
missingmodules="$missingmodules z"
fi
AC_SUBST(ZLIB_MODULE)
m4_include([./iconv.m4])
ICONV_MODULE=""
JD_CHECK_FOR_LIBRARY(iconv)
if test $jd_with_iconv_library = yes
then
ICONV_MODULE="iconv-module.so"
AC_DEFINE(HAVE_ICONV_H,1,[Set to 1 if you have the iconv.h header])
ICONV_LIB="$ICONV_LIB -liconv"
extramodules="$extramodules iconv"
else
SLANG_AM_ICONV
if test "$am_cv_func_iconv" = yes
then
ICONV_MODULE="iconv-module.so"
extramodules="$extramodules iconv"
if test "X$am_cv_lib_iconv" = Xyes
then
ICONV_LIB=$LIBICONV
ICONV_INC=""
fi
else
missingmodules="$missingmodules iconv"
fi
fi
AC_SUBST(ICONV_MODULE)
dnl # AC_SUBST(ICONV_LIB)
dnl # AC_SUBST(ICONV_INC)
AC_CHECK_FUNCS(sysconf, [
SYSCONF_MODULE="sysconf-module.so"
], [SYSCONF_MODULE=""])
AC_SUBST(SYSCONF_MODULE)
JD_GET_MODULES(src/modules.unx)