How to Build and Install Yash


A normal way to build and install Yash is:

  1. In your shell, `cd' to the directory containing this file.

  2. Type `sh configure' to run the configuration script. This script
     checks which features are available on your system and creates
     files to build Yash.

  3. Type `make' to build Yash.

  4. Optionally, type `make test' to check if Yash works right.

  5. Type `make install' to install yash. By default, Yash is installed
     at /usr/local/bin/yash.

The `configure' script chooses a compiler to compile Yash. The default
compiler command is `c99', which is a standard C compiler defined in
POSIX.

The `configure' script accepts following options, which affect the
way Yash is built and installed:

  --debug
          Lower the optimization level of the compiler to make it easy
          to debug Yash. Available only when using GCC.
  --no-undefined
          Inhibit any operation whose result is not defined in the
          standards.

  --bindir=DIR
          Install Yash in DIR, rather than /usr/local/bin.

  --enable-X, --disable-X
          Enable or disable the feature X, where X is the name of a
          feature. Type `./configure --help' for the list of available
          features that can be specified as X.

Following environment variables override `configure' script's choices:

  CC
          The name of Compiler/linker.
  CFLAGS
          Options given to the compiler.
  LDFLAGS
          Options given to the linker.
  INSTALL_PROGRAM
          The name of the installer.

Following environment variables affect `configure' script's choices:

  CADDS
          Additional options given to the compiler.
  LDADDS, LIBS
          Additional options given to the linker.

Type `./configure --help' to see a brief instruction of `configure'.


Typing `make uninstall' uninstalls the program.
Typing `make clean' deletes object files and executables.
Typing `make distclean' deletes any files that are made by `configure'
and during build.


======================================================================

Below is a list of preprocessor macros that are recognized during
compilation. These macros can be additionally defined by hand in
"config.h" for further configuration.
To enable an option, define the corresponding macro as a non-zero
integer. To disable, define the macro as zero or leave it undefined.
The list below does not contain macros that are set by the `configure'
script.

#define DOUBLE_DIVISION_BY_ZERO_ERROR 1
When this macro is set to non-zero, division by zero in floating-point
arithmetic is treated as an error. Otherwise, division by zero is
assumed to return a valid result (like infinity).

#define YASH_DISABLE_SUPERUSER
When this macro is set to non-zero, the user whose UID is zero is not
treated as the superuser, who is otherwise considered to have
special privilege about file access.

#define SHELLFDMINMAX 100
This macro must be defined as an integer no less than 10 and the
default value for it is 100. When the shell needs to open a file to
read/write the history file, etc., it tries to make the file
descriptor for the file around the value of this macro.

#define FIXED_SIGNAL_AS_ERROR 1
This macro changes the behavior of the "trap" command in a non-
interactive shell which tries to change a signal handler which has
been set to "ignore the signal" when the shell is invoked.
If this macro is set to non-zero, the "trap" command results in an
error. Otherwise, the command returns the exit status of success.
Note that the signal handler is not changed in such cases whether
this macro is defined or not.

#define HISTORY_REFRESH_INTERVAL 100
This macro specifies the interval the shell refreshes the history
file. The file is refreshed every time the shell executes as many
commands as this number.
