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 check' 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 that 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 the 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 the build process.


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

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 on/off 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 FORMAT_INDENT_WIDTH 3
This macro must be defined as a non-negative integer.
This macro specifies the number of spaces used to indent commands
that are formated and printed by the shell.

#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 opens a file that is not
directly used by normal commands, the file descriptor for the file is
chosen to be no less than the value of this macro.

#define ALIAS_LIST_MAX 30
This macro must be defined as a positive integer.
This macro specifies the maximum number of aliases that can be
expanded recursively.

#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 regardless of whether
this macro is defined or not.

#define FG_DONT_SAVE_TERMINAL 1
When a program that changes the terminal settings is invoked in the
background and later continued in the foreground by the "fg" command,
it may leave the terminal in the wrong settings. The "fg" command
works around this problem by saving the terminal settings before
continuing a program and restoring the settings after the program
has finished. Setting this macro to non-zero disables this workaround.

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