dnl AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(wireshark, 0.99.6)
+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
#
AC_MSG_ERROR(I couldn't find pod2html; make sure it's installed and in your path)
fi
-AC_PATH_PROG(HTML_VIEWER, htmlview)
+AC_PATH_PROG(HTML_VIEWER, xdg-open)
if test "x$HTML_VIEWER" = x
then
- AC_DEFINE_UNQUOTED(HTML_VIEWER, "mozilla", [HTML viewer, e.g. mozilla])
+ AC_PATH_PROG(HTML_VIEWER, htmlview)
+ if test "x$HTML_VIEWER" = x
+ then
+ AC_DEFINE_UNQUOTED(HTML_VIEWER, "mozilla", [HTML viewer, e.g. mozilla])
+ else
+ AC_DEFINE_UNQUOTED(HTML_VIEWER, "htmlview", [HTML viewer, e.g. mozilla])
+ fi
else
- AC_DEFINE_UNQUOTED(HTML_VIEWER, "htmlview", [HTML viewer, e.g. mozilla])
+ AC_DEFINE_UNQUOTED(HTML_VIEWER, "xdg-open", [HTML viewer, e.g. mozilla])
fi
AC_PATH_PROG(LEX, flex)
AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
# gnu tls
-AM_PATH_LIBGNUTLS(1.0.0,
+tls_message="no"
+AC_ARG_WITH([gnutls],
+ AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@],
+ [use gnutls library @<:@default=yes@:>@]),
+ with_gnutls="$withval", with_gnutls="yes")
+if test "x$with_gnutls" = "xyes"; then
+ AM_PATH_LIBGNUTLS(1.0.0,
[
echo "gnuTLS found, enabling ssl decryption"
AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use gnutls library])
tls_message="no"
fi
]
-)
+ )
+fi
# libgrypt
-AM_PATH_LIBGCRYPT(1.1.42,
+gcrypt_message="no"
+AC_ARG_WITH([gcrypt],
+ AC_HELP_STRING( [--with-gcrypt=@<:@yes/no@:>@],
+ [use gcrypt library @<:@default=yes@:>@]),
+ with_gcrypt="$withval", with_gcrypt="yes")
+if test "x$with_gcrypt" = "xyes"; then
+ AM_PATH_LIBGCRYPT(1.1.42,
[
echo "libgcrypt found, enabling ipsec decryption"
AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt])
if test x$libgcrypt_config_prefix != x ; then
AC_MSG_ERROR([[libgcrypt not found; install libgcrypt-devel package for your system]])
else
- echo echo "libgcrypt not found, disabling ipsec decryption"
+ echo "libgcrypt not found, disabling ipsec decryption"
gcrypt_message="no"
fi
]
-)
+ )
+fi
+
+# libsmi
+# FIXME: currently the path argument to with-libsmi is being ignored
+AX_LIBSMI
# Check for xsltproc
AC_PATH_PROG(XSLTPROC, xsltproc)
AC_SUBST(HAVE_RPM)
#
-# If we're running gcc, add '-Wall -Wpointer-arith -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.
-# If "--with-extra-gcc-checks" was specified, add some additional
-# warning checks.
-#
-# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
-# argument will compile with non-GCC compilers.
+# Try to add some additional gcc checks to CFLAGS
#
AC_ARG_ENABLE(extra-gcc-checks,
AC_HELP_STRING( [--enable-extra-gcc-checks],
[Do additional -W checks in GCC. @<:@default=no@:>@]),
[
+ wireshark_extra_gcc_flags=$enableval
if test $enableval != no
then
- wireshark_extra_gcc_flags=" -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings"
+ 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(-Wmissing-declarations)
+ #Temporarily put cast-align here waiting eradication of 'cast
+ #increases required alignment of target type' on the Solaris
+ #slave.
+ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
fi
],)
-AC_MSG_CHECKING(whether we can add '-Wall -Wpointer-arith -W$wireshark_extra_gcc_flags' to CFLAGS)
-if test "x$GCC" = "xyes" ; then
- CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -Wpointer-arith -W $wireshark_extra_gcc_flags $CFLAGS"
- AC_MSG_RESULT(yes)
-else
- CFLAGS="-D_U_=\"\" $CFLAGS"
- AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING(whether we can add '-Wdeclaration-after-statement' to CFLAGS)
-if test "x$GCC" = "xyes" ; then
- # some versions of GCC support this directive
- rm -rf conftest*
- echo "int foo;" >>conftest.c
- if $CC -c -o conftest.o conftest.c -Wdeclaration-after-statement > /dev/null 2>&1 ; then
- CFLAGS="$CFLAGS -Wdeclaration-after-statement"
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
-else
- # non-gcc compilers do not support this directive
- AC_MSG_RESULT(no)
-fi
-rm -rf conftest*
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wall -W)
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
+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)
-AC_MSG_CHECKING(whether we can add '-Wno-pointer-sign' to CFLAGS)
+#
+# If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS 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.
+#
if test "x$GCC" = "xyes" ; then
- # some versions of GCC support this directive
- rm -rf conftest*
- echo "int foo;" >>conftest.c
- if $CC -c -o conftest.o conftest.c -Wno-pointer-sign > /dev/null 2>&1 ; then
- CFLAGS="$CFLAGS -Wno-pointer-sign"
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
+ CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
else
- # non-gcc compilers do not support this directive
- AC_MSG_RESULT(no)
+ CFLAGS="-D_U_=\"\" $CFLAGS"
fi
-rm -rf conftest*
+#
+# If we're running gcc, will enable a barrier "stop on warning".
+# 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_HELP_STRING( [--enable-warnings-as-errors],
[Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
[
- if test "x$GCC" = "xyes" && test "x$enableval" == "xyes"; then
+ if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
],
- if test "x$GCC" = "xyes" && test "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
AC_SUBST(LDFLAGS_SHAREDLIB)
#
-# On OS X, if we find the headers for Core Foundation and Launch Services,
-# add -framework options to link with Application Services (of which
-# Launch Services is a subframework) and Core Foundation (required by
-# the Launch Services APIs), so we can use that to launch a Web browser
-# from the Help menu.
-#
-# (Do those headers exist on pure Darwin? If so, does the CoreFoundation
-# *and* Launch Services code exist there, or are those headers just stubs?
-# If the frameworks aren't present on Darwin, how *should* we check for
-# their existence?)
+# On OS X, if we find the headers for Core Foundation, Launch Services,
+# and Core Services, add -framework options to link with Application
+# Services (of which Launch Services is a subframework), Core Foundation
+# (required by the Launch Services APIs), and Core Services, so we can
+# use them to launch a Web browser from the Help menu and to use
+# Gestalt() to get the Mac OS X version number.
#
case "$host_os" in
darwin*)
- AC_MSG_CHECKING(whether we can build with Core Foundation and Launch Services)
+ AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
ac_save_LIBS="$LIBS"
- ac_frameworks="-framework ApplicationServices -framework CoreFoundation"
+ ac_frameworks="-framework ApplicationServices -framework CoreFoundation -framework CoreServices"
LIBS="$LIBS $ac_frameworks"
AC_TRY_LINK(
[
# include <CoreFoundation/CFString.h>
# include <CoreFoundation/CFURL.h>
# include <ApplicationServices/ApplicationServices.h>
+# include <CoreServices/CoreServices.h>
],
[
CFStringRef url_CFString;
CFURLRef url_CFURL;
OSStatus status;
+ long os_version;
url_CFString = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII);
url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL);
status = LSOpenCFURLRef(url_CFURL, NULL);
+
+ Gestalt(gestaltSystemVersion, &os_version);
],
- ac_cv_can_use_cf_and_ls=yes,
- ac_cv_can_use_cf_and_ls=no,
+ ac_cv_can_use_osx_frameworks=yes,
+ ac_cv_can_use_osx_frameworks=no,
[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- if test "$ac_cv_can_use_cf_and_ls" = yes ; then
+ if test "$ac_cv_can_use_osx_frameworks" = yes ; then
AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
FRAMEWORKS="$ac_frameworks"
AC_MSG_RESULT(yes)
#
# 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_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
case `which sed` in
/bin/sed|/usr/bin/sed|/usr/ucb/sed)
- AC_MSG_RESULT(yes)
+ AC_MSG_RESULT(yes)
AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
;;
AC_ARG_ENABLE(wireshark,
AC_HELP_STRING( [--enable-wireshark],
- [build GTK+-based wireshark. @<:@default=yes@:>@]),
+ [build GTK+-based wireshark. @<:@default=yes, if GTK+ available@:>@]),
enable_wireshark=$enableval,enable_wireshark=yes)
AC_ARG_ENABLE(gtk2,
# 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_gtk2" = "xyes" -a "x$enable_wireshark" = "xyes" ; then
+if test "x$enable_gtk2" = "xyes" -a "x$enable_wireshark" = "xyes"; then
GTK_OK=two
AM_PATH_GTK_2_0(2.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread)
-elif test "x$enable_gtk2" != "xyes" -a "x$enable_wireshark" = "xyes" ; then
+elif test "x$enable_gtk2" != "xyes" -a "x$enable_wireshark" = "xyes"; then
GTK_OK=one
AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
else
# programs to be built with GLib.
#
if test "$GTK_OK" = "no" ; then
- enable_wireshark="no"
+ #
+ # We don't have GTK+.
+ # If they didn't explicitly say "--disable-wireshark", fail (so
+ # that, unless they explicitly indicated that they don't want
+ # Wireshark, we stop so they know they won't be getting
+ # Wireshark unless they fix the GTK+ problem).
+ #
+ if test "x$enable_wireshark" = "xyes"; then
+ AC_MSG_ERROR([GTK+ isn't available, so Wireshark can't be compiled])
+ fi
wireshark_bin=""
wireshark_man=""
# Honor GLIB_CFLAGS
AC_SUBST(editcap_bin)
AC_SUBST(editcap_man)
-
-# Enable/disable dumpcap
-
-AC_ARG_ENABLE(dumpcap,
- AC_HELP_STRING( [--enable-dumpcap],
- [build dumpcap. @<:@default=yes@:>@]),
- enable_dumpcap=$enableval,enable_dumpcap=yes)
-
-if test "x$enable_dumpcap" = "xyes" ; then
- dumpcap_bin="dumpcap\$(EXEEXT)"
- dumpcap_man="dumpcap.1"
-else
- dumpcap_bin=""
- dumpcap_man=""
-fi
-AC_SUBST(dumpcap_bin)
-AC_SUBST(dumpcap_man)
-
+# Enabling/disabling of dumpcap is done later (after we know if we have PCAP
+# or not)
# Enable/disable capinfos
AC_WIRESHARK_PCAP_CHECK
fi
+# Enable/disable dumpcap
+
+dnl dumpcap check
+AC_MSG_CHECKING(whether to build dumpcap)
+
+AC_ARG_ENABLE(dumpcap,
+ AC_HELP_STRING( [--enable-dumpcap],
+ [build dumpcap. @<:@default=yes@:>@]),
+ enable_dumpcap=$enableval,enable_dumpcap=yes)
+
+if test "x$enable_dumpcap" = "xyes" ; then
+ if test "x$want_pcap" = "xno" ; then
+ enable_dumpcap=no
+ AC_MSG_RESULT(pcap not available - disabling dumpcap)
+ else
+ AC_MSG_RESULT(yes)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+if test "x$enable_dumpcap" = "xyes" ; then
+ dumpcap_bin="dumpcap\$(EXEEXT)"
+ dumpcap_man="dumpcap.1"
+else
+ dumpcap_bin=""
+ dumpcap_man=""
+fi
+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 wireshark as setuid. DANGEROUS!!! @<:@default=no@:>@]),
+ [install dumpcap as setuid @<:@default=no@:>@]),
enable_setuid_install=$enableval,enable_setuid_install=no)
-AC_MSG_CHECKING(whether to install wireshark 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 netdb.h stdarg.h stddef.h unistd.h)
+AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
fi
AC_SUBST(SSL_LIBS)
-dnl Net-SNMP Check
-SNMP_LIBS=''
-
-AC_ARG_WITH(net-snmp,
- AC_HELP_STRING( [--with-net-snmp@<:@=PATH@:>@],
- [use Net-SNMP library (with PATH as the location of the net-snmp-config shell script that comes with the net-snmp package, if supplied) @<:@default=yes, if available@:>@]),
-[
- if test $withval = no
- then
- want_netsnmp=no
- elif test $withval = yes
- then
- want_netsnmp=yes
- else
- want_netsnmp=yes
- netsnmpconfig="$withval"
- fi
-],[
- #
- # Set "want_netsnmp" to "ifavailable" to make the default "use it
- # if you find it, otherwise don't".
- #
- want_netsnmp=ifavailable
-])
-
-#
-# Try Net-SNMP
-#
-AC_MSG_CHECKING(whether to use Net-SNMP library)
-if test "x$want_netsnmp" = "xno" ; then
- AC_MSG_RESULT(no)
-else
- if test "x$want_netsnmp" = "xifavailable" ; then
- AC_MSG_RESULT([yes, if available])
- else
- AC_MSG_RESULT(yes)
- fi
- AC_WIRESHARK_NETSNMP_CHECK
-fi
-
-if test "x$have_net_snmp" = "xyes"; then
- AC_DEFINE(HAVE_NET_SNMP, 1, [Define to 1 if Net-SNMP support is to be used])
-fi
-
-AC_SUBST(SNMP_LIBS)
-
-
dnl kerberos check
AC_MSG_CHECKING(whether to use kerberos)
# XXX - do we need this?
AC_PROG_GCC_TRADITIONAL
+#
+# Does GLib define G_GINT64_MODIFIER?
+#
+AC_MSG_CHECKING([[whether glib.h defines the G_GINT64_MODIFIER macro]])
+AC_COMPILE_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <glib.h>
+ #if GTK_MAJOR_VERSION >= 2
+ #include <glib/gprintf.h>
+ #endif
+ #include <stdio.h>
+
+ main()
+ {
+ char strbuf[16+1];
+ g_snprintf(strbuf, sizeof strbuf, "%" G_GINT64_MODIFIER "x\n", (gint64)1);
+ }
+ ]])
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_WIRESHARK_CHECK_64BIT_FORMAT(l,
+ [
+ AC_WIRESHARK_CHECK_64BIT_FORMAT(ll,
+ [
+ AC_WIRESHARK_CHECK_64BIT_FORMAT(L,
+ [
+ AC_WIRESHARK_CHECK_64BIT_FORMAT(q,
+ [
+ AC_MSG_ERROR([neither %lx nor %llx nor %Lx nor %qx worked on a 64-bit integer])
+ ])
+ ])
+ ])
+ ])
+ ])
+
GETOPT_C=""
GETOPT_O=""
AC_CHECK_FUNC(getopt, GETOPT_O="",
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=""
dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.in
dnl
-plugindir="$libdir/wireshark/plugins/$VERSION"
+dnl we don't wish to expand ${libdir} yet
+plugindir='${libdir}/wireshark/plugins/${VERSION}'
AC_ARG_WITH(plugins,
AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@],
[support plugins (installed in DIR, if supplied). @<:@default=yes, if possible@:>@]),
[
- case "$withval" in
- "" | y | ye | yes )
- if test x$have_plugins = xno
- then
- AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
- fi
- ;;
- n | no)
+ if test "x$withval" = "xno"; then
have_plugins=no
- ;;
- *)
- if test x$have_plugins = xno
- then
+ 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.])
- fi
- plugindir="$withval"
- ;;
- esac
+ elif test "x$withval" != "xyes"; then
+ plugindir="$withval"
+ fi
])
-
-AM_CONDITIONAL(HAVE_PLUGINS, test x$have_plugins = xyes)
+AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
if test x$have_plugins = xyes
then
AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
- plugindir=`(
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
- eval echo "$plugindir"
- )`
- AC_DEFINE_UNQUOTED(PLUGIN_DIR, "$plugindir", [Plugin installation directory])
-else
- AC_DEFINE(PLUGIN_DIR, NULL, [Plugin installation directory])
fi
AC_SUBST(plugindir)
+CPPFLAGS="$CPPFLAGS '-DPLUGIN_DIR=\"\$(plugindir)\"'"
#
# The plugin dissectors reside in ./plugins/PROTO/
AC_CACHE_SAVE
AM_CONFIG_HEADER(config.h)
-AC_CONFIG_SUBDIRS(wiretap)
AC_OUTPUT(
Makefile
doxygen.cfg
asn1/Makefile
+ asn1/acp133/Makefile
+ asn1/acse/Makefile
+ asn1/ansi_map/Makefile
+ asn1/ansi-tcap/Makefile
+ asn1/camel/Makefile
+ asn1/cdt/Makefile
+ asn1/cmip/Makefile
+ asn1/cms/Makefile
+ asn1/dap/Makefile
+ asn1/disp/Makefile
+ asn1/dop/Makefile
+ asn1/dsp/Makefile
+ asn1/ess/Makefile
+ asn1/ftam/Makefile
+ asn1/gnm/Makefile
+ asn1/gsmmap/Makefile
+ asn1/h225/Makefile
+ asn1/h235/Makefile
+ asn1/h245/Makefile
+ asn1/h248/Makefile
+ asn1/h282/Makefile
+ asn1/h283/Makefile
+ asn1/h323/Makefile
+ asn1/h450/Makefile
+ asn1/h450-ros/Makefile
+ asn1/h460/Makefile
+ asn1/h501/Makefile
+ asn1/inap/Makefile
+ asn1/ldap/Makefile
+ asn1/logotype-cert-extn/Makefile
+ asn1/mms/Makefile
+ asn1/mpeg-audio/Makefile
+ asn1/mpeg-pes/Makefile
+ asn1/nbap/Makefile
+ asn1/ns-cert-exts/Makefile
+ asn1/ocsp/Makefile
+ asn1/p7/Makefile
+ asn1/pkcs1/Makefile
+ asn1/pkcs12/Makefile
+ asn1/pkinit/Makefile
+ asn1/pkix1explicit/Makefile
+ asn1/pkix1implicit/Makefile
+ asn1/pkixcmp/Makefile
+ asn1/pkixcrmf/Makefile
+ asn1/pkixproxy/Makefile
+ asn1/pkixqualified/Makefile
+ asn1/pkixtsp/Makefile
+ asn1/pres/Makefile
+ asn1/q932/Makefile
+ asn1/q932-ros/Makefile
+ asn1/qsig/Makefile
+ asn1/ranap/Makefile
+ asn1/rnsap/Makefile
+ asn1/ros/Makefile
+ asn1/rrc/Makefile
+ asn1/rrlp/Makefile
+ asn1/rtse/Makefile
+ asn1/s4406/Makefile
+ asn1/sabp/Makefile
+ asn1/smrse/Makefile
+ asn1/snmp/Makefile
+ asn1/spnego/Makefile
+ asn1/t125/Makefile
+ asn1/t38/Makefile
+ asn1/tcap/Makefile
+ asn1/ulp/Makefile
+ asn1/wlancertextn/Makefile
+ asn1/x411/Makefile
+ asn1/x420/Makefile
+ asn1/x509af/Makefile
+ asn1/x509ce/Makefile
+ asn1/x509if/Makefile
+ asn1/x509sat/Makefile
+ asn1/x721/Makefile
doc/Makefile
epan/Makefile
epan/crypt/Makefile
plugins/ciscosm/Makefile
plugins/docsis/Makefile
plugins/enttec/Makefile
+ plugins/ethercat/Makefile
plugins/giop/Makefile
plugins/gryphon/Makefile
- plugins/h223/Makefile
plugins/irda/Makefile
plugins/lwres/Makefile
+ plugins/m2m/Makefile
plugins/mate/Makefile
- plugins/mgcp/Makefile
+ plugins/opcua/Makefile
plugins/opsi/Makefile
plugins/pcli/Makefile
plugins/profinet/Makefile
plugins/rudp/Makefile
plugins/sbus/Makefile
plugins/stats_tree/Makefile
+ plugins/unistim/Makefile
plugins/v5ua/Makefile
+ plugins/wimax/Makefile
+ plugins/wimaxasncp/Makefile
tools/Makefile
tools/idl2wrs.sh
tools/lemon/Makefile
+ wiretap/Makefile
,)
+dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
# Pretty messages
if test "x$enable_setuid_install" = "xyes" ; then
- setuid_message="yes (DANGEROUS!!!)"
+ setuid_message="yes"
else
setuid_message="no"
fi
adns_message="no"
fi
-if test "x$have_net_snmp" = "xyes" ; then
- snmp_libs_message="yes"
+if test "x$have_good_libcap" = "xyes" ; then
+ libcap_message="yes"
else
- snmp_libs_message="no"
+ libcap_message="no"
fi
echo ""
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 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 Net-SNMP library : $snmp_libs_message"
echo " Use gnutls library : $tls_message"
+echo " Use libcap library : $libcap_message"