Blame INSTALL

Packit fcad23
TABLE OF CONTENTS
Packit fcad23
=================
Packit fcad23
Packit fcad23
  Table Of Contents
Packit fcad23
  Quick Instructions
Packit fcad23
* Net-SNMP Specific Information
Packit fcad23
  Long (but you should read these) Instructions
Packit fcad23
  Installing the Perl/SNMP Module
Packit fcad23
* Compilers and Options
Packit fcad23
  Compiling For Multiple Architectures
Packit fcad23
  Installation Names
Packit fcad23
  Optional Features
Packit fcad23
  Sharing Defaults
Packit fcad23
  Operation Controls
Packit fcad23
Packit fcad23
  * = required reading
Packit fcad23
Packit fcad23
QUICK INSTRUCTIONS
Packit fcad23
==================
Packit fcad23
Packit fcad23
  1) Run ./configure
Packit fcad23
     (type "./configure --help" for a quick usage summary.)
Packit fcad23
     (--prefix=PATH will change the default /usr/local installation path.)
Packit fcad23
     (see "Compilers and Options" on changing the compiler to use)
Packit fcad23
Packit fcad23
  2) Optionally edit include/net-snmp/net-snmp-config.h
Packit fcad23
     (due to prompting done by the configure script, this is very rarely
Packit fcad23
      necessary.)
Packit fcad23
Packit fcad23
  3) make
Packit fcad23
Packit fcad23
  4) Run the next command as root:
Packit fcad23
  5) make install
Packit fcad23
Packit fcad23
  6) configure the agent
Packit fcad23
     (either using 'snmpconf' or by crafting an snmpd.conf file manually.
Packit fcad23
      The file 'EXAMPLE.conf' may be a suitable starting point)
Packit fcad23
Packit fcad23
Note: By default, everything will be installed in /usr/local.
Packit fcad23
      (see below for more instructions)
