newsyslog Installation Instructions

Written by Russ Allbery <rra@stanford.edu>

Copyright 1997, 1998, 1999, 2000, 2002, 2004 Board of Trustees, Leland Stanford Jr. University. This software is distributed under an MIT-style license. Please see the file README for terms of use and redistribution.

This installation procedure is essentially the same as for any package that uses autoconf.

BASIC INSTALLATION

This package uses autoconf. This means that 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 and a config.h file 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 rra@stanford.edu so that 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. Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

    If you're building on a platform that has a shared zlib and you want to instead link zlib statically for whatever reason, pass the option --enable-static to ./configure. This has only been tested on Linux and Solaris.

  2. Type make to compile the package.

  3. Type make install to install the program.

  4. You can remove the program binary 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 maintclean target, but that is intended mainly for the package's developers. If you use it, you will need Autoconf 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

configure also takes other options that may be useful in unusual situations. To see a complete list of configure options, run:

    ./configure --help

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 .. (the parent directory).

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 newsyslog in /usr/local/bin. You can specify an installation prefix other than /usr/local by giving configure the option --prefix=PATH. Alternately, you can specify the installation directory itself with --bindir=PATH.

By default newsyslog will look for newsyslog.conf in the directory /usr/local/etc. You can again change the installation prefix with the option --prefix=PATH. Alternately, if you want to just change the directory newsyslog will look for its configuration file in, use the --sysconfdir=PATH option.

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.

TESTING

newsyslog does come with a test suite, mostly used for regression testing new versions during development, but also usable for sanity-checking a compile of newsyslog. Please note that it requires Perl, assumes newsyslog has been built with bzip2 functionality, and is much less portable than newsyslog itself.

To run the test suite, just run:

    make check

after compiling newsyslog. You will probably need to do this as root in order to get accurate results, since otherwise newsyslog won't be able to chown files.

Converted to XHTML by faq2html version 1.28