dnl AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(wireshark, 0.99.7)
+AM_INIT_AUTOMAKE(wireshark, 0.99.8)
AM_DISABLE_STATIC
AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
+AC_PATH_PROG(PERL, perl)
AC_PROG_YACC
+AC_PATH_PROG(YACCDUMMY, $YACC)
+if test "x$YACCDUMMY" = x
+then
+ AC_MSG_ERROR(I couldn't find yacc (or bison or ...); make sure it's installed and in your path)
+fi
AM_PROG_LEX
-AC_PATH_PROG(PERL, perl)
+AC_PATH_PROG(LEXDUMMY, $LEX)
+if test "x$LEXDUMMY" = x
+then
+ AC_MSG_ERROR(I couldn't find (f)lex; make sure it's installed and in your path)
+fi
AC_PATH_PROG(POD2MAN, pod2man)
if test "x$POD2MAN" = x
then
# libsmi
# FIXME: currently the path argument to with-libsmi is being ignored
-libsmi="no"
-AC_ARG_WITH([libsmi],
- AC_HELP_STRING( [--with-libsmi=@<:@yes/no@:>@],
- [use smi library @<:@default=yes@:>@]),
- with_libsmi="$withval", with_libsmi="yes")
-if test "x$with_libsmi" = "xyes"; then
- AM_PATH_LIBSMI
- AM_CONDITIONAL(HAVE_SMI, test "x$with_libsmi" = "xyes")
-fi
+AX_LIBSMI
# Check for xsltproc
AC_PATH_PROG(XSLTPROC, xsltproc)
if test $enableval != no
then
AC_WIRESHARK_GCC_CFLAGS_CHECK(-pedantic)
+ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Woverflow)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-long-long)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wbad-function-cast)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-qual)
+ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshorten-64-to-32)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wendif-labels)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpointer-arith)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
#
# If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
# This barrier is set for a very large part of the code. However, it is
# typically not set for "generated" code (lex, ans2wrs, idl2wrs, ...)
#
+warnings_as_errors_default="yes"
AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
AC_ARG_ENABLE(warnings-as-errors,
AC_HELP_STRING( [--enable-warnings-as-errors],
AC_MSG_RESULT(no)
fi
],
- if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x"; then
+ if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
#
# Arrange that we search for header files in the source directory
# and in its "wiretap" subdirectory, as well as in "/usr/local/include",
- # as various packages we use ("libpcap", "zlib", an SNMP library)
+ # as various packages we use ("libpcap", "zlib", "adns", "pcre")
# may have been installed under "/usr/local/include".
#
CFLAGS="$CFLAGS -I/usr/local/include"
AC_SUBST(dumpcap_bin)
AC_SUBST(dumpcap_man)
+dnl pcap remote check
+AC_MSG_CHECKING(whether to use libpcap remote capturing feature)
+
+AC_ARG_WITH(pcap-remote,
+[ --with-pcap-remote use libpcap remote capturing (requires libpcap)],
+[
+ if test $withval = no
+ then
+ want_pcap_remote=no
+ else
+ want_pcap_remote=yes
+ fi
+],[
+ want_pcap_remote=no
+])
+if test "x$want_pcap_remote" = "xno" -o "x$want_pcap" = "xno" ; then
+ AC_MSG_RESULT(no)
+else
+ AC_MSG_RESULT(yes)
+ AC_WIRESHARK_PCAP_REMOTE_CHECK
+fi
+
dnl zlib check
AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
fi
-dnl Check if wireshark should be installed setuid
+dnl Check if dumpcap should be installed setuid
AC_ARG_ENABLE(setuid-install,
AC_HELP_STRING( [--enable-setuid-install],
- [install tshark and dumpcap as setuid @<:@default=no@:>@]),
+ [install dumpcap as setuid @<:@default=no@:>@]),
enable_setuid_install=$enableval,enable_setuid_install=no)
-AC_MSG_CHECKING(whether to install tshark and dumpcap setuid)
+AC_MSG_CHECKING(whether to install dumpcap setuid)
if test "x$enable_setuid_install" = "xno" ; then
AC_MSG_RESULT(no)
else
if test "x$enable_dumpcap" = "xno" ; then
- AC_MSG_ERROR(Setuid install works only with --enable-dumpcap, but dumpcap disabled)
+ AC_MSG_ERROR(Setuid install works only with --enable-dumpcap, but dumpcap is disabled)
else
AC_MSG_RESULT(yes)
fi
AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
+dnl libcap (not libpcap) check
+LIBCAP_LIBS=''
+AC_MSG_CHECKING(whether to use the libcap capabilities library)
+
+AC_ARG_WITH(libcap,
+ AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@],
+ [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management. @<:@default=yes, if present@:>@]),
+[
+if test "x$withval" = "xno"; then
+ want_libcap=no
+elif test "x$withval" = "xyes"; then
+ want_libcap=yes
+elif test -d "$withval"; then
+ want_libcap=yes
+ AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+fi
+])
+if test "x$with_libcap" = "xno" ; then
+ AC_MSG_RESULT(no)
+else
+ AC_MSG_RESULT(yes)
+ AC_WIRESHARK_LIBCAP_CHECK
+fi
+AC_SUBST(LIBCAP_LIBS)
+
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
AC_SUBST(MKSTEMP_C)
AC_SUBST(MKSTEMP_O)
+ac_save_LIBS="$LIBS"
+LIBS="$GLIB_LIBS $LIBS"
+G_ASCII_STRCASECMP_C=""
+G_ASCII_STRCASECMP_O=""
+G_ASCII_STRCASECMP_LO=""
+AC_CHECK_FUNC(g_ascii_strcasecmp,
+ [G_ASCII_STRCASECMP_O=""
+ G_ASCII_STRCASECMP_LO=""],
+ [G_ASCII_STRCASECMP_O="g_ascii_strcasecmp.o"
+ G_ASCII_STRCASECMP_LO="g_ascii_strcasecmp.lo"
+ AC_DEFINE(NEED_G_ASCII_STRCASECMP_H, 1, [Define if g_ascii_strcasecmp.h needs to be included])
+])
+LIBS="$ac_save_LIBS"
+if test "$ac_cv_func_g_ascii_strcasecmp" = no ; then
+ G_ASCII_STRCASECMP_C="g_ascii_strcasecmp.c"
+ G_ASCII_STRCASECMP_O="g_ascii_strcasecmp.o"
+ G_ASCII_STRCASECMP_LO="g_ascii_strcasecmp.lo"
+fi
+AC_SUBST(G_ASCII_STRCASECMP_C)
+AC_SUBST(G_ASCII_STRCASECMP_O)
+AC_SUBST(G_ASCII_STRCASECMP_LO)
+
ac_save_LIBS="$LIBS"
LIBS="$GLIB_LIBS $LIBS"
G_ASCII_STRTOULL_C=""
have_plugins=no
elif test "x$have_plugins" = "xno"; then
AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
- if test "x$withval" != "xyes"; then
- plugindir="$withval"
- fi
+ elif test "x$withval" != "xyes"; then
+ plugindir="$withval"
fi
])
AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
AC_CACHE_SAVE
AM_CONFIG_HEADER(config.h)
-AC_CONFIG_SUBDIRS(wiretap)
AC_OUTPUT(
Makefile
doxygen.cfg
tools/Makefile
tools/idl2wrs.sh
tools/lemon/Makefile
+ wiretap/Makefile
,)
dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
adns_message="no"
fi
+if test "x$have_good_libcap" = "xyes" ; then
+ libcap_message="yes"
+else
+ libcap_message="no"
+fi
+
echo ""
echo "The Wireshark package has been configured with the following options."
echo " Build wireshark : $enable_wireshark"
echo " Build randpkt : $enable_randpkt"
echo " Build dftest : $enable_dftest"
echo ""
-echo " Install setuid : $setuid_message"
+echo " Install dumpcap setuid : $setuid_message"
echo " Use plugins : $have_plugins"
echo " Build lua plugin : $lua_message"
echo " Build rtp_player : $portaudio_message"
echo " Use pcre library : $pcre_message"
echo " Use kerberos library : $krb5_message"
echo " Use GNU ADNS library : $adns_message"
-echo " Use SMI SNMP library : $libsmi"
+echo " Use SMI MIB library : $libsmi_message"
echo " Use GNU crypto library : $gcrypt_message"
echo " Use SSL crypto library : $ssl_message"
echo " Use IPv6 name resolution : $enable_ipv6"
echo " Use gnutls library : $tls_message"
+echo " Use libcap library : $libcap_message"