This chapter explains how to build libnetdude, what parts of libnetdude end up where on your system when you install it, and how to build other programs that use libnetdude.
Building libnetdude will hopefully be easy. libnetdude has two dependencies, make sure these are installed before you try to build your copy:
glib, version 1.2.10 or higher. Download it from gtk.org or just grab an RPM/DEB for it. Do not forget the development packages if your distibution uses those, since you will need the header files during the build process.
libpcapnav, downloadable from netdude.sf.net.
The build itself is made using the common ./configure && make && make install sequence. Check ./configure --help for a list of available options, particularly the --with-pcapnav... options to specify a libpcapnav that's installed in an unusual location.
The installation places files in the following locations (the full path depends on what --prefix option you passed to configure. The default value is /usr/local):
$prefix/lib/: the core library, in static and dynamic linking versions (unless disabled at configuration time).
$prefix/include/libnetdude/VERSION: header files of the core library.
$prefix/include/libnetdude/VERSION/protocols: protocol plugins that are part of the core distribution. core library.
$prefix/include/libnetdude/VERSION/protocols: header files of protocol plugins that are part of the core distribution.
$prefix/include/libnetdude/VERSION/plugins: header files of feature plugins that are part of the core distribution.
$prefix/share/libnetdude/VERSION/protocols: DLLs of protocol plugins that are part of the core distribution.
$prefix/share/libnetdude/VERSION/plugins: DLLs of feature plugins that are part of the core distribution.
$prefix/bin: the libnetdude-config script.
If you are using the autoconf/automake tools to configure your package, consider using the following check to detect libnetdude:
dnl ################################################## dnl # Check for libnetdude dnl ################################################## AC_ARG_WITH(libnetdude, AC_HELP_STRING([--with-libnetdude-config=DIR], [Use given libnetdude-config]), [ LIBNETDUDE_LIBS=`$withval --libs` LIBNETDUDE_CFLAGS=`$withval --cflags` libndcfg="$withval" ], [ AC_PATH_GENERIC(libnetdude,, libndcfg="libnetdude-config", AC_MSG_ERROR(Cannot find libnetdude: Is libnetdude-config in path?)) ]) AC_SUBST(LIBNETDUDE_LIBS) AC_SUBST(LIBNETDUDE_CFLAGS) |
![]() | Using the output of libnetdude-config provides all the compiler/linker flags you need to pull in the dependencies (libpcapnav and glib). You do not need to add extra checks and flags for those in your build scripts. |