Packit fcad23
Packit fcad23
Net-SNMP Specific Information
Packit fcad23
=============================
Packit fcad23
Packit fcad23
As of UCD-SNMP V3.3.1 the configuration files are now looked for in
Packit fcad23
$(prefix)/share/snmp, where ($prefix) is defined as the value passed
Packit fcad23
to the --prefix argument of the configure script, or /usr/local if
Packit fcad23
undefined.  In version 3.0.3 till 3.3, the files were kept in
Packit fcad23
$(prefix)/lib/snmp
Packit fcad23
Packit fcad23
Optional features to pass to configure for Net-SNMP can be obtained by
Packit fcad23
running configure --help.
Packit fcad23
Packit fcad23
LONG (but you should read these) INSTRUCTIONS
Packit fcad23
=============================================
Packit fcad23
Packit fcad23
   The `configure' shell script attempts to guess correct values for
Packit fcad23
various system-dependent variables used during compilation.  It uses
Packit fcad23
those values to create a `Makefile' in each directory of the package.
Packit fcad23
It may also create one or more `.h' files containing system-dependent
Packit fcad23
definitions.  Finally, it creates a shell script `config.status' that
Packit fcad23
you can run in the future to recreate the current configuration, a file
Packit fcad23
`config.cache' that saves the results of its tests to speed up
Packit fcad23
reconfiguring, a file `config.log' containing compiler output
Packit fcad23
(useful mainly for debugging `configure') and a file `configure-summary'
Packit fcad23
containing the summary displayed at the end of the `configure' run.
Packit fcad23
Packit fcad23
   The file `include/net-snmp/net-snmp-config.h' is also generated
Packit fcad23
at this time.  It contains IMPORTANT information such as the location
Packit fcad23
of log and configuration files.  In some special cases you may need to
Packit fcad23
modify this file but it is prefererable to work out a way of getting
Packit fcad23
`configure' to set things up for your particular environment.
Packit fcad23
Packit fcad23
As the `configure' invocation often gets lengthy and difficult to
Packit fcad23
type or if you have several different ways you want to configure a
Packit fcad23
system, you may want to create a shell script containing your invocation.
Packit fcad23
Packit fcad23
   If you need to do unusual things to compile the package, please try
Packit fcad23
to figure out how `configure' could check whether to do them, and mail
Packit fcad23
diffs or instructions to the address given in the `README' so they can
Packit fcad23
be considered for the next release.  If at some point `config.cache'
Packit fcad23
contains results you don't want to keep, you may remove or edit it.
Packit fcad23
Packit fcad23
   The file `configure.in' is used to create `configure' by a program
Packit fcad23
called `autoconf'.  You only need `configure.in' if you want to change
Packit fcad23
it or regenerate `configure' using a newer version of `autoconf'.
Packit fcad23
Packit fcad23
The simplest way to compile this package is:
Packit fcad23
Packit fcad23
  1. `cd' to the directory containing the package's source code and type
Packit fcad23
     `./configure' to configure the package for your system.  If you're
Packit fcad23
     using `csh' on an old version of System V, you might need to type
Packit fcad23
     `sh ./configure' instead to prevent `csh' from trying to execute
Packit fcad23
     `configure' itself.
Packit fcad23
Packit fcad23
     Running `configure' takes awhile.  While running, it prints some
Packit fcad23
     messages telling which features it is checking for.  When it
Packit fcad23
     completes it prints a short message (also available in configure-summary)
Packit fcad23
     indicating what functionality will be available when compiled.
Packit fcad23
Packit fcad23
  2. If necessary, edit include/net-snmp/net-snmp-config.h (see above).  
Packit fcad23
Packit fcad23
  3. Type `make' to compile the package.
Packit fcad23
Packit fcad23
  4. Type `make test' which runs a variety of tests to see what functionality
Packit fcad23
     has been incorporated and if it works.
Packit fcad23
Packit fcad23
  5. Type `make install' to install the programs and any data files and
Packit fcad23
     documentation.
Packit fcad23
Packit fcad23
  6. You can remove the program binaries and object files from the
Packit fcad23
     source code directory by typing `make clean'.  To also remove the
Packit fcad23
     files that `configure' created (so you can compile the package for
Packit fcad23
     a different kind of computer), type `make distclean'.
Packit fcad23
Packit fcad23
  7. You can remove the application (but not the perl or python modules)
Packit fcad23
     by typing `make uninstall'.
Packit fcad23
Packit fcad23
There may be additional installation issues discussed in the 
Packit fcad23
README's for various platforms such as README.solaris.
Packit fcad23
Packit fcad23
Packit fcad23
Installing the Perl/SNMP Module
Packit fcad23
===============================
Packit fcad23
Packit fcad23
   The Perl/SNMP Module is now bundled with the net-snmp package
Packit fcad23
(which includes other Net-SNMP specific modules as well), all of which
Packit fcad23
are located in the net-snmp/perl directory. The Perl package provides
Packit fcad23
a high level abstract interface to the functionality found in the
Packit fcad23
Net-SNMP libraries and demon applications.
Packit fcad23
Packit fcad23
   It is recommended you install the perl modules as you build the
Packit fcad23
   Net-SNMP package.  The configure script can be run as follows to
Packit fcad23
   automatically find perl and use it to install the perl modules:
Packit fcad23
Packit fcad23
      ./configure --with-perl-modules
Packit fcad23
Packit fcad23
   If you wish to use the embedded perl support available in the
Packit fcad23
   Net-SNMP agent (and starting in Net-SNMP 5.2, the trap receiver),
Packit fcad23
   then use the following option instead:
Packit fcad23
Packit fcad23
      ./configure --enable-embedded-perl --enable-shared
Packit fcad23
Packit fcad23
   Starting with Net-SNMP 5.4, configure enables embedded Perl and the 
Packit fcad23
   Perl modules by default when possible unless explicitly disabled.
Packit fcad23
Packit fcad23
   If you wish to build the perl modules by hand, *install Net-SNMP
Packit fcad23
   first* and then change directories to the perl subdirectory and:
Packit fcad23
Packit fcad23
   Run:
Packit fcad23
            cd perl
Packit fcad23
            perl Makefile.PL
Packit fcad23
            make
Packit fcad23
            make test
Packit fcad23
            make install (as root)
Packit fcad23
Packit fcad23
Packit fcad23
Compilers and Options
Packit fcad23
=====================
Packit fcad23
Packit fcad23
   Some systems require unusual options for compilation or linking that
Packit fcad23
the `configure' script does not know about.  You can give `configure'
Packit fcad23
initial values for variables by setting them in the environment.  Using
Packit fcad23
a Bourne-compatible shell, you can do that on the command line like
Packit fcad23
this:
Packit fcad23
     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Packit fcad23
Packit fcad23
Or on systems that have the `env' program, you can do it like this:
Packit fcad23
     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Packit fcad23
Packit fcad23
Compiling For Multiple Architectures
Packit fcad23
====================================
Packit fcad23
Packit fcad23
   You can compile the package for more than one kind of computer at the
Packit fcad23
same time, by placing the object files for each architecture in their
Packit fcad23
own directory.  To do this, you must use a version of `make' that
Packit fcad23
supports the `VPATH' variable, such as GNU `make'.  `cd' to the
Packit fcad23
directory where you want the object files and executables to go and run
Packit fcad23
the `configure' script.  `configure' automatically checks for the
Packit fcad23
source code in the directory that `configure' is in and in `..'.
Packit fcad23
Packit fcad23
   If you have to use a `make' that does not supports the `VPATH'
Packit fcad23
variable, there is a `maketarget' script that will generate a symlink'ed
Packit fcad23
shadow-directory for the object files. Do a `sh maketarget', then `cd' into
Packit fcad23
targets/`config.guess` and do the configuration and installation.
Packit fcad23
Packit fcad23
Installation Names
Packit fcad23
==================
Packit fcad23
Packit fcad23
   By default, `make install' will install the package's files in
Packit fcad23
`/usr/local/bin', `/usr/local/man', etc.  You can specify an
Packit fcad23
installation prefix other than `/usr/local' by giving `configure' the
Packit fcad23
option `--prefix=PATH'.
Packit fcad23
Packit fcad23
   You can specify separate installation prefixes for
Packit fcad23
architecture-specific files and architecture-independent files.  If you
Packit fcad23
give `configure' the option `--exec-prefix=PATH', the package will use
Packit fcad23
PATH as the prefix for installing programs and libraries.
Packit fcad23
Documentation and other data files will still use the regular prefix.
Packit fcad23
Packit fcad23
   If the package supports it, you can cause programs to be installed
Packit fcad23
with an extra prefix or suffix on their names by giving `configure' the
Packit fcad23
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Packit fcad23
Packit fcad23
Optional Features
Packit fcad23
=================
Packit fcad23
Packit fcad23
   Some packages pay attention to `--enable-FEATURE' options to
Packit fcad23
`configure', where FEATURE indicates an optional part of the package.
Packit fcad23
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
Packit fcad23
is something like `gnu-as' or `x' (for the X Window System).  The
Packit fcad23
`README' should mention any `--enable-' and `--with-' options that the
Packit fcad23
package recognizes.
Packit fcad23
Packit fcad23
   For packages that use the X Window System, `configure' can usually
Packit fcad23
find the X include and library files automatically, but if it doesn't,
Packit fcad23
you can use the `configure' options `--x-includes=DIR' and
Packit fcad23
`--x-libraries=DIR' to specify their locations.
Packit fcad23
Packit fcad23
Specifying the System Type
Packit fcad23
==========================
Packit fcad23
Packit fcad23
   There may be some features `configure' can not figure out
Packit fcad23
automatically, but needs to determine by the type of host the package
Packit fcad23
will run on.  Usually `configure' can figure that out, but if it prints
Packit fcad23
a message saying it can not guess the host type, give it the
Packit fcad23
`--host=TYPE' option.  TYPE can either be a short name for the system
Packit fcad23
type, such as `sun4', or a canonical name with three fields:
Packit fcad23
     CPU-COMPANY-SYSTEM
Packit fcad23
Packit fcad23
See the file `config.sub' for the possible values of each field.  If
Packit fcad23
`config.sub' isn't included in this package, then this package doesn't
Packit fcad23
need to know the host type.
Packit fcad23
Packit fcad23
   If you are building compiler tools for cross-compiling, you can also
Packit fcad23
use the `--target=TYPE' option to select the type of system they will
Packit fcad23
produce code for and the `--build=TYPE' option to select the type of
Packit fcad23
system on which you are compiling the package.
Packit fcad23
Packit fcad23
Sharing Defaults
Packit fcad23
================
Packit fcad23
Packit fcad23
   If you want to set default values for `configure' scripts to share,
Packit fcad23
you can create a site shell script called `config.site' that gives
Packit fcad23
default values for variables like `CC', `cache_file', and `prefix'.
Packit fcad23
`configure' looks for `PREFIX/share/config.site' if it exists, then
Packit fcad23
`PREFIX/etc/config.site' if it exists.  Or, you can set the
Packit fcad23
`CONFIG_SITE' environment variable to the location of the site script.
Packit fcad23
A warning: not all `configure' scripts look for a site script.
Packit fcad23
Packit fcad23
Operation Controls
Packit fcad23
==================
Packit fcad23
Packit fcad23
   `configure' recognizes the following options to control how it
Packit fcad23
operates.
Packit fcad23
Packit fcad23
`--cache-file=FILE'
Packit fcad23
     Use and save the results of the tests in FILE instead of
Packit fcad23
     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
Packit fcad23
     debugging `configure'.
Packit fcad23
Packit fcad23
`--help'
Packit fcad23
     Print a summary of the options to `configure', and exit.
Packit fcad23
Packit fcad23
`--quiet'
Packit fcad23
`--silent'
Packit fcad23
`-q'
Packit fcad23
     Do not print messages saying which checks are being made.
Packit fcad23
Packit fcad23
`--srcdir=DIR'
Packit fcad23
     Look for the package's source code in directory DIR.  Usually
Packit fcad23
     `configure' can determine that directory automatically.
Packit fcad23
Packit fcad23
`--version'
Packit fcad23
     Print the version of Autoconf used to generate the `configure'
Packit fcad23
     script, and exit.
Packit fcad23
Packit fcad23
`configure' also accepts some other, not widely useful, options.
Packit fcad23