6 * Net-SNMP Specific Information
7 Long (but you should read these) Instructions
8 Installing the Perl/SNMP Module
9 * Compilers and Options
10 Compiling For Multiple Architectures
22 (type "./configure --help" for a quick usage summary.)
23 (--prefix=PATH will change the default /usr/local installation path.)
24 (see "Compilers and Options" on changing the compiler to use)
26 2) Optionally edit include/net-snmp/net-snmp-config.h
27 (due to prompting done by the configure script, this is very rarely
32 4) Run the next command as root:
35 6) configure the agent
36 (either using 'snmpconf' or by crafting an snmpd.conf file manually.
37 The file 'EXAMPLE.conf' may be a suitable starting point)
39 Note: By default, everything will be installed in /usr/local.
40 (see below for more instructions)
42 Net-SNMP Specific Information
43 =============================
45 As of UCD-SNMP V3.3.1 the configuration files are now looked for in
46 $(prefix)/share/snmp, where ($prefix) is defined as the value passed
47 to the --prefix argument of the configure script, or /usr/local if
48 undefined. In version 3.0.3 till 3.3, the files were kept in
51 Optional features to pass to configure for Net-SNMP can be obtained by
52 running configure --help.
54 LONG (but you should read these) INSTRUCTIONS
55 =============================================
57 The `configure' shell script attempts to guess correct values for
58 various system-dependent variables used during compilation. It uses
59 those values to create a `Makefile' in each directory of the package.
60 It may also create one or more `.h' files containing system-dependent
61 definitions. Finally, it creates a shell script `config.status' that
62 you can run in the future to recreate the current configuration, a file
63 `config.cache' that saves the results of its tests to speed up
64 reconfiguring, a file `config.log' containing compiler output
65 (useful mainly for debugging `configure') and a file `configure-summary'
66 containing the summary displayed at the end of the `configure' run.
68 The file `include/net-snmp/net-snmp-config.h' is also generated
69 at this time. It contains IMPORTANT information such as the location
70 of log and configuration files. In some special cases you may need to
71 modify this file but it is prefererable to work out a way of getting
72 `configure' to set things up for your particular environment.
74 As the `configure' invocation often gets lengthy and difficult to
75 type or if you have several different ways you want to configure a
76 system, you may want to create a shell script containing your invocation.
78 If you need to do unusual things to compile the package, please try
79 to figure out how `configure' could check whether to do them, and mail
80 diffs or instructions to the address given in the `README' so they can
81 be considered for the next release. If at some point `config.cache'
82 contains results you don't want to keep, you may remove or edit it.
84 The file `configure.in' is used to create `configure' by a program
85 called `autoconf'. You only need `configure.in' if you want to change
86 it or regenerate `configure' using a newer version of `autoconf'.
88 The simplest way to compile this package is:
90 1. `cd' to the directory containing the package's source code and type
91 `./configure' to configure the package for your system. If you're
92 using `csh' on an old version of System V, you might need to type
93 `sh ./configure' instead to prevent `csh' from trying to execute
96 Running `configure' takes awhile. While running, it prints some
97 messages telling which features it is checking for. When it
98 completes it prints a short message (also available in configure-summary)
99 indicating what functionality will be available when compiled.
101 2. If necessary, edit include/net-snmp/net-snmp-config.h (see above).
103 3. Type `make' to compile the package.
105 4. Type `make test' which runs a variety of tests to see what functionality
106 has been incorporated and if it works.
108 5. Type `make install' to install the programs and any data files and
111 6. You can remove the program binaries and object files from the
112 source code directory by typing `make clean'. To also remove the
113 files that `configure' created (so you can compile the package for
114 a different kind of computer), type `make distclean'.
116 7. You can remove the application by typing `make uninstall'.
118 There may be additional installation issues discussed in the
119 README's for various platforms such as README.solaris.
122 Installing the Perl/SNMP Module
123 ===============================
125 The Perl/SNMP Module is now bundled with the net-snmp package
126 (which includes other Net-SNMP specific modules as well), all of which
127 are located in the net-snmp/perl directory. The Perl package provides
128 a high level abstract interface to the functionality found in the
129 Net-SNMP libraries and demon applications.
131 It is recommended you install the perl modules as you build the
132 Net-SNMP package. The configure script can be run as follows to
133 automatically find perl and use it to install the perl modules:
135 ./configure --with-perl-modules
137 If you wish to use the embedded perl support available in the
138 Net-SNMP agent (and starting in Net-SNMP 5.2, the trap receiver),
139 then use the following option instead:
141 ./configure --enable-embedded-perl --enable-shared
143 Starting with Net-SNMP 5.4, configure enables embedded Perl and the
144 Perl modules by default when possible unless explicitly disabled.
146 If you wish to build the perl modules by hand, *install Net-SNMP
147 first* and then change directories to the perl subdirectory and:
154 make install (as root)
157 Compilers and Options
158 =====================
160 Some systems require unusual options for compilation or linking that
161 the `configure' script does not know about. You can give `configure'
162 initial values for variables by setting them in the environment. Using
163 a Bourne-compatible shell, you can do that on the command line like
165 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
167 Or on systems that have the `env' program, you can do it like this:
168 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
170 Compiling For Multiple Architectures
171 ====================================
173 You can compile the package for more than one kind of computer at the
174 same time, by placing the object files for each architecture in their
175 own directory. To do this, you must use a version of `make' that
176 supports the `VPATH' variable, such as GNU `make'. `cd' to the
177 directory where you want the object files and executables to go and run
178 the `configure' script. `configure' automatically checks for the
179 source code in the directory that `configure' is in and in `..'.
181 If you have to use a `make' that does not supports the `VPATH'
182 variable, there is a `maketarget' script that will generate a symlink'ed
183 shadow-directory for the object files. Do a `sh maketarget', then `cd' into
184 targets/`config.guess` and do the configuration and installation.
189 By default, `make install' will install the package's files in
190 `/usr/local/bin', `/usr/local/man', etc. You can specify an
191 installation prefix other than `/usr/local' by giving `configure' the
192 option `--prefix=PATH'.
194 You can specify separate installation prefixes for
195 architecture-specific files and architecture-independent files. If you
196 give `configure' the option `--exec-prefix=PATH', the package will use
197 PATH as the prefix for installing programs and libraries.
198 Documentation and other data files will still use the regular prefix.
200 If the package supports it, you can cause programs to be installed
201 with an extra prefix or suffix on their names by giving `configure' the
202 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
207 Some packages pay attention to `--enable-FEATURE' options to
208 `configure', where FEATURE indicates an optional part of the package.
209 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
210 is something like `gnu-as' or `x' (for the X Window System). The
211 `README' should mention any `--enable-' and `--with-' options that the
214 For packages that use the X Window System, `configure' can usually
215 find the X include and library files automatically, but if it doesn't,
216 you can use the `configure' options `--x-includes=DIR' and
217 `--x-libraries=DIR' to specify their locations.
219 Specifying the System Type
220 ==========================
222 There may be some features `configure' can not figure out
223 automatically, but needs to determine by the type of host the package
224 will run on. Usually `configure' can figure that out, but if it prints
225 a message saying it can not guess the host type, give it the
226 `--host=TYPE' option. TYPE can either be a short name for the system
227 type, such as `sun4', or a canonical name with three fields:
230 See the file `config.sub' for the possible values of each field. If
231 `config.sub' isn't included in this package, then this package doesn't
232 need to know the host type.
234 If you are building compiler tools for cross-compiling, you can also
235 use the `--target=TYPE' option to select the type of system they will
236 produce code for and the `--build=TYPE' option to select the type of
237 system on which you are compiling the package.
242 If you want to set default values for `configure' scripts to share,
243 you can create a site shell script called `config.site' that gives
244 default values for variables like `CC', `cache_file', and `prefix'.
245 `configure' looks for `PREFIX/share/config.site' if it exists, then
246 `PREFIX/etc/config.site' if it exists. Or, you can set the
247 `CONFIG_SITE' environment variable to the location of the site script.
248 A warning: not all `configure' scripts look for a site script.
253 `configure' recognizes the following options to control how it
257 Use and save the results of the tests in FILE instead of
258 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
259 debugging `configure'.
262 Print a summary of the options to `configure', and exit.
267 Do not print messages saying which checks are being made.
270 Look for the package's source code in directory DIR. Usually
271 `configure' can determine that directory automatically.
274 Print the version of Autoconf used to generate the `configure'
277 `configure' also accepts some other, not widely useful, options.