-# $Id: configure.in,v 1.161 2002/03/29 03:33:57 gerald Exp $
+# $Id: configure.in,v 1.174 2002/08/28 00:37:17 jmayer Exp $
dnl
dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that
AC_PREREQ(2.13)
-AM_INIT_AUTOMAKE(ethereal, 0.9.3)
+AM_INIT_AUTOMAKE(ethereal, 0.9.6)
dnl Check for CPU / vendor / OS
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
-AC_PROG_RANLIB
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
AC_PROG_YACC
AM_PROG_LEX
AC_PATH_PROG(PERL, perl)
AC_SUBST(HAVE_RPM)
#
-# If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add
-# '-D_U_="__attribute__((unused))"' as well, for future use when we
-# remove '-Wno-unused'.
+# If we're running gcc, add '-Wall -W' to CFLAGS, and add
+# '-D_U_="__attribute__((unused))"' as well, so we can use _U_ to
+# flag unused function arguments and not get warnings about them.
#
# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
# argument will compile with non-GCC compilers.
#
-AC_MSG_CHECKING(to see if we can add '-Wall -W -Wno-unused' to CFLAGS)
+AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS)
if test x$GCC != x ; then
- CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS"
+ CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W $CFLAGS"
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"
# Enable/disable tethereal
-GTK_OK=yes
-
AC_ARG_ENABLE(ethereal,
[ --enable-ethereal build GTK+-based ethereal. [default=yes]],,enable_ethereal=yes)
+AC_ARG_ENABLE(gtk2,
+[ --enable-gtk2 build Glib2/Gtk2+-based (t)ethereal. [default=no]],enable_gtk2=yes,enable_gtk2=no)
+
# GTK checks
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
# programs to be built with GTK+.
#
-if test "x$enable_ethereal" = "xyes" ; then
+if test "x$enable_gtk2" = "xyes" -a "x$enable_ethereal" = "xyes" ; then
+ GTK_OK=two
+ AM_PATH_GTK_2_0(2.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
+elif test "x$enable_gtk2" = "xno" -a "x$enable_ethereal" = "xyes" ; then
+ GTK_OK=one
AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
+else
+ GTK_OK=no
fi
# GLib checks
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
# programs to be built with GLib.
#
-if test "$GTK_OK" = "yes" -a "x$enable_ethereal" = "xyes" ; then
+if test "$GTK_OK" = "two" ; then
+ ethereal_bin="ethereal"
+ ethereal_man="ethereal.1"
+ ethereal_SUBDIRS="gtk" # <--- change to gtk2, if we can't use the same directory
+
+ # Ignore GLIB_CFLAGS
+ AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
+elif test "$GTK_OK" = "one" ; then
ethereal_bin="ethereal"
ethereal_man="ethereal.1"
ethereal_SUBDIRS="gtk"
ethereal_bin=""
ethereal_man=""
# Honor GLIB_CFLAGS
- AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
+ if test "x$enable_gtk2" = "xyes" ; then
+ AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
+ else
+ AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
+ fi
fi
#
fi
dnl zlib check
-AC_ARG_ENABLE(zlib,
-[ --enable-zlib use zlib to read compressed data. [default=yes]],,enable_zlib=yes)
-
AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
-if test "x$enable_zlib" = "xno" ; then
+
+AC_ARG_WITH(zlib,
+[ --with-zlib[=DIR] use zlib (located in directory DIR, if supplied) to read compressed data. [default=yes, if present]],
+[
+ if test $withval = no
+ then
+ want_zlib=no
+ elif test $withval = yes
+ then
+ want_zlib=yes
+ else
+ want_zlib=yes
+ zlib_dir=$withval
+ fi
+],[
+ #
+ # Use zlib if it's present, otherwise don't.
+ #
+ want_zlib=ifpresent
+ zlib_dir=
+])
+if test "x$want_zlib" = "xno" ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_ETHEREAL_ZLIB_CHECK
- if test "x$enable_zlib" = "xno" ; then
+ if test "x$want_zlib" = "xno" ; then
AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
fi
fi
ucdsnmp_dir=$withval
fi
],[
- #
- # For now, we default to *not* using the UCD SNMP library unless
- # the user explicitly asks for it, as the current release has
- # buffer-overflow vulnerabilities we can't avoid.
#
# Set "want_ucdsnmp" to "ifpresent" to make the default "use it
# if you find it, otherwise don't".
#
- want_ucdsnmp=no
+ want_ucdsnmp=ifpresent
ucdsnmp_dir=
])
dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.in
dnl
-PLUGIN_DIR="$libdir/ethereal/plugins/$VERSION"
+plugindir="$libdir/ethereal/plugins/$VERSION"
+PLUGIN_DIR="$plugindir"
AC_ARG_WITH(plugins,
[ --with-plugins[=DIR] support plugins (installed in DIR, if supplied).],
[
AC_DEFINE(PLUGIN_DIR,NULL)
fi
AC_SUBST(PLUGIN_DIR)
+AC_SUBST(plugindir)
dnl libtool defs
-AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
packaging/svr4/checkinstall
packaging/svr4/pkginfo
plugins/Makefile
+ plugins/docsis/Makefile
+ plugins/giop/Makefile
plugins/gryphon/Makefile
plugins/mgcp/Makefile
- plugins/giop/Makefile
tools/Makefile
tools/lemon/Makefile
,)
setuid_message="no"
fi
+if test "x$want_libz" = "no" ; then
+ zlib_message="no"
+else
+ zlib_message="yes"
+fi
+
if test "x$SNMP_LIBS" = "x" ; then
snmp_libs_message="no"
else
snmp_libs_message="yes"
fi
-
-
echo ""
echo "The Ethereal package has been configured with the following options."
echo " Build ethereal : $enable_ethereal"
echo " Install setuid : $setuid_message"
echo " Use plugins : $have_plugins"
echo " Use pcap library : $want_pcap"
-echo " Use zlib library : $enable_zlib"
+echo " Use zlib library : $zlib_message"
echo " Use IPv6 name resolution : $enable_ipv6"
echo " Use UCD SNMP library : $snmp_libs_message"