Build System

From Net-SNMP Wiki
Revision as of 06:50, 22 October 2010 by Bart.vanassche (Talk | contribs) (Tool Versions)

Jump to: navigation, search


For Users

Unix

 ./configure [options, see "configure --help" for a list]
 make
 make test
 su
 make install

The same procedure applies to builds with Cygwin on Windows.
See README.* for important notes for particular platforms.

Windows

There are several ways to build on Windows:

  • MS Visual C++
  • MinGW / MSYS
  • Cygwin (see "Unix" above)

See Build_System/Windows for the status of compiling with the various Windows environments.

See Build_System/Windows_features for a comparison of the features implemented in each of the Windows build environments.

See README.win32 for further details.

For Coders

Tool Versions

Versions Autoconf Automake Libtool
Trunk (5.7-to-be) autoconf 2.68 automake 1.11 libtool 2.4 + patch (see below)
5.6 autoconf 2.63 automake 1.11 libtool 2.2.6a
5.5 autoconf 2.63 automake 1.10.1 libtool 2.2.6a
5.4.2+ autoconf 2.59 automake 1.10.1 libtool 1.5.26
5.4/5.4.1 autoconf 2.59 automake (which version ?) libtool 1.5.24
earlier autoconf 2.59 automake (which version ?) libtool 1.5.22

Files

  • configure: auto-generated by autoconf from configure.in and acinclude.m4 (branches) or configure.ac, configure.d/* and m4/* (trunk)
  • configure.in (5.4.x and earlier) or configure.ac and configure.d/* (trunk): major source file to implement configure magic. Run autoconf and autoheader after any change. New definitions may need to be copied to win32/net-snmp/net-snmp-config.h[.in].
  • acconfig.h: autoconf variable definitions, descriptions and default values. Deprecated (for new definitions) in favor of AC_DEFINE() in configure.in / configure.d/*. Run autoheader after any change. New definitions may need to be copied to win32/net-snmp/net-snmp-config.h[.in].
  • acinclude.m4 (branches) or m4/ac* and m4/netsnmp* (trunk): Net-SNMP specific autoconf macros. Run autoconf after any change.
  • include/net-snmp/net-snmp-config.h: auto-generated by autoheader from configure.in/configure.ac and acconfig.h
  • ltmain.sh: copied from libtool (created/updated by libtoolize --copy --force)
  • aclocal.m4: contains includes of all used files in m4/*(created/updated by aclocal)
  • config.guess, config.sub: platform detection shell script (created/updated by libtoolize --copy --force; from GNU config project)
  • win32/net-snmp/net-snmp-config.h.in: used by win32/Configure to create win32/net-snmp/net-snmp-config.h
  • win32/net-snmp/net-snmp-config.h: definitions for Win32 (non-Cygwin) builds
  • win32/lib*/lib*.def: public/exported symbols/functions from Net-SNMP libraries for Win32 builds. If you introduce new public functions, please also add them here!
  • Makefile.in (also in most sub-directories): source for Makefile (the latter being generated by configure by substituting autoconf definitions and concatenating with Makefile.top and Makefile.rules)
  • net-snmp-config.in: source for net-snmp-config (the latter being generated by configure)
  • sedscript.in: source for sedscript (the latter being generated by configure)

Updating

Assuming that you have changed any of the above and have the right tool versions installed - in order to update all the generated files you can do either

 aclocal -I m4
 libtoolize --copy
 autoconf
 autoheader

or

 autoreconf -i

but in the later case you must make sure that the tool versions that autoreconf calls are the correct ones.