2 # Autoconf script for Wireshark
6 # Define variables for the components of the Wireshark version number.
8 m4_define([version_major], [2])
9 m4_define([version_minor], [9])
10 m4_define([version_micro], [0])
11 dnl Updated by make-version.pl
12 m4_define([version_extra], [])
13 m4_define([version_micro_extra], m4_join([], version_micro, version_extra))
15 AC_INIT(Wireshark, [version_major.version_minor.version_micro_extra], http://bugs.wireshark.org/, , http://www.wireshark.org/)
19 VERSION_RELEASE="version_major.version_minor"
20 AC_SUBST(VERSION_RELEASE)
21 AC_DEFINE_UNQUOTED([VERSION_RELEASE], ["$VERSION_RELEASE"], [Wireshark feature release version (X.Y)])
23 # Minimum autoconf version we require.
25 # Variable expansion doesn't work in AC_PREREQ()
27 AC_SUBST(AC_MIN_VERSION)
29 dnl Make sure to keep ACLOCAL_AMFLAGS in Makefile.am and AC_CONFIG_MACRO_DIRS
30 dnl in configure.ac in sync, otherwise there will be an error running autogen.sh.
31 m4_ifdef([AC_CONFIG_MACRO_DIRS],[AC_CONFIG_MACRO_DIRS([m4])])
33 dnl Check for CPU / vendor / OS
34 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
35 dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
36 dnl needs. Using `AC_CANONICAL_TARGET' is enough to run the two other
39 dnl As nothing in the Wireshark is itself a build tool (we are not,
40 dnl for example, a compiler that generates machine code), we probably
41 dnl don't need AC_CANONICAL_TARGET, so, in theory, we should be able
42 dnl to use AC_CANONICAL_BUILD and AC_CANONICAL_HOST - or perhaps just
43 dnl AC_CANONICAL_HOST - instead. Note that we do have tools, such as
44 dnl lemon, that need to be built for the build machine, not for the
45 dnl host machine, so we might need both.
47 dnl This has to be done *after* AC_INIT, otherwise autogen.sh fails.
49 dnl AC_CANONICAL_BUILD
53 AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip subdir-objects foreign])
55 # Enable silent builds by default. Verbose builds can be enabled with "./configure
56 # --enable-silent-rules ..." or "make V=1 ..."
57 AM_SILENT_RULES([yes])
59 # Make Wireshark's version available in config.h
60 AC_DEFINE(VERSION_MAJOR, version_major, [Wireshark's major version])
61 AC_DEFINE(VERSION_MINOR, version_minor, [Wireshark's minor version])
62 AC_DEFINE(VERSION_MICRO, version_micro, [Wireshark's micro version])
64 AC_DEFINE_UNQUOTED(VERSION_FLAVOR,
65 ["${WIRESHARK_VERSION_FLAVOR:-"Development Build"}"], [Wireshark's package flavor])
68 LT_INIT([disable-static])
69 AC_SUBST([LIBTOOL_DEPS])
71 AC_CONFIG_LIBOBJ_DIR([wsutil])
74 # Checks for programs used in the main build process.
76 # See doc/README.developer for allowed C99 features
79 if test "$ac_cv_prog_cc_c99" = "no"
81 AC_MSG_ERROR([The C compiler does not support C99])
86 if test ! -z "$CXX"; then
88 # OK, we found something AC_LANG_CXX thinks is a C++ compiler,
91 # Some UN*Xes have, by default, a case-insensitive file
92 # system, and AC_PROG_CXX looks for, among other things,
93 # "CC" as a C++ compiler, and, if you have a case-insensitive
94 # file system and a C compiler named "cc" (both true, by
95 # default, on macOS), AC_PROG_CXX may end up thinking it's
98 # So we check by feeding the purported C++ compiler a
99 # program using C++ features (iostream).
101 AC_MSG_CHECKING(whether $CXX is a C++ compiler)
103 AC_LINK_IFELSE([AC_LANG_PROGRAM(
108 std::cout << "Hello World! ";
111 [AC_MSG_RESULT(yes)],
119 # Qt 5.7 or later requires C++11
120 AS_IF([test -n "$CXX"],
121 [AX_CXX_COMPILE_STDCXX([11], [noext], [optional])])
123 # Set CC_FOR_BUILD (the *local* gcc to use for building e.g. lemon)
124 if test "x$cross_compiling" = xno -a -z "$CC_FOR_BUILD"; then
130 # Check for versions of "sed" inadequate to handle, in libtool, a list
131 # of object files as large as the list in Wireshark.
138 AC_PATH_PROG(PERL, perl)
141 AC_PATH_PROGS(PYTHON, python python3)
142 if test ! -z "$PYTHON"; then
144 # OK, we found Python; is it Python 2.5 or later?
145 # Note: we don't use named components for sys.version_info to get
146 # the major version number, as named components for version_info
147 # were apparently introduced in Python 2.7.
149 AC_MSG_CHECKING([whether $PYTHON is Python 2.5 or later])
150 python_major_version=`$PYTHON -c 'import sys; print (sys.version_info[[0]])'`
151 python_minor_version=`$PYTHON -c 'import sys; print (sys.version_info[[1]])'`
152 if test "$python_major_version" -eq 2 -a "$python_minor_version" -lt 5 ; then
154 AC_MSG_WARN([Building with Python $python_major_version.$python_minor_version may not work])
159 AC_MSG_ERROR(I couldn't find python; make sure it's installed and in your path)
163 dnl Check for yacc/lex. Distribution tarballs include generated source,
164 dnl in which case these tools are not a mandatory requirement to build.
167 AS_IF([test "x$YACC" = xyacc], [AS_UNSET(YACC)])
168 AS_IF([test -z "$YACC" -a ! -f $srcdir/wiretap/ascend.c],
169 [AC_MSG_ERROR([I couldn't find bison or byacc; make sure it's installed and in your path])])
170 AM_MISSING_PROG(YACC, bison)
172 AS_IF([test "x$LEX" != xflex], [AS_UNSET(LEX)])
173 AS_IF([test -z "$LEX" -a ! -f $srcdir/wiretap/ascend_scanner.c],
174 [AC_MSG_ERROR([I couldn't find flex; make sure it's installed and in your path])])
175 AM_MISSING_PROG(LEX, flex)
177 AC_PATH_PROG(POD2MAN, pod2man)
178 if test "x$POD2MAN" = x
181 # The alternative is not to build the man pages....
183 AC_MSG_ERROR(I couldn't find pod2man; make sure it's installed and in your path)
185 AC_PATH_PROG(POD2HTML, pod2html)
186 if test "x$POD2HTML" = x
189 # The alternative is not to build the HTML man pages....
191 AC_MSG_ERROR(I couldn't find pod2html; make sure it's installed and in your path)
195 # Set "ac_supports_gcc_flags" if the compiler is known to support GCC-style
196 # flags such as -pedantic, -W warning flags and -f feature flags. Currently,
197 # we assume GCC and clang do; other compilers should be added here.
199 # This is done to avoid getting tripped up by compilers that support
200 # those flags but give them a different meaning.
202 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
203 ac_supports_gcc_flags=yes
207 AC_PATH_PROG(DOXYGEN, doxygen)
208 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no")
209 AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
212 # Check for pkg-config and set PKG_CONFIG accordingly.
214 # This is referenced via AC_REQUIRE([PKG_PROG_PKG_CONFIG] in some macros
215 # like PKG_CHECK_MODULES. If the first call to such a macro is under an
216 # "if" statement, it's safer to call PKG_PROG_PKG_CONFIG directly, see
217 # the comments in acolocal.m4
219 # We want version 0.7 or better. (XXX - explain why. Is that just
220 # because our Qt tests were originally based on AM_PATH_GTK, and *it*
221 # requires 0.7 or better?)
223 PKG_PROG_PKG_CONFIG(0.7)
224 if test -z "$PKG_CONFIG"; then
225 AC_MSG_ERROR(I couldn't find pkg-config; make sure it's installed and in your path)
229 # Try to arrange for large file support.
234 # Check if we need to link with libm
236 AC_SEARCH_LIBS([cos], [m])
239 # Check for C99 math functions.
241 AC_CHECK_FUNCS([floorl lrint])
244 # Check if we need to link with -lnsl and -lsocket
249 # GUI toolkit options
252 AC_HELP_STRING( [--with-qt=@<:@yes/no/4/5@:>@],
253 [use Qt @<:@default=yes, if available@:>@]),
254 with_qt="$withval", with_qt="unspecified")
257 # Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to
258 # LGPLv2.1+ in version 3.1.10.
259 # GnuTLS depends on GMP which switched from LGPLv2.1+ to LGPLv3+ in
260 # version 4.2.2, the switched to LGPLv3+ / GPLv2+ in version 6.0.0.
263 want_gnutls="if_available"
264 AC_ARG_WITH([gnutls],
265 AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@],
266 [use GnuTLS library @<:@default=yes, if available@:>@]),
267 [ with_gnutls="$withval"; want_gnutls="yes" ], with_gnutls="yes")
269 if test "x$with_gnutls" = "xyes"; then
270 have_license_compatible_gnutls="no"
271 PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.10 ],
272 [ have_license_compatible_gnutls="yes" ], [ echo "GnuTLS >= 3.1.10 not found " ]
275 if test "x$have_license_compatible_gnutls" != "xyes"; then
276 PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0 gnutls < 3],
277 [ have_license_compatible_gnutls="yes" ] , [ echo "GnuTLS >= 2.12.0, < 3.0 not found " ]
281 if test "x$have_license_compatible_gnutls" != "xyes"; then
282 if test "x$want_gnutls" = "xyes"; then
283 AC_MSG_ERROR([GnuTLS crypto library was requested, but is not installed for development])
285 AS_ECHO(["GnuTLS with compatible license not found, disabling SSL decryption"])
288 AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use GnuTLS library])
293 # libgrypt (for decryption, MAC, etc. functionality).
294 AM_PATH_LIBGCRYPT(1.4.2, [ ] , [
295 AC_MSG_ERROR([[libgcrypt not installed for development; install libgcrypt, including any development package, for your system]])
299 AC_HELP_STRING([--with-libnl@<:@=VERSION@:>@],
300 [use libnl (force version VERSION, if supplied) @<:@default: yes, if available@:>@]),
302 if test "x$withval" = "xno"
305 elif test "x$withval" = "xyes"
309 elif test "x$withval" = "x1"
313 elif test "x$withval" = "x2"
317 elif test "x$withval" = "x3"
322 AC_MSG_ERROR(["$withval" is not a valid argument to --with-libnl])
326 # Use libnl if it's present, otherwise don't.
328 want_libnl=ifavailable
332 # Libnl is Linux-specific.
337 AC_MSG_CHECKING(whether to use libnl for various network interface purposes)
339 if test x$want_libnl = "xno"; then
344 # Test for specific libnl versions only if no version
345 # was specified by the user or if the version in question
346 # was requested by the user.
348 if test x$libnl_version = "xany" -o x$libnl_version = "x3"; then
349 PKG_CHECK_EXISTS([libnl-3.0 libnl-route-3.0 libnl-genl-3.0], [have_libnl3=yes], [have_libnl3=no])
351 if test x$libnl_version = "xany" -o x$libnl_version = "x2"; then
352 PKG_CHECK_EXISTS([libnl-2.0], [have_libnl2=yes], [have_libnl2=no])
354 if test x$libnl_version = "xany" -o x$libnl_version = "x1"; then
355 PKG_CHECK_EXISTS([libnl-1], [have_libnl1=yes], [have_libnl1=no])
357 if (test "${have_libnl3}" = "yes"); then
358 PKG_WIRESHARK_CHECK_SYSTEM_MODULES([LIBNL], [libnl-3.0 libnl-route-3.0 libnl-genl-3.0])
359 AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
360 AC_DEFINE(HAVE_LIBNL3, 1, [libnl version 3])
361 libnl_message="yes (v3)"
362 elif (test "${have_libnl2}" = "yes"); then
363 PKG_WIRESHARK_CHECK_SYSTEM_MODULES([LIBNL], [libnl-2.0])
364 AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
365 AC_DEFINE(HAVE_LIBNL2, 1, [libnl version 2])
366 libnl_message="yes (v2)"
367 elif (test "${have_libnl1}" = "yes"); then
368 PKG_WIRESHARK_CHECK_SYSTEM_MODULES([LIBNL], [libnl-1])
369 AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
370 AC_DEFINE(HAVE_LIBNL1, 1, [libnl version 1])
371 libnl_message="yes (v1)"
373 if test x$want_libnl = "xyes"; then
374 case "$libnl_version" in
377 AC_MSG_ERROR("I couldn't find libnl even though you manually enabled it.")
381 AC_MSG_ERROR("I couldn't find libnl version $libnl_version even though you manually enabled it.")
388 AC_MSG_CHECKING([if nl80211.h is new enough])
389 AC_TRY_COMPILE([#include <linux/nl80211.h>],
390 [int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
391 x |= NL80211_ATTR_SUPPORTED_IFTYPES;
392 x |= NL80211_ATTR_SUPPORTED_COMMANDS;
393 x |= NL80211_ATTR_WIPHY_FREQ;
394 x |= NL80211_CHAN_NO_HT;
396 [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211, 1, [nl80211.h is new enough])],
399 AC_MSG_CHECKING([for NL80211_SET_CHANNEL])
400 AC_TRY_COMPILE([#include <linux/nl80211.h>],
401 [enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;],
402 [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_CMD_SET_CHANNEL, 1, [SET_CHANNEL is supported])],
405 AC_MSG_CHECKING([for NL80211_SPLIT_WIPHY_DUMP])
406 AC_TRY_COMPILE([#include <linux/nl80211.h>],
407 [enum nl80211_protocol_features x = NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP;],
408 [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_SPLIT_WIPHY_DUMP, 1, [SPLIT_WIPHY_DUMP is supported])],
411 AC_MSG_CHECKING([for NL80211_VHT_CAPABILITY])
412 AC_TRY_COMPILE([#include <linux/nl80211.h>],
413 [enum nl80211_attrs x = NL80211_ATTR_VHT_CAPABILITY;],
414 [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_VHT_CAPABILITY, 1, [VHT_CAPABILITY is supported])],
419 if test x$want_libnl != "xno" -a x$want_libnl != "xifavailable"; then
420 AC_MSG_WARN([libnl is Linux-specific, ignoring --with-libnl])
425 # Check if we should build the Wireshark User's Guide
427 AC_ARG_ENABLE(guides,
428 AC_HELP_STRING( [--disable-guides],
429 [Don't build the Wireshark User's Guide]),
430 [want_wsug=$enableval], [want_wsug=if_available])
433 # Check for programs used when building DocBook documentation.
436 AC_PATH_PROGS(ASCIIDOCTOR, [asciidoctorj asciidoctor])
437 AC_CHECK_PROGS(HAVE_ASCIIDOCTOR, [asciidoctorj asciidoctor], "yes", "no")
438 AM_CONDITIONAL(HAVE_ASCIIDOCTOR, test x$HAVE_ASCIIDOCTOR = xyes)
439 AS_IF([test ! -x "$ASCIIDOCTOR"],
441 AS_IF([test "x$want_wsug" = xyes],
442 [AC_MSG_ERROR([Asciidoctor not found. This is required to build the release notes and guides])])
445 AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
446 AS_IF([test ! -x "$XSLTPROC"],
448 AS_IF([test "x$want_wsug" = xyes],
449 [AC_MSG_ERROR([xlstproc not found but required to build the Wireshark User's Guide])])
453 AM_CONDITIONAL(BUILD_USER_GUIDE, [test "x$have_wsug" = xyes -a "x$want_wsug" != xno])
456 AC_CHECK_PROGS(RPMBUILD, [rpmbuild], [rpmbuild])
459 AC_CHECK_PROG(SHELLCHECK, shellcheck)
462 # Check compiler vendor. For GCC this will be 'gnu' and for Clang 'clang'.
465 if test "x$CXX" != "x" ; then
472 # Some compilers have to be told to fail when passed an unknown -W flag;
473 # make sure we do that.
475 AC_WIRESHARK_CHECK_UNKNOWN_WARNING_OPTION_ERROR
478 # Some C++ compilers have to be told to fail when passed a -W flag that
479 # they don't think should apply to C++; make sure we do that.
481 AC_WIRESHARK_CHECK_NON_CXX_WARNING_OPTION_ERROR
484 # The following are for C and C++
486 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wall)
487 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wextra)
488 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wendif-labels)
489 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpointer-arith)
490 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wformat-security)
491 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fwrapv)
492 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fno-strict-overflow)
493 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fno-delete-null-pointer-checks)
494 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wvla)
495 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Waddress)
496 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wattributes)
497 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wdiv-by-zero)
498 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wignored-qualifiers)
499 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpragmas)
500 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-overlength-strings)
501 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-long-long)
502 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wheader-guard)
503 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wcomma)
506 # The following are C only, not C++
508 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wc++-compat, C)
509 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunused-const-variable, C)
514 # Make sure -Wshadow doesn't complain about variables in function and
515 # function pointer declarations shadowing other variables; if not, don't
516 # turn it on, as some versions of GCC (including the one in at least
517 # some Xcode versions that came with Mac OS X 10.5) complain about
520 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wshadow, C,
522 extern int bar(int a);
528 int (*fptr)(int a) = bar;
533 [warns about variables in function declarations shadowing other variables])
535 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-pointer-sign, C)
536 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wold-style-definition, C)
537 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wstrict-prototypes, C)
539 # Unfortunately some versions of gcc generate logical-op warnings when strchr()
540 # is given a constant string.
541 # gcc versions 4.3.2 and 4.4.5 are known to have the problem.
542 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wlogical-op, C,
546 int foo(const char *, int);
550 foo(const char *sep, int c)
552 if (strchr (sep, c) != NULL)
561 return foo("<", 'a');
564 [generates warnings from strchr()])
566 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wjump-misses-init, C)
567 # The Qt headers generate a ton of shortening errors on 64-bit systems
568 # so only enable this for C for now.
569 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wshorten-64-to-32, C)
572 # Implicit function declarations are an error in C++ and most
573 # likely a programming error in C. Turn -Wimplicit-int and
574 # -Wimplicit-function-declaration into an error by default.
576 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Werror=implicit, C)
578 # Clang only. Avoid "argument unused during compilation" warnings
579 # (for example, when getting the -gsplit-dwarf option or
580 # when combining -fwrapv with -fno-strict-overflow)
581 if test x"$ax_cv_c_compiler_vendor" = xclang; then
582 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments, C)
584 if test x"$ax_cv_cxx_compiler_vendor" = xclang; then
585 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments, CXX)
589 # Use the faster pre gcc 4.5 floating point precision if available.
591 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fexcess-precision=fast)
594 # Try to have the compiler default to hiding symbols, so that only
595 # symbols explicitly exported with WS_DLL_PUBLIC will be visible
596 # outside (shared) libraries; that way, more UN*X builds will catch
597 # failures to export symbols, rather than having that fail only on
600 # GCC and GCC-compatible compilers
602 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fvisibility=hidden)
603 if test "x$can_add_to_cflags" = "xno"
608 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-xldscope=hidden)
609 if test "x$can_add_to_cflags" = "xno"
611 # TODO add other ways of hiding symbols
612 AC_MSG_WARN(Compiler will export all symbols from shared libraries)
617 # Try to add some additional checks to CFLAGS.
618 # These are not enabled by default, because the warnings they produce
619 # are very hard or impossible to eliminate.
621 AC_ARG_ENABLE(extra-compiler-warnings,
622 AC_HELP_STRING( [--enable-extra-compiler-warnings],
623 [do additional compiler warnings @<:@default=no@:>@]),
625 wireshark_extra_flags=$enableval
626 if test $enableval != no
629 # The following are for C and C++
631 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpedantic)
633 # As we use variadic macros, we don't want warnings
634 # about them, even with -Wpedantic.
636 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-variadic-macros)
638 # Various code blocks this one.
640 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Woverflow)
641 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fstrict-overflow -Wstrict-overflow=4)
643 # Due to various places where APIs we don't control
644 # require us to cast away constness, we can probably
645 # never enable this one with -Werror.
647 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wcast-qual)
649 # Some generated ASN.1 dissectors block this one;
650 # multiple function declarations for the same
651 # function are being generated.
653 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wredundant-decls)
655 # Some loops are safe, but it's hard to convince the
658 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunsafe-loop-optimizations)
660 # All the registration functions block these for now.
662 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-prototypes)
663 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-declarations)
665 # A bunch of "that might not work on SPARC" code blocks
666 # this one for now; some of it is code that *will* work
667 # on SPARC, such as casts of "struct sockaddr *" to
668 # "struct sockaddr_in *", which are required by some
669 # APIs such as getifaddrs().
671 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wcast-align)
673 # Works only with Clang
675 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunreachable-code)
677 # Works only with Clang but generates a lot of warnings
678 # (about glib library not using Doxygen)
680 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wdocumentation)
682 # Works only with GCC 7
684 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wduplicated-branches)
687 # The following are C only, not C++
689 # Due to various places where APIs we don't control
690 # require us to cast away constness, we can probably
691 # never enable this one with -Werror.
693 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wbad-function-cast, C)
697 # Try to add ASAN address analyze.
698 # Only needed for analyse
701 AC_HELP_STRING( [--enable-asan],
702 [Enable AddressSanitizer (ASAN) for debugging (degrades performance)@<:@default=no@:>@]),
705 # With Clang >= 3.5 Leak detection is enable by default
706 # and no yet all leak is fixed...
707 # use ASAN_OPTIONS=detect_leaks=0 to disable detect_leaks
709 # XXX shouldn't this also be added to LDFLAGS?
710 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fsanitize=address)
712 # Disable ASAN for build-time tools, e.g. lemon
713 WS_CFLAGS_saved="$WS_CFLAGS"
714 WS_LDFLAGS_saved="$WS_LDFLAGS"
715 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fno-sanitize=all, C)
716 if test "x$can_add_to_cflags" = "xyes"
718 NO_SANITIZE_CFLAGS="-fno-sanitize=all"
719 NO_SANITIZE_LDFLAGS="-fno-sanitize=all"
721 WS_CFLAGS="$WS_CFLAGS_saved"
722 WS_LDFLAGS="$WS_LDFLAGS_saved"
725 AC_SUBST(NO_SANITIZE_CFLAGS)
726 AC_SUBST(NO_SANITIZE_LDFLAGS)
728 # Try to enable ThreadSanitizer.
731 AC_HELP_STRING( [--enable-tsan],
732 [Enable ThreadSanitizer (TSan) for debugging@<:@default=no@:>@]),
735 # Available since Clang >= 3.2 and GCC >= 4.8
737 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fsanitize=thread)
738 AC_WIRESHARK_LDFLAGS_CHECK(-fsanitize=thread)
742 # Try to enable UndefinedBehaviorSanitizer.
745 AC_HELP_STRING( [--enable-ubsan],
746 [Enable UndefinedBehaviorSanitizer (UBSan) for debugging@<:@default=no@:>@]),
749 # Available since Clang >= 3.3 and GCC >= 4.9
751 # XXX shouldn't this also be added to LDFLAGS?
752 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fsanitize=undefined)
756 # Add check hf conflict..
758 AC_ARG_ENABLE(checkhf-conflict,
759 AC_HELP_STRING( [--enable-checkhf-conflict],
760 [Enable hf conflict check for debugging (start-up may be slower)@<:@default=no@:>@]),
762 AC_DEFINE(ENABLE_CHECK_FILTER, 1, [Enable hf conflict check])
765 AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed])
766 ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,-M])
767 ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--cref])
768 # AC_WIRESHARK_LDFLAGS_CHECK([-flto])
769 # AC_WIRESHARK_LDFLAGS_CHECK([-fwhopr])
770 # AC_WIRESHARK_LDFLAGS_CHECK([-fwhole-program])
773 # Put -fPIE in PIE_CFLAGS and -pie in PIE_LDFLAGS if we can use them,
774 # so that we can build dumpcap PIE - it may run with elevated
775 # privileges, and using PIE means the OS can run it at random locations
776 # in the address space to make attacks more difficult.
779 WS_CFLAGS_saved="$WS_CFLAGS"
780 WS_LDFLAGS_saved="$WS_LDFLAGS"
781 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fPIE, C)
782 if test "x$can_add_to_cflags" = "xyes"
784 AC_WIRESHARK_LDFLAGS_CHECK([-fPIE -pie])
785 if test "x$can_add_to_ldflags" = "xyes"
792 WS_CFLAGS="$WS_CFLAGS_saved"
793 WS_LDFLAGS="$WS_LDFLAGS_saved"
795 AC_SUBST(PIE_LDFLAGS)
797 WS_CFLAGS_saved="$WS_CFLAGS"
798 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-msse4.2, C)
799 if test "x$can_add_to_cflags" = "xyes"
802 # The compiler supports -msse4.2; use that to enable SSE 4.2.
804 # We only want to apply -msse4.2 to
805 # wsutil/ws_mempbrk_sse42.c, as the SSE4.2 code there
806 # is run only if the hardware supports it, but other
807 # code would do no such checks.
809 ac_sse4_2_flag=-msse4.2
812 # Try -xarch=sse4_2; that's the flag for Sun's compiler.
814 AC_WIRESHARK_COMPILER_FLAGS_CHECK(-xarch=sse4_2, C)
815 if test "x$can_add_to_cflags" = "xyes"
818 # The compiler supports -xarch=sse4_2; use that to
820 ac_sse4_2_flag=-xarch=sse4_2
823 WS_CFLAGS="$WS_CFLAGS_saved"
825 if test "x$ac_sse4_2_flag" != x; then
827 # OK, we have a compiler flag to enable SSE 4.2.
829 # Make sure we have the necessary headers for the SSE4.2 intrinsics
830 # and that we can use them.
832 # First, check whether we have emmintrin.h and can use it
833 # *without* the SSE 4.2 flag.
835 AC_MSG_CHECKING([whether there is emmintrin.h header and we can use it])
837 [#include <emmintrin.h>],
840 emmintrin_h_works=yes
850 # OK, if that works, see whether we have nmmintrin.h and
851 # can use it *with* the SSE 4.2 flag.
853 if test "x$emmintrin_h_works" = "xyes"; then
855 # Add the SSE4.2 flags to the beginning of CFLAGS,
856 # in case the user explicitly specified -mno-sse4.2
857 # (or in case Gentoo's build tools did so); if they
858 # did so, we only want this to work if we can use
859 # the #pragma to override that for ws_mempbrk_sse42.c,
860 # and putting it at the beginning means that the
861 # CFLAGS setting in the environment will come later
864 AC_MSG_CHECKING([whether there is nmmintrin.h header and we can use it])
865 saved_CFLAGS="$CFLAGS"
866 CFLAGS="$ac_sse4_2_flag $WS_CFLAGS $CFLAGS"
868 [#include <nmmintrin.h>],
872 AC_DEFINE(HAVE_SSE4_2, 1, [Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions])
873 CFLAGS_SSE42="$ac_sse4_2_flag"
881 CFLAGS="$saved_CFLAGS"
888 dnl build libwsutil_sse42 only if there is SSE4.2
889 AM_CONDITIONAL(SSE42_SUPPORTED, test "x$have_sse42" = "xyes")
890 AC_SUBST(CFLAGS_SSE42)
892 # If we're running GCC or CLang, use FORTIFY_SOURCE=2
893 # (only if the GCC 'optimization level' > 0).
895 # See: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
896 # See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979
898 # Note: FORTIFY_SOURCE is only effective for gcc optimization level > 0 (-O1, etc)
899 AC_WIRESHARK_GCC_FORTIFY_SOURCE_CHECK
902 # If the compiler supports GCC-style flags, enable a barrier "stop on
904 # This barrier is set for a very large part of the code. However, it is
905 # typically not set for "generated" code (flex, ans2wrs, idl2wrs, ...)
907 warnings_as_errors_default="yes"
908 AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
909 AC_ARG_ENABLE(warnings-as-errors,
910 AC_HELP_STRING( [--enable-warnings-as-errors],
911 [treat warnings as errors (only for GCC or clang) @<:@default=yes, unless extra compiler warnings are enabled@:>@]),
913 if test "x$ac_supports_gcc_flags" = "xyes" -a "x$enableval" = "xyes"; then
914 with_warnings_as_errors="yes"
917 with_warnings_as_errors="no"
922 if test "x$ac_supports_gcc_flags" = "xyes" -a "x$wireshark_extra_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
923 with_warnings_as_errors="yes"
926 with_warnings_as_errors="no"
931 AS_IF([test "x$with_warnings_as_errors" = "xyes"], [WERROR="-Werror"], [WERROR=""])
933 AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, [test "x$with_warnings_as_errors" = "xyes"])
936 # Add any platform-specific compiler flags needed.
938 AC_MSG_CHECKING(for platform-specific compiler flags)
939 if test "x$GCC" = "xyes" ; then
941 # GCC - do any platform-specific tweaking necessary.
945 # the X11 headers don't automatically include prototype info
946 # and a lot don't include the return type
947 WS_CPPFLAGS="$WS_CPPFLAGS -DFUNCPROTO=15"
948 WS_CFLAGS="$WS_CFLAGS -Wno-return-type"
949 WS_CXXFLAGS="$WS_CXXFLAGS -Wno-return-type"
950 AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
953 AC_MSG_RESULT(none needed)
958 # Not GCC - assume it's the vendor's compiler.
963 # AC_PROG_CC_STDC should already have added whatever
964 # flags are necessary for ISO C - C99 if available,
965 # otherwise C89 - with extensions.
967 # Add +O2, for optimization, as suggested by Jost Martin.
968 # XXX - works with "-g"?
970 # +O2 is supported both by the C and C++ compiler.
972 # Add -Wp,-H200000 to handle some large #defines we
973 # have; that flag is not necessary for the C++
974 # compiler unless the "legacy" C++ preprocessor is
975 # being used (+legacy_cpp). We don't want the
976 # legacy preprocessor if it's not the default,
977 # so we just add -Wp,-H200000 to the C flags.
978 # (If there are older versions of aC++ that only
979 # support the legacy preprocessor, and require
980 # that we boost the table size, we'd have to check
981 # whether -Wp,-H200000 is supported by the C++
982 # compiler and add it only if it is.)
984 WS_CFLAGS="+O2 -Wp,-H200000 $WS_CFLAGS"
985 if test "$CC" = "$CC_FOR_BUILD"; then
987 # We're building the build tools with the same
988 # compiler as the one with which we're building
989 # Wireshark, so add the flags to the flags for
990 # that compiler as well.
992 CFLAGS_FOR_BUILD="-Ae +O2 -Wp,-H200000 $CFLAGS"
994 WS_CXXFLAGS="+O2 $WS_CXXFLAGS"
995 AC_MSG_RESULT(HP C/C++ compiler - added +O2 -Wp,-H200000)
999 # Crank up the warning level.
1001 WS_CFLAGS="$WS_CFLAGS -v"
1002 WS_CXXFLAGS="$WS_CXXFLAGS +w2"
1005 AC_MSG_RESULT(none needed)
1011 # Add any platform-specific linker flags needed.
1013 AC_MSG_CHECKING(for platform-specific linker flags)
1017 # If this is GCC or Clang, Add -Wl,-bbigtoc for big libraries.
1018 # XXX - what if we're using xlc? Is that necessary? The
1019 # xlc 7.0 manual says "Specifying -qpic=large has the same
1020 # effect as passing -bbigtoc to ld"; do we need to tell xlc,
1021 # when it's compiling, to generate different code for a large
1022 # TOC, or is that just a linker flag? For that matter, do we
1023 # have to tell GCC or Clang to generate different code for a
1026 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
1027 LDFLAGS_BIGSHAREDLIB="-Wl,-bbigtoc"
1028 AC_MSG_RESULT([AIX linker with GCC or Clang - added -Wl,-bbigtoc to large shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags])
1033 # Add -Wl,-single_module to the LDFLAGS used with shared
1034 # libraries, to fix some error that show up in some cases;
1035 # some Apple documentation recommends it for most shared
1038 LDFLAGS_SHAREDLIB="-Wl,-single_module"
1040 # Add -Wl,-headerpad_max_install_names to the LDFLAGS, as
1041 # code-signing issues is running out of padding space.
1043 # Add -Wl,-search_paths_first to make sure that if we search
1044 # directories A and B, in that order, for a given library, a
1045 # non-shared version in directory A, rather than a shared
1046 # version in directory B, is chosen (so we can use
1047 # --with-pcap=/usr/local to force all programs to be linked
1048 # with a static version installed in /usr/local/lib rather than
1049 # the system version in /usr/lib).
1051 WS_LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first $WS_LDFLAGS"
1052 AC_MSG_RESULT([Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags])
1056 # Shared libraries in cygwin/Win32 must never contain
1057 # undefined symbols.
1059 WS_LDFLAGS="$WS_LDFLAGS -no-undefined"
1060 AC_MSG_RESULT(Cygwin GNU ld - added -no-undefined)
1063 AC_MSG_RESULT(none needed)
1066 AC_SUBST(LDFLAGS_BIGSHAREDLIB)
1067 AC_SUBST(LDFLAGS_SHAREDLIB)
1070 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
1075 AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
1076 if test x$LD_LIBRARY_PATH != x ; then
1077 LIBS="$LIBS -R$LD_LIBRARY_PATH"
1078 AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
1080 AC_MSG_RESULT(no -- this may be a problem in a few seconds)
1085 # Enable/disable wireshark
1086 AC_ARG_ENABLE(wireshark,
1087 AC_HELP_STRING( [--enable-wireshark],
1088 [build the Wireshark GUI (with Gtk+, Qt, or both) @<:@default=yes@:>@]),
1089 enable_wireshark=$enableval,enable_wireshark=yes)
1090 AM_CONDITIONAL(BUILDING_WIRESHARK, test x$enable_wireshark = xyes)
1092 GLIB_MIN_VERSION=2.32.0
1093 AC_SUBST(GLIB_MIN_VERSION)
1094 # GLib checks; we require GLib $GLIB_MIN_VERSION or later, and require gmodule
1095 # support, as we need that for dynamically loading plugins.
1097 # Release dates for GLib versions:
1098 # 2.14.0: 03 Aug 2007
1099 # 2.16.0: 10 Mar 2008
1100 # 2.18.0: 02 Sep 2008
1101 # 2.20.0: 13 Mar 2009
1102 # 2.22.0: 22 Sep 2009
1103 # 2.24.0: 28 Mar 2010
1104 # 2.26.0: 27 Sep 2010
1105 # 2.28.0: 08 Feb 2011
1106 # 2.30.0: 27 Sep 2011
1107 # 2.32.0: 24 Mar 2012
1108 # 2.34.0: 24 Sep 2012
1109 # 2.36.0: 25 Mar 2013
1110 # 2.38.0: 23 Sep 2013
1111 # 2.40.0: 24 Mar 2014
1112 # 2.42.0: 22 Sep 2014
1113 # 2.44.0: 23 Mar 2014
1114 # 2.46.0: 25 Sep 2015
1116 PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GLIB],
1117 [glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
1118 [GLIB_VERSION=`$PKG_CONFIG --modversion glib-2.0`],
1119 [AC_MSG_ERROR([GLib $GLIB_MIN_VERSION or later not found.])])
1121 # Error out if a glib header other than a "top level" header
1122 # (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
1124 AX_APPEND_FLAG([-DG_DISABLE_SINGLE_INCLUDES], [GLIB_CONFIG])
1126 # Error out on the usage of deprecated glib functions
1127 AX_APPEND_FLAG([-DG_DISABLE_DEPRECATED], [GLIB_CONFIG])
1129 GLIB_CFLAGS="$GLIB_CONFIG $GLIB_CFLAGS"
1130 AC_SUBST(GLIB_CFLAGS)
1133 GTK2_MIN_VERSION=2.12.0
1134 AC_SUBST(GTK2_MIN_VERSION)
1135 GTK3_MIN_VERSION=3.0.0
1136 AC_SUBST(GTK3_MIN_VERSION)
1137 QT_MIN_VERSION=5.2.0
1138 AC_SUBST(QT_MIN_VERSION)
1139 # GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
1140 # GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
1142 # We only do those if we're going to be building Wireshark;
1143 # otherwise, we don't have any GUI to build, so we don't use
1146 # We don't add $GTK_LIBS or $Qt_LIBS to LIBS, because we don't want to
1147 # force all programs to be built with GTK+ or Qt.
1149 # For a list of library versions and their support across different platforms,
1150 # see https://wiki.wireshark.org/Development/Support_library_version_tracking
1154 if test "x$enable_wireshark" = "xyes"; then
1155 if test "x$with_qt" != "xno"; then
1157 # Qt was specified; make sure we have a C++ compiler.
1159 if test -z "$CXX"; then
1160 AC_MSG_ERROR(Need a working C++ compiler to build Wireshark with Qt)
1164 # Now make sure we have Qt and, if so, add the flags
1165 # for it to CFLAGS and CXXFLAGS.
1167 AC_WIRESHARK_QT_CHECK($QT_MIN_VERSION, "$with_qt",
1172 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-qt"
1175 # We're building with Qt, so we need the Qt build
1176 # tools in order to build the Wireshark GUI.
1177 # We've found a particular major version of Qt,
1178 # and we want that version's build tools; for
1179 # example, the Qt 4 version of uic produces files
1180 # that include Qt headers with paths that work
1181 # with Qt 4 but not Qt 5, so we can't use the
1182 # Qt 4 version of uic if we're building with Qt 5.
1183 AC_WIRESHARK_QT_TOOL_CHECK(UIC, uic, "$qt_version")
1185 AC_WIRESHARK_QT_TOOL_CHECK(MOC, moc, "$qt_version")
1187 AC_WIRESHARK_QT_TOOL_CHECK(RCC, rcc, "$qt_version")
1189 AC_WIRESHARK_QT_TOOL_CHECK_LRELEASE("$qt_version")
1193 # On Darwin, make sure we're using Qt5 or later.
1194 # If so, find where the Qt frameworks are located
1195 # and add that to the rpath, just in case this is
1196 # Qt 5.5 or later and the frameworks have an
1197 # install name that begins with @rpath and aren't
1198 # installed in a frameworks directory that's
1199 # searched by default.
1203 if test $qt_version -le 4
1205 AC_MSG_ERROR([macOS builds should use Qt5])
1207 Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs Qt${qt_version}Core | sed -e 's/-F//' -e 's/ -framework.*//'`
1211 AC_SUBST(Qt_LDFLAGS)
1213 if test -z "${MOC_OPTIONS+1}"
1215 # Squelch moc verbose "nothing to do" output
1216 if test $QT_VERSION_MAJOR -eq 5
1219 elif test $QT_VERSION_MAJOR -eq 4 -a $QT_VERSION_MINOR -ge 8
1224 AC_SUBST(MOC_OPTIONS)
1231 # They didn't explicitly ask for Qt,
1232 # so just don't build with it.
1240 # This is probably macOS, and the
1241 # problem could be that this is a
1242 # later version of Qt that doesn't
1243 # install .pc files on macOS, so
1244 # pkg-config can't find it.
1246 AC_MSG_ERROR([Qt is not installed or may not work with the configure script; try using CMake, instead])
1251 # Qt might be installed, but only
1252 # for use by applications, not
1255 AC_MSG_ERROR([Qt is not installed for development])
1266 AC_MSG_ERROR([Qt 4 is not installed or may not work with the configure script; try using CMake, instead])
1273 AC_MSG_ERROR([Qt 4 is not installed for development])
1284 AC_MSG_ERROR([Qt 5 is not installed or may not work with the configure script; try using CMake, instead])
1291 AC_MSG_ERROR([Qt 5 is not installed for development])
1299 for want_gtk_version in $with_gtk; do
1300 AS_CASE([$want_gtk_version],
1301 [3], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK],
1302 [gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
1305 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`
1306 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=3"
1311 [2], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK],
1312 [gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
1315 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
1316 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=2"
1321 [fail3], [AC_MSG_ERROR([GTK+ 3 was requested but is not installed for development])],
1322 [fail2], [AC_MSG_ERROR([GTK+ 2 was requested but is not installed for development])],
1323 [fail], [AC_MSG_ERROR([GTK+ was requested but is not installed for development])])
1325 AS_IF([test "x$have_gtk" = xyes], [break])
1328 if test "$have_gtk" = "yes" ; then
1329 # If we're building with GTK, complain and then add flags for it
1331 AC_MSG_WARN([The GTK+ UI is deprecated and will be removed in a future release.])
1335 GTK_CONFIG="$GLIB_CONFIG"
1337 gtk_major_version=`echo $GTK_VERSION | cut -d. -f1`
1338 gtk_minor_version=`echo $GTK_VERSION | cut -d. -f2`
1340 AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATED], [GTK_CONFIG])
1341 if test \( $gtk_major_version -eq 3 -a $gtk_minor_version -ge 10 \) ; then
1342 ## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
1343 ## The deprecations in Gtk 3.10 will not be fixed ...
1344 AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATION_WARNINGS], [GTK_CONFIG])
1346 AX_APPEND_FLAG([-DGTK_DISABLE_DEPRECATED], [GTK_CONFIG])
1348 AX_APPEND_FLAG([-DGTK_DISABLE_SINGLE_INCLUDES], [GTK_CONFIG])
1349 if test ! \( $gtk_major_version -eq 2 -a $gtk_minor_version -lt 20 \) ; then
1350 # Enable GSEAL when building with GTK > 2.20
1351 # (Versions prior to 2.22 lacked some necessary accessors.)
1352 AX_APPEND_FLAG([-DGSEAL_ENABLE], [GTK_CONFIG])
1355 GTK_CFLAGS="$GTK_CONFIG $GTK_CFLAGS"
1359 AC_SUBST(GTK_CFLAGS)
1361 AC_SUBST(GUI_CONFIGURE_FLAGS)
1363 # Check for GTK GUI support for GResource pixbufs
1364 have_gresource_pixbuf=no
1365 if test "x$have_gtk" = "xyes"; then
1366 AC_MSG_CHECKING(whether GDK-Pixbuf can load data using GResource)
1367 PKG_CHECK_EXISTS([gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26],
1370 AC_DEFINE(HAVE_GDK_GRESOURCE, 1, [Defined if GResource is supported])
1371 have_gresource_pixbuf=yes
1373 [AC_MSG_RESULT(no)])
1375 AM_CONDITIONAL(HAVE_GRESOURCE_PIXBUF, test "x$have_gresource_pixbuf" = "xyes")
1377 if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
1378 # We have both GTK and Qt and thus will be building both wireshark
1379 # and wireshark-gtk.
1381 wireshark_bin="wireshark\$(EXEEXT) wireshark-gtk\$(EXEEXT)"
1382 wireshark_man="wireshark.1"
1383 wireshark_SUBDIRS="ui/qt ui/gtk"
1384 elif test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then
1385 # We don't have GTK+ but we have Qt.
1387 wireshark_bin="wireshark\$(EXEEXT)"
1388 wireshark_man="wireshark.1"
1389 wireshark_SUBDIRS="ui/qt"
1390 elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
1391 # We have GTK+ but not Qt.
1393 wireshark_bin="wireshark-gtk\$(EXEEXT)"
1394 wireshark_man="wireshark.1"
1395 wireshark_SUBDIRS="ui/gtk"
1396 elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
1397 # We have neither GTK+ nor Qt.
1399 # If they didn't explicitly say "--disable-wireshark",
1400 # fail (so that, unless they explicitly indicated that
1401 # they don't want Wireshark, we stop so they know they
1402 # won't be getting Wireshark unless they fix the GTK+/Qt
1405 if test "x$enable_wireshark" = "xyes"; then
1406 if test "$with_qt" != "no" -a "$with_gtk" != "no" ; then
1410 # This is probably macOS, and the
1411 # problem could be that this is a
1412 # later version of Qt that doesn't
1413 # install .pc files on macOS, so
1414 # pkg-config can't find it.
1416 AC_MSG_ERROR([Neither Qt nor GTK+ are installed for development, or Qt is installed but doesn't work with the configure script, so Wireshark can't be compiled; try using CMake, instead])
1421 # Qt might be installed, but only
1422 # for use by applications, not
1425 AC_MSG_ERROR([Neither Qt nor GTK+ are installed for development, so Wireshark can't be compiled])
1428 elif test "$with_qt" != "no" -a "$with_gtk" = "no" ; then
1432 # This is probably macOS, and the
1433 # problem could be that this is a
1434 # later version of Qt that doesn't
1435 # install .pc files on macOS, so
1436 # pkg-config can't find it.
1438 AC_MSG_ERROR([Qt is not installed or may not work with the configure script, and GTK+ was not requested, so Wireshark cannot be compiled; try using CMake, instead])
1443 # Qt might be installed, but only
1444 # for use by applications, not
1447 AC_MSG_ERROR([Qt is not installed for development and GTK+ was not requested, so Wireshark can't be compiled])
1450 elif test "$with_qt" = "no" -a "$with_gtk" != "no" ; then
1451 AC_MSG_ERROR([Qt was not requested and GTK+ is not installed for development, so Wireshark can't be compiled])
1452 elif test "$with_qt" = "no" -a "$with_gtk" = "no" ; then
1453 AC_MSG_ERROR([Neither Qt nor GTK+ were requested, so Wireshark can't be compiled])
1458 wireshark_SUBDIRS=""
1462 # If we have <dlfcn.h>, check whether we have dladdr.
1464 if test "$ac_cv_header_dlfcn_h" = "yes"
1467 # Use GLib compiler flags and linker flags; GLib's gmodule
1468 # stuff uses the dl APIs if available, so it might know
1469 # what flags are needed.
1471 ac_save_CFLAGS="$CFLAGS"
1472 ac_save_LIBS="$LIBS"
1473 CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
1474 LIBS="$LIBS $GLIB_LIBS"
1475 AC_CHECK_FUNCS(dladdr)
1476 if test x$ac_cv_func_dladdr = xno
1479 # OK, try it with -ldl, in case you need that to get
1480 # dladdr(). For some reason, on Linux, that's not
1481 # part of the GLib flags; perhaps GLib itself is
1482 # linked with libdl, so that you can link with
1483 # Glib and it'll pull libdl in itself.
1486 AC_CHECK_FUNCS(dladdr)
1488 CFLAGS="$ac_save_CFLAGS"
1489 LIBS="$ac_save_LIBS"
1492 AC_SUBST(wireshark_bin)
1493 AC_SUBST(wireshark_man)
1494 AC_SUBST(wireshark_SUBDIRS)
1495 AM_CONDITIONAL(HAVE_Qt, test "$have_qt" = "yes")
1496 AM_CONDITIONAL(HAVE_QT_VERSION_4, [test $qt_version -eq 4])
1497 AM_CONDITIONAL(HAVE_GTK, test "$have_gtk" = "yes")
1499 # Enable/disable tshark
1500 AC_ARG_ENABLE(tshark,
1501 AC_HELP_STRING( [--enable-tshark],
1502 [build tshark @<:@default=yes@:>@]),
1503 tshark=$enableval,enable_tshark=yes)
1505 if test "x$enable_tshark" = "xyes" ; then
1506 tshark_bin="tshark\$(EXEEXT)"
1507 tshark_man="tshark.1"
1508 wiresharkfilter_man="wireshark-filter.4"
1513 AC_SUBST(tshark_bin)
1514 AC_SUBST(tshark_man)
1516 # Enable/disable editcap
1518 AC_ARG_ENABLE(editcap,
1519 AC_HELP_STRING( [--enable-editcap],
1520 [build editcap @<:@default=yes@:>@]),
1521 enable_editcap=$enableval,enable_editcap=yes)
1523 if test "x$enable_editcap" = "xyes" ; then
1524 editcap_bin="editcap\$(EXEEXT)"
1525 editcap_man="editcap.1"
1530 AC_SUBST(editcap_bin)
1531 AC_SUBST(editcap_man)
1534 # Enabling/disabling of dumpcap is done later (after we know if we have PCAP
1537 # Enable/disable capinfos
1539 AC_ARG_ENABLE(capinfos,
1540 AC_HELP_STRING( [--enable-capinfos],
1541 [build capinfos @<:@default=yes@:>@]),
1542 enable_capinfos=$enableval,enable_capinfos=yes)
1544 if test "x$enable_capinfos" = "xyes" ; then
1545 capinfos_bin="capinfos\$(EXEEXT)"
1546 capinfos_man="capinfos.1"
1551 AC_SUBST(capinfos_bin)
1552 AC_SUBST(capinfos_man)
1554 # Enable/disable captype
1556 AC_ARG_ENABLE(captype,
1557 AC_HELP_STRING( [--enable-captype],
1558 [build captype @<:@default=yes@:>@]),
1559 enable_captype=$enableval,enable_captype=yes)
1561 if test "x$enable_captype" = "xyes" ; then
1562 captype_bin="captype\$(EXEEXT)"
1563 captype_man="captype.1"
1568 AC_SUBST(captype_bin)
1569 AC_SUBST(captype_man)
1571 # Enable/disable mergecap
1573 AC_ARG_ENABLE(mergecap,
1574 AC_HELP_STRING( [--enable-mergecap],
1575 [build mergecap @<:@default=yes@:>@]),
1576 enable_mergecap=$enableval,enable_mergecap=yes)
1578 if test "x$enable_mergecap" = "xyes" ; then
1579 mergecap_bin="mergecap\$(EXEEXT)"
1580 mergecap_man="mergecap.1"
1585 AC_SUBST(mergecap_bin)
1586 AC_SUBST(mergecap_man)
1588 # Enable/disable reordercap
1590 AC_ARG_ENABLE(reordercap,
1591 AC_HELP_STRING( [--enable-reordercap],
1592 [build reordercap @<:@default=yes@:>@]),
1593 enable_reordercap=$enableval,enable_reordercap=yes)
1595 if test "x$enable_reordercap" = "xyes" ; then
1596 reordercap_bin="reordercap\$(EXEEXT)"
1597 reordercap_man="reordercap.1"
1602 AC_SUBST(reordercap_bin)
1603 AC_SUBST(reordercap_man)
1605 # Enable/disable text2pcap
1607 AC_ARG_ENABLE(text2pcap,
1608 AC_HELP_STRING( [--enable-text2pcap],
1609 [build text2pcap @<:@default=yes@:>@]),
1610 text2pcap=$enableval,enable_text2pcap=yes)
1612 if test "x$enable_text2pcap" = "xyes" ; then
1613 text2pcap_bin="text2pcap\$(EXEEXT)"
1614 text2pcap_man="text2pcap.1"
1619 AC_SUBST(text2pcap_bin)
1620 AC_SUBST(text2pcap_man)
1622 # Enable/disable dftest
1624 AC_ARG_ENABLE(dftest,
1625 AC_HELP_STRING( [--enable-dftest],
1626 [build dftest @<:@default=yes@:>@]),
1627 enable_dftest=$enableval,enable_dftest=yes)
1629 if test "x$enable_dftest" = "xyes" ; then
1630 dftest_bin="dftest\$(EXEEXT)"
1631 dftest_man="dftest.1"
1636 AC_SUBST(dftest_bin)
1637 AC_SUBST(dftest_man)
1639 # Enable/disable randpkt
1641 AC_ARG_ENABLE(randpkt,
1642 AC_HELP_STRING( [--enable-randpkt],
1643 [build randpkt @<:@default=yes@:>@]),
1644 enable_randpkt=$enableval,enable_randpkt=yes)
1646 if test "x$enable_randpkt" = "xyes" ; then
1647 randpkt_bin="randpkt\$(EXEEXT)"
1648 randpkt_man="randpkt.1"
1653 AC_SUBST(randpkt_bin)
1654 AC_SUBST(randpkt_man)
1656 AC_SUBST(wiresharkfilter_man)
1659 AC_MSG_CHECKING(whether to use libpcap for packet capture)
1662 AC_HELP_STRING( [--with-pcap@<:@=DIR@:>@],
1663 [use libpcap for packet capturing @<:@default=yes@:>@]),
1665 if test $withval = no
1668 elif test $withval = yes
1679 if test "x$want_pcap" = "xno" ; then
1683 AC_WIRESHARK_PCAP_CHECK
1687 AC_MSG_CHECKING(whether to build dumpcap)
1689 AC_ARG_ENABLE(dumpcap,
1690 AC_HELP_STRING( [--enable-dumpcap],
1691 [build dumpcap @<:@default=yes@:>@]),
1692 enable_dumpcap=$enableval,enable_dumpcap=yes)
1694 if test "x$enable_dumpcap" = "xyes" ; then
1695 if test "x$want_pcap" = "xno" ; then
1697 AC_MSG_RESULT(pcap not installed for development - disabling dumpcap)
1705 if test "x$enable_dumpcap" = "xyes" ; then
1706 dumpcap_bin="dumpcap\$(EXEEXT)"
1707 dumpcap_man="dumpcap.1"
1712 AC_SUBST(dumpcap_bin)
1713 AC_SUBST(dumpcap_man)
1715 # Enable/disable rawshark
1718 AC_MSG_CHECKING(whether to build rawshark)
1720 AC_ARG_ENABLE(rawshark,
1721 AC_HELP_STRING( [--enable-rawshark],
1722 [build rawshark @<:@default=yes@:>@]),
1723 rawshark=$enableval,enable_rawshark=yes)
1725 if test "x$enable_rawshark" = "xyes" ; then
1726 if test "x$want_pcap" = "xno" ; then
1728 AC_MSG_RESULT(pcap not installed for development - disabling rawshark)
1736 if test "x$enable_rawshark" = "xyes" ; then
1737 rawshark_bin="rawshark\$(EXEEXT)"
1738 rawshark_man="rawshark.1"
1743 AC_SUBST(rawshark_bin)
1744 AC_SUBST(rawshark_man)
1746 # Enable/disable sharkd
1747 AC_ARG_ENABLE(sharkd,
1748 AC_HELP_STRING( [--enable-sharkd],
1749 [build sharkd @<:@default=yes@:>@]),
1750 sharkd=$enableval,enable_sharkd=yes)
1752 if test "x$enable_sharkd" = "xyes" ; then
1753 sharkd_bin="sharkd\$(EXEEXT)"
1757 AC_SUBST(sharkd_bin)
1759 # Enable/disable tfshark
1760 AC_ARG_ENABLE(tfshark,
1761 AC_HELP_STRING( [--enable-tfshark],
1762 [build tfshark (Experimental) @<:@default=no@:>@]),
1763 tfshark=$enableval,enable_tfshark=no)
1765 if test "x$enable_tfshark" = "xyes" ; then
1766 tfshark_bin="tfshark\$(EXEEXT)"
1767 tfshark_man="tfshark.1"
1768 wiresharkfilter_man="wireshark-filter.4"
1773 AC_SUBST(tfshark_bin)
1774 AC_SUBST(tfshark_man)
1776 # Enable/disable fuzzshark
1777 AC_ARG_ENABLE(fuzzshark,
1778 AC_HELP_STRING( [--enable-fuzzshark],
1779 [build fuzzshark @<:@default=yes@:>@]),
1780 fuzzshark=$enableval,enable_fuzzshark=yes)
1782 if test "x$enable_fuzzshark" = "xyes" ; then
1783 fuzzshark_bin="fuzzshark\$(EXEEXT)"
1787 AC_SUBST(fuzzshark_bin)
1790 dnl Use pcapng by default
1791 AC_ARG_ENABLE(pcap-ng-default,
1792 AC_HELP_STRING( [--enable-pcap-ng-default],
1793 [use the pcapng file format by default instead of pcap @<:@default=yes@:>@]),
1794 enable_pcap_ng_default=$enableval,enable_pcap_ng_default=yes)
1795 if test x$enable_pcap_ng_default = xyes; then
1796 AC_DEFINE(PCAP_NG_DEFAULT, 1, [Support for pcapng])
1800 AC_MSG_CHECKING(whether to use zlib for gzip compression and decompression)
1803 AC_HELP_STRING([--with-zlib@<:@=DIR@:>@],
1804 [use zlib (located in directory DIR, if supplied) for gzip compression and decompression @<:@default=yes, if available@:>@]),
1806 if test "x$withval" = "xno"
1809 elif test "x$withval" = "xyes"
1818 # Use zlib if it's present, otherwise don't.
1820 want_zlib=ifavailable
1823 if test "x$want_zlib" = "xno" ; then
1827 AC_WIRESHARK_ZLIB_CHECK
1828 if test "x$want_zlib" = "xno" ; then
1829 AC_MSG_RESULT(zlib not found - disabling gzip compression and decompression)
1831 if test "x$ac_cv_func_inflatePrime" = "xno" ; then
1832 AC_MSG_RESULT(inflatePrime not found in zlib - disabling gzipped capture file support)
1839 AC_MSG_CHECKING(whether to use lz4 compression and decompression)
1842 AC_HELP_STRING([--with-lz4@<:@=DIR@:>@],
1843 [use lz4 (located in directory DIR, if supplied) for lz4 compression and decompression @<:@default=yes, if available@:>@]),
1845 if test "x$withval" = "xno"
1848 elif test "x$withval" = "xyes"
1857 # Use lz4 if it's present, otherwise don't.
1859 want_lz4=ifavailable
1863 if test "x$want_lz4" = "xno" ; then
1867 AC_WIRESHARK_LZ4_CHECK
1868 if test "x$want_lz4" = "xno" ; then
1869 AC_MSG_RESULT(lz4 not found - disabling lz4 compression and decompression)
1871 if test "x$ac_cv_func_LZ4_decompress_safe" = "xno" ; then
1872 AC_MSG_RESULT(LZ4_decompress_safe not found in lz4 - disabling cql lz4 decompression)
1882 AC_MSG_CHECKING(whether to use snappy compression and decompression)
1885 AC_HELP_STRING([--with-snappy@<:@=DIR@:>@],
1886 [use snappy (located in directory DIR, if supplied) for snappy compression and decompression @<:@default=yes, if available@:>@]),
1888 if test "x$withval" = "xno"
1891 elif test "x$withval" = "xyes"
1896 snappy_dir="$withval"
1900 # Use snappy if it's present, otherwise don't.
1902 want_snappy=ifavailable
1906 if test "x$want_snappy" = "xno" ; then
1910 AC_WIRESHARK_SNAPPY_CHECK
1911 if test "x$want_snappy" = "xno" ; then
1912 AC_MSG_RESULT(snappy not found - disabling snappy compression and decompression)
1914 if test "x$ac_cv_func_snappy_uncompress" = "xno" ; then
1915 AC_MSG_RESULT(snappy_uncompress not found in snappy - disabling cql snappy decompression)
1921 AC_SUBST(SNAPPY_LIBS)
1925 AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
1926 [use liblua (located in directory DIR, if supplied) for the Lua scripting plugin @<:@default=yes, if available@:>@]),
1928 if test $withval = no
1931 elif test $withval = yes
1936 want_lua_dir=$withval
1939 # By default use Lua if we can find it
1940 want_lua=ifavailable
1943 if test "x$want_lua" != "xno" ; then
1944 AC_WIRESHARK_LIBLUA_CHECK
1946 if test "x$want_lua" = "xyes" -a "x$have_lua" = "xno"
1948 AC_MSG_ERROR([Lua support was requested, but is not installed for development])
1951 if test "x$have_lua" = "xyes"
1953 AC_DEFINE(HAVE_LUA, 1, [Define to use Lua])
1955 AM_CONDITIONAL(HAVE_LIBLUA, test x$have_lua = xyes)
1957 AC_SUBST(LUA_CFLAGS)
1961 AC_MSG_CHECKING(whether to use libportaudio for the GTK+ RTP player)
1963 AC_ARG_WITH(portaudio,
1964 AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@],
1965 [use libportaudio (located in directory DIR, if supplied) for the GTK+ RTP player @<:@default=yes, if available@:>@]),
1967 if test $withval = no
1970 elif test $withval = yes
1975 portaudio_dir=$withval
1979 # Use libportaudio by default
1981 want_portaudio=ifavailable
1984 if test "x$want_portaudio" = "xno" ; then
1988 AC_WIRESHARK_LIBPORTAUDIO_CHECK
1989 if test "x$want_portaudio" = "xno" ; then
1990 AC_MSG_RESULT(libportaudio not found - disabling support for the GTK+ RTP player)
1993 AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
1996 dnl Check if dumpcap should be installed with filesystem capabilities
1997 AC_PATH_PROG(SETCAP, setcap)
1998 AC_ARG_ENABLE(setcap-install,
1999 AC_HELP_STRING( [--enable-setcap-install],
2000 [install dumpcap with cap_net_admin and cap_net_raw @<:@default=no@:>@]),
2001 enable_setcap_install=$enableval,enable_setcap_install=no)
2003 AC_MSG_CHECKING(whether to install dumpcap with cap_net_admin and cap_net_raw capabilities)
2004 if test "x$enable_setcap_install" = "xno" ; then
2007 if test "x$SETCAP" = "x" ; then
2008 AC_MSG_RESULT(setcap not found)
2009 AC_MSG_ERROR([Setcap install was requested, but setcap was not found])
2010 elif test "x$enable_dumpcap" = "xno" ; then
2011 AC_MSG_RESULT(dumpcap disabled)
2012 AC_MSG_ERROR([Setcap install works only with dumpcap, but dumpcap is disabled])
2018 AM_CONDITIONAL(SETCAP_INSTALL, test x$enable_setcap_install = xyes)
2020 dnl Check if dumpcap should be installed setuid
2021 AC_ARG_ENABLE(setuid-install,
2022 AC_HELP_STRING( [--enable-setuid-install],
2023 [install dumpcap as setuid @<:@default=no@:>@]),
2024 enable_setuid_install=$enableval,enable_setuid_install=no)
2026 AC_MSG_CHECKING(whether to install dumpcap setuid)
2027 if test "x$enable_setuid_install" = "xno" ; then
2030 if test "x$enable_setcap_install" = "xyes" ; then
2031 enable_setuid_install=no
2032 AC_MSG_RESULT(setcap and setuid both selected)
2033 AC_MSG_ERROR(You must choose one of setcap install and setuid install)
2034 elif test "x$enable_dumpcap" = "xno" ; then
2035 AC_MSG_RESULT(dumpcap disabled)
2036 AC_MSG_ERROR([Setuid install works only with dumpcap, but dumpcap is disabled])
2042 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
2043 AC_CHECK_FUNCS(setresuid setresgid)
2045 dnl ...but our Network Operations group is named "no"!
2047 AC_ARG_WITH(dumpcap-group,
2048 AC_HELP_STRING( [--with-dumpcap-group=GROUP],
2049 [restrict dumpcap to GROUP]),
2051 if test "x$withval" = "xyes"; then
2052 AC_MSG_ERROR([No dumpcap group specified.])
2053 elif test "x$withval" != "xno"; then
2054 if test "x$enable_dumpcap" = "xno" ; then
2055 AC_MSG_ERROR(dumpcap group install works only with dumpcap but dumpcap is disabled)
2057 AC_MSG_RESULT($withval)
2058 DUMPCAP_GROUP="$withval"
2061 AC_SUBST(DUMPCAP_GROUP)
2062 AM_CONDITIONAL(HAVE_DUMPCAP_GROUP, test x$DUMPCAP_GROUP != x)
2064 dnl libcap (not libpcap) check
2066 AC_MSG_CHECKING(whether to use the libcap capabilities library)
2069 AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@],
2070 [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management @<:@default=yes, if present@:>@]),
2072 if test "x$withval" = "xno"; then
2074 elif test "x$withval" = "xyes"; then
2076 elif test -d "$withval"; then
2078 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2081 if test "x$with_libcap" = "xno" ; then
2085 AC_WIRESHARK_LIBCAP_CHECK
2087 AC_SUBST(LIBCAP_LIBS)
2089 dnl Checks for header files.
2090 dnl Some of these may not be needed: http://hacks.owlfolio.org/header-survey/
2091 dnl Note, however, that, whilst this script is generally run only on UN*Xes:
2093 dnl 1) we also support building on and for Windows and not all of those
2094 dnl headers are present on Windows, so the code has to check a
2095 dnl #define *anyway* to determine whether to include the header
2100 dnl 2) this might also be run on Windows with a sufficiently UNIXy
2101 dnl environment such as Cygwin (although Wireshark should be built
2102 dnl natively rather than using Cygwin).
2104 AC_CHECK_HEADERS(fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h unistd.h)
2105 AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h)
2106 AC_CHECK_HEADERS(netinet/in.h)
2107 AC_CHECK_HEADERS(arpa/inet.h)
2108 AC_CHECK_HEADERS(ifaddrs.h)
2111 # On Linux, check for some additional headers, which we need as a
2112 # workaround for a bonding driver bug and for libpcap's current lack
2113 # of its own workaround for that bug.
2117 AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,,[#include <sys/socket.h>])
2122 AC_MSG_CHECKING(whether to use Kerberos library)
2125 AC_HELP_STRING( [--with-krb5@<:@=DIR@:>@],
2126 [use Kerberos library (located in directory DIR, if supplied) to use in Kerberos dissection @<:@default=yes@:>@]),
2128 if test $withval = no
2131 elif test $withval = yes
2140 # Use Kerberos library if available, otherwise don't.
2142 want_krb5=ifavailable
2145 if test "x$want_krb5" = "xno" ; then
2149 AC_WIRESHARK_KRB5_CHECK
2153 dnl We use GnuTLS for SSL decryption but some builds of Kerberos require
2154 dnl linking with OpenSSL. We don't want to build with it by default due to
2155 dnl annoying license incompatibilities between the OpenSSL license and the GPL,
2156 dnl so we require an explicit option to configure.
2158 AC_ARG_WITH(krb5-crypto-openssl,
2159 AC_HELP_STRING( [--with-krb5-crypto-openssl],
2160 [Allow linking with OpenSSL for Kerberos crypto backend @<:@default=no@:>@]))
2164 AC_MSG_CHECKING(whether to use the c-ares library if available)
2167 AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@],
2168 [use c-ares (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2170 if test "x$withval" = "xno"; then
2172 elif test "x$withval" = "xyes"; then
2174 elif test -d "$withval"; then
2176 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2179 if test "x$want_c_ares" = "xno" ; then
2183 AC_WIRESHARK_C_ARES_CHECK
2185 AC_SUBST(C_ARES_LIBS)
2187 dnl MaxMind DB Check
2189 AC_MSG_CHECKING(whether to use the MaxMind DB IP address mapping library if available)
2191 AC_ARG_WITH(maxminddb,
2192 AC_HELP_STRING( [--with-maxminddb@<:@=DIR@:>@],
2193 [use MaxMind DB (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2195 if test "x$withval" = "xno"; then
2197 elif test "x$withval" = "xyes"; then
2199 elif test -d "$withval"; then
2201 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2204 if test "x$want_maxminddb" = "xno"; then
2208 AC_WIRESHARK_MAXMINDDB_CHECK
2210 AC_SUBST(MAXMINDDB_LIBS)
2212 if test "x$have_good_maxminddb" = "xyes" ; then
2213 mmdbresolve_bin="mmdbresolve\$(EXEEXT)"
2214 mmdbresolve_man="mmdbresolve.1"
2219 AC_SUBST(mmdbresolve_bin)
2220 AC_SUBST(mmdbresolve_man)
2224 AC_MSG_CHECKING(whether to use the libssh library if available)
2227 AC_HELP_STRING( [--with-libssh@<:@=DIR@:>@],
2228 [use libssh (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2230 if test "x$withval" = "xno"; then
2232 elif test "x$withval" = "xyes"; then
2234 elif test -d "$withval"; then
2236 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2239 if test "x$want_libssh" = "xno"; then
2243 AC_WIRESHARK_LIBSSH_CHECK
2245 AC_SUBST(LIBSSH_LIBS)
2249 AC_MSG_CHECKING(whether to use the nghttp2 HPACK library if available)
2251 AC_ARG_WITH(nghttp2,
2252 AC_HELP_STRING( [--with-nghttp2@<:@=DIR@:>@],
2253 [use nghttp2 (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2255 if test "x$withval" = "xno"; then
2257 elif test "x$withval" = "xyes"; then
2259 elif test -d "$withval"; then
2261 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2264 if test "x$want_nghttp2" = "xno"; then
2268 AC_WIRESHARK_NGHTTP2_CHECK
2270 AC_SUBST(NGHTTP2_LIBS)
2272 dnl Checks for typedefs, structures, and compiler characteristics.
2275 # Check how we can get the time zone abbreviation
2278 # We need to know whether "struct stat" has an "st_flags" member
2279 # for file_user_immutable().
2281 AC_CHECK_MEMBERS([struct stat.st_flags])
2283 # We need to know whether "struct stat" has an "st_birthtime" member
2284 # or an "__st_birthtime" member for the file set dialog.
2286 AC_CHECK_MEMBERS([struct stat.st_birthtime])
2287 AC_CHECK_MEMBERS([struct stat.__st_birthtime])
2289 # We need to know whether "struct sockaddr" has an "sa_len" member
2290 # for get_interface_list().
2292 AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,
2293 [#ifdef HAVE_SYS_TYPES_H
2294 #include <sys/types.h>
2296 #ifdef HAVE_SYS_SOCKET_H
2297 #include <sys/socket.h>
2300 AC_REPLACE_FUNCS(getopt_long)
2301 if test "x$ac_cv_func_getopt_long" = xyes; then
2303 # The OS has getopt_long(), so it might have optreset. Do we have it?
2305 AC_CACHE_CHECK([whether optreset is defined], ac_cv_have_optreset,
2306 AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int optreset;return optreset;]])],
2307 ac_cv_have_optreset=yes, ac_cv_have_optreset=no))
2308 if test "$ac_cv_have_optreset" = yes ; then
2309 AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if you have the optreset variable])
2313 # The OS doesn't have getopt_long(), so we're using the GNU libc
2314 # version that we have in wsutil. It doesn't have optreset, so we
2315 # don't need to check for it.
2317 # However, it uses alloca(), so we may need to include alloca.h;
2320 AC_CHECK_HEADERS(alloca.h)
2323 AC_REPLACE_FUNCS(strptime)
2325 AC_CHECK_FUNCS(mkstemps)
2326 AC_CHECK_FUNCS(issetugid)
2327 AC_CHECK_FUNCS(sysconf)
2328 AC_CHECK_FUNCS(getifaddrs)
2329 AC_CHECK_FUNC(getexecname)
2332 # Check for SpeexDSP (http://www.speex.org)
2334 AS_IF([test "x$have_qt_multimedia_lib" = xyes],
2335 [PKG_CHECK_MODULES(SPEEXDSP, speexdsp, [have_speexdsp=yes], [have_speexdsp=no])])
2336 AS_IF([test "x$have_speexdsp" = xyes],
2337 [AC_DEFINE(HAVE_SPEEXDSP, 1, [Define to 1 if you have SpeexDSP])])
2338 AM_CONDITIONAL(HAVE_SPEEXDSP, [test "x$have_speexdsp" = "xyes"])
2340 # Check Bluetooth SBC codec for RTP Player
2341 # git://git.kernel.org/pub/scm/bluetooth/sbc.git
2343 AC_HELP_STRING( [--with-sbc=@<:@yes/no@:>@],
2344 [use SBC codec to play Bluetooth A2DP stream @<:@default=yes, if available@:>@]),
2345 with_sbc="$withval"; want_sbc="yes", with_sbc="yes")
2347 PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
2348 if test "x$with_sbc" != "xno"; then
2349 if (test "${have_sbc}" = "yes"); then
2350 AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library])
2351 elif test "x$want_sbc" = "xyes"; then
2352 # Error out if the user explicitly requested the sbc library
2353 AC_MSG_ERROR([SBC codec library was requested, but is not installed for development])
2358 AM_CONDITIONAL(HAVE_SBC, test "x$have_sbc" = "xyes")
2361 # Check SpanDSP library for RTP Player
2362 # http://www.soft-switch.org/
2363 AC_ARG_WITH([spandsp],
2364 AC_HELP_STRING( [--with-spandsp=@<:@yes/no@:>@],
2365 [use SpanDSP to play G.722/G.726 codecs @<:@default=yes, if available@:>@]),
2366 with_spandsp="$withval"; want_spandsp="yes", with_spandsp="yes")
2368 PKG_CHECK_MODULES(SPANDSP, spandsp, [have_spandsp=yes], [have_spandsp=no])
2369 if test "x$with_spandsp" != "xno"; then
2370 if (test "${have_spandsp}" = "yes"); then
2371 AC_DEFINE(HAVE_SPANDSP, 1, [Define if you have the SpanDSP library])
2372 elif test "x$want_spandsp" = "xyes"; then
2373 # Error out if the user explicitly requested the SpanDSP library
2374 AC_MSG_ERROR([SpanDSP library was requested, but is not installed for development])
2379 AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes")
2382 # Check bcg729 library for RTP Player
2383 # https://www.linphone.org/technical-corner/bcg729/overview
2386 AC_MSG_CHECKING(whether to use the bcg729 library if available)
2388 AC_ARG_WITH([bcg729],
2389 AC_HELP_STRING( [--with-bcg729=@<:@=DIR@:>@],
2390 [use bcg729 to play G.729 codec(located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2392 if test "x$withval" = "xno"; then
2394 elif test "x$withval" = "xyes"; then
2396 elif test -d "$withval"; then
2398 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2401 if test "x$want_bcg729" = "xno"; then
2405 AC_WIRESHARK_BCG729_CHECK
2407 AC_SUBST(BCG729_LIBS)
2408 AM_CONDITIONAL(HAVE_BCG729, test "x$have_good_bcg729" = "xyes")
2412 AC_ARG_WITH(libxml2,
2413 AC_HELP_STRING([--with-libxml2=@<:@yes/no@:>@],
2414 [Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors @<:@default=yes, if available@:>@]),
2415 with_libxml2="$withval"; want_libxml2="yes", with_libxml2="yes")
2417 PKG_CHECK_MODULES(LIBXML2, libxml-2.0, [have_libxml2=yes], [have_libxml2=no])
2418 if test "x$with_libxml2" != "xno"; then
2419 if (test "${have_libxml2}" = "yes"); then
2420 AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have libxml2])
2421 elif test "x$want_libxml2" = "xyes"; then
2422 # Error out if the user explicitly requested libxml2
2423 AC_MSG_ERROR([Libxml2 was requested, but is not installed for development])
2428 AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes")
2434 AC_HELP_STRING([--with-libsmi=@<:@yes/no@:>@],
2435 [use libsmi MIB/PIB library @<:@default=yes, if available@:>@]),
2436 [], [with_libsmi="if_available"])
2439 if test "x$with_libsmi" != "xno"; then
2440 PKG_CHECK_MODULES(LIBSMI, libsmi,
2442 AC_DEFINE(HAVE_LIBSMI, 1, [Define if you have libsmi])
2444 [if test "x$with_libsmi" = "xyes"; then
2445 # Error out if the user explicitly requested libsmi
2446 AC_MSG_ERROR([Libsmi was requested, but is not installed for development])
2453 dnl check whether plugins should be enabled
2455 AC_ARG_ENABLE(plugins,
2456 AC_HELP_STRING( [--enable-plugins],
2457 [support plugins (if available on your platform) @<:@default=yes@:>@]),
2458 [have_plugins=$enableval], [have_plugins=yes])
2460 AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
2461 if test x$have_plugins = xyes
2463 AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
2465 dnl we don't wish to expand ${libdir} yet
2466 plugindir="\${libdir}/wireshark/plugins/$VERSION_RELEASE"
2470 # The plugin dissectors reside in ./plugins/PROTO/
2473 AC_SUBST(PLUGIN_LIBS)
2476 dnl check whether extcap programs should be enabled and, if they should be,
2477 dnl check for extcap directory - stolen from Amanda's configure.ac
2479 dnl we don't wish to expand ${libdir} yet
2480 extcapdir="\${libdir}/wireshark/extcap"
2481 extcap_man="extcap.4"
2483 AC_SUBST(extcap_man)
2486 dnl androiddump check
2487 AC_MSG_CHECKING(whether to build androiddump)
2489 AC_ARG_ENABLE(androiddump,
2490 AC_HELP_STRING( [--enable-androiddump],
2491 [build androiddump @<:@default=yes@:>@]),
2492 androiddump=$enableval,enable_androiddump=yes)
2494 if test "x$enable_androiddump" = "xyes" ; then
2500 AC_ARG_ENABLE(androiddump_use_libpcap,
2501 AC_HELP_STRING( [--enable-androiddump-use-libpcap],
2502 [build androiddump using libpcap @<:@default=no@:>@]),
2503 androiddump_use_libpcap=$enableval,enable_androiddump_use_libpcap=no)
2505 if test "x$enable_androiddump" = "xyes" -a "x$enable_androiddump_use_libpcap" = "xyes" ; then
2506 AC_DEFINE(ANDROIDDUMP_USE_LIBPCAP, 1, [Androiddump will use Libpcap])
2509 if test "x$enable_androiddump" = "xyes" ; then
2510 androiddump_bin="androiddump\$(EXEEXT)"
2511 androiddump_man="androiddump.1"
2516 AC_SUBST(androiddump_bin)
2517 AC_SUBST(androiddump_man)
2520 AC_MSG_CHECKING(whether to build sshdump)
2522 AC_ARG_ENABLE(sshdump,
2523 AC_HELP_STRING( [--enable-sshdump],
2524 [build sshdump @<:@default=yes@:>@]),
2525 [],[enable_sshdump=yes])
2527 if test "x$have_libssh_pointsix" != xyes; then
2528 AC_MSG_RESULT([no, libssh >= 0.6.0 not installed for development])
2530 elif test "x$enable_sshdump" = "xyes" ; then
2536 if test "x$enable_sshdump" = "xyes" ; then
2537 sshdump_bin="sshdump\$(EXEEXT)"
2538 sshdump_man="sshdump.1"
2543 AC_SUBST(sshdump_bin)
2544 AC_SUBST(sshdump_man)
2547 AC_MSG_CHECKING(whether to build ciscodump)
2549 AC_ARG_ENABLE(ciscodump,
2550 AC_HELP_STRING( [--enable-ciscodump],
2551 [build ciscodump @<:@default=yes@:>@]),
2552 [],[enable_ciscodump=yes])
2554 if test "x$have_libssh_pointsix" != xyes; then
2555 AC_MSG_RESULT([no, libssh >= 0.6.0 not installed for development])
2557 elif test "x$enable_ciscodump" = "xyes" ; then
2563 if test "x$enable_ciscodump" = "xyes" ; then
2564 ciscodump_bin="ciscodump\$(EXEEXT)"
2565 ciscodump_man="ciscodump.1"
2570 AC_SUBST(ciscodump_bin)
2571 AC_SUBST(ciscodump_man)
2573 dnl randpktdump check
2574 AC_MSG_CHECKING(whether to build randpktdump)
2576 AC_ARG_ENABLE(randpktdump,
2577 AC_HELP_STRING( [--enable-randpktdump],
2578 [build randpktdump @<:@default=yes@:>@]),
2579 randpktdump=$enableval,enable_randpktdump=yes)
2581 if test "x$enable_randpktdump" = "xyes" ; then
2587 if test "x$enable_randpktdump" = "xyes" ; then
2588 randpktdump_bin="randpktdump\$(EXEEXT)"
2589 randpktdump_man="randpktdump.1"
2594 AC_SUBST(randpktdump_bin)
2595 AC_SUBST(randpktdump_man)
2598 AC_MSG_CHECKING(whether to build udpdump)
2600 AC_ARG_ENABLE(udpdump,
2601 AC_HELP_STRING( [--enable-udpdump],
2602 [build udpdump @<:@default=yes@:>@]),
2603 [],[enable_udpdump=yes])
2605 if test "x$enable_udpdump" = "xyes" ; then
2611 if test "x$enable_udpdump" = "xyes" ; then
2612 udpdump_bin="udpdump\$(EXEEXT)"
2613 udpdump_man="udpdump.1"
2618 AC_SUBST(udpdump_bin)
2619 AC_SUBST(udpdump_man)
2621 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
2622 if test x$enable_static = xyes
2624 AC_DEFINE(ENABLE_STATIC, 1, [Link Wireshark libraries statically])
2627 # Gather which GUI we're building for rpmbuild
2628 if test "x$have_gtk" = "xyes"; then
2629 if test "x$gtk_major_version" = "x3"; then
2630 RPMBUILD_WITH_ARGS="--with gtk3 --without gtk2"
2632 RPMBUILD_WITH_ARGS="--without gtk3 --with gtk2"
2635 RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3"
2637 if test "x$have_qt" = "xyes" ; then
2638 if test "$qt_version" -eq "5"; then
2639 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt5"
2641 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt"
2644 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt --without qt5"
2646 if test "x$have_lua" = "xyes" ; then
2647 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with lua"
2649 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without lua"
2651 AC_SUBST(RPMBUILD_WITH_ARGS)
2652 AC_SUBST(RPM_VERSION, version_major.version_minor.version_micro)
2654 AC_SUBST(WS_CPPFLAGS)
2656 AC_SUBST(WS_CXXFLAGS)
2657 AC_SUBST(WS_LDFLAGS)
2659 AC_SUBST(WS_CFLAGS_FOR_BUILD)
2661 AH_BOTTOM([#include <ws_diag_control.h>])
2663 dnl Save the cacheable configure results to config.cache before recursing
2666 m4_sinclude(plugins/Custom.m4) dnl
2667 m4_ifndef(_CUSTOM_PLUGIN_CONFIG_FILES_, m4_define(_CUSTOM_PLUGIN_CONFIG_FILES_)) dnl
2669 sinclude(epan/dissectors/asn1/Custom.m4) dnl
2670 ifdef(_CUSTOM_ASN1_AC_OUTPUT_,, define(_CUSTOM_ASN1_AC_OUTPUT_, )) dnl
2672 AC_CONFIG_HEADERS([config.h])
2677 epan/dissectors/asn1/Makefile
2679 _CUSTOM_ASN1_AC_OUTPUT_
2680 epan/dissectors/asn1/acp133/Makefile
2681 epan/dissectors/asn1/acse/Makefile
2682 epan/dissectors/asn1/ansi_map/Makefile
2683 epan/dissectors/asn1/ansi_tcap/Makefile
2684 epan/dissectors/asn1/atn-cm/Makefile
2685 epan/dissectors/asn1/atn-cpdlc/Makefile
2686 epan/dissectors/asn1/atn-ulcs/Makefile
2687 epan/dissectors/asn1/c1222/Makefile
2688 epan/dissectors/asn1/camel/Makefile
2689 epan/dissectors/asn1/cdt/Makefile
2690 epan/dissectors/asn1/charging_ase/Makefile
2691 epan/dissectors/asn1/cmip/Makefile
2692 epan/dissectors/asn1/cmp/Makefile
2693 epan/dissectors/asn1/crmf/Makefile
2694 epan/dissectors/asn1/cms/Makefile
2695 epan/dissectors/asn1/credssp/Makefile
2696 epan/dissectors/asn1/dap/Makefile
2697 epan/dissectors/asn1/disp/Makefile
2698 epan/dissectors/asn1/dop/Makefile
2699 epan/dissectors/asn1/dsp/Makefile
2700 epan/dissectors/asn1/ess/Makefile
2701 epan/dissectors/asn1/f1ap/Makefile
2702 epan/dissectors/asn1/ftam/Makefile
2703 epan/dissectors/asn1/goose/Makefile
2704 epan/dissectors/asn1/gprscdr/Makefile
2705 epan/dissectors/asn1/gsm_map/Makefile
2706 epan/dissectors/asn1/h225/Makefile
2707 epan/dissectors/asn1/h235/Makefile
2708 epan/dissectors/asn1/h245/Makefile
2709 epan/dissectors/asn1/h248/Makefile
2710 epan/dissectors/asn1/h282/Makefile
2711 epan/dissectors/asn1/h283/Makefile
2712 epan/dissectors/asn1/h323/Makefile
2713 epan/dissectors/asn1/h450/Makefile
2714 epan/dissectors/asn1/h450-ros/Makefile
2715 epan/dissectors/asn1/h460/Makefile
2716 epan/dissectors/asn1/h501/Makefile
2717 epan/dissectors/asn1/HI2Operations/Makefile
2718 epan/dissectors/asn1/hnbap/Makefile
2719 epan/dissectors/asn1/idmp/Makefile
2720 epan/dissectors/asn1/ilp/Makefile
2721 epan/dissectors/asn1/inap/Makefile
2722 epan/dissectors/asn1/isdn-sup/Makefile
2723 epan/dissectors/asn1/kerberos/Makefile
2724 epan/dissectors/asn1/lcsap/Makefile
2725 epan/dissectors/asn1/ldap/Makefile
2726 epan/dissectors/asn1/logotypecertextn/Makefile
2727 epan/dissectors/asn1/lpp/Makefile
2728 epan/dissectors/asn1/lppa/Makefile
2729 epan/dissectors/asn1/lppe/Makefile
2730 epan/dissectors/asn1/lte-rrc/Makefile
2731 epan/dissectors/asn1/m2ap/Makefile
2732 epan/dissectors/asn1/m3ap/Makefile
2733 epan/dissectors/asn1/mms/Makefile
2734 epan/dissectors/asn1/mpeg-audio/Makefile
2735 epan/dissectors/asn1/mpeg-pes/Makefile
2736 epan/dissectors/asn1/mudurl/Makefile
2737 epan/dissectors/asn1/nbap/Makefile
2738 epan/dissectors/asn1/nr-rrc/Makefile
2739 epan/dissectors/asn1/ns_cert_exts/Makefile
2740 epan/dissectors/asn1/novell_pkis/Makefile
2741 epan/dissectors/asn1/ocsp/Makefile
2742 epan/dissectors/asn1/p1/Makefile
2743 epan/dissectors/asn1/p22/Makefile
2744 epan/dissectors/asn1/p7/Makefile
2745 epan/dissectors/asn1/p772/Makefile
2746 epan/dissectors/asn1/pcap/Makefile
2747 epan/dissectors/asn1/pkcs1/Makefile
2748 epan/dissectors/asn1/pkcs12/Makefile
2749 epan/dissectors/asn1/pkinit/Makefile
2750 epan/dissectors/asn1/pkixac/Makefile
2751 epan/dissectors/asn1/pkix1explicit/Makefile
2752 epan/dissectors/asn1/pkix1implicit/Makefile
2753 epan/dissectors/asn1/pkixproxy/Makefile
2754 epan/dissectors/asn1/pkixqualified/Makefile
2755 epan/dissectors/asn1/pkixtsp/Makefile
2756 epan/dissectors/asn1/pres/Makefile
2757 epan/dissectors/asn1/q932/Makefile
2758 epan/dissectors/asn1/q932-ros/Makefile
2759 epan/dissectors/asn1/qsig/Makefile
2760 epan/dissectors/asn1/ranap/Makefile
2761 epan/dissectors/asn1/rnsap/Makefile
2762 epan/dissectors/asn1/ros/Makefile
2763 epan/dissectors/asn1/rrc/Makefile
2764 epan/dissectors/asn1/rrlp/Makefile
2765 epan/dissectors/asn1/rtse/Makefile
2766 epan/dissectors/asn1/rua/Makefile
2767 epan/dissectors/asn1/s1ap/Makefile
2768 epan/dissectors/asn1/sabp/Makefile
2769 epan/dissectors/asn1/sbc-ap/Makefile
2770 epan/dissectors/asn1/smrse/Makefile
2771 epan/dissectors/asn1/snmp/Makefile
2772 epan/dissectors/asn1/spnego/Makefile
2773 epan/dissectors/asn1/sv/Makefile
2774 epan/dissectors/asn1/t124/Makefile
2775 epan/dissectors/asn1/t125/Makefile
2776 epan/dissectors/asn1/t38/Makefile
2777 epan/dissectors/asn1/tcap/Makefile
2778 epan/dissectors/asn1/tetra/Makefile
2779 epan/dissectors/asn1/ulp/Makefile
2780 epan/dissectors/asn1/wlancertextn/Makefile
2781 epan/dissectors/asn1/x2ap/Makefile
2782 epan/dissectors/asn1/x509af/Makefile
2783 epan/dissectors/asn1/x509ce/Makefile
2784 epan/dissectors/asn1/x509if/Makefile
2785 epan/dissectors/asn1/x509sat/Makefile
2787 capchild/doxygen.cfg
2789 caputils/doxygen.cfg
2795 epan/dfilter/Makefile
2796 epan/dissectors/Makefile
2797 epan/dissectors/dcerpc/Makefile
2798 epan/ftypes/Makefile
2812 packaging/macosx/Info.plist
2813 packaging/macosx/Makefile
2814 packaging/macosx/Wireshark_package.pmdoc/index.xml
2815 packaging/nsis/Makefile
2816 packaging/rpm/Makefile
2817 packaging/rpm/SPECS/Makefile
2818 packaging/rpm/SPECS/wireshark.spec
2819 packaging/wix/Makefile
2821 plugins/epan/ethercat/Makefile
2822 plugins/epan/gryphon/Makefile
2823 plugins/epan/irda/Makefile
2824 plugins/epan/mate/Makefile
2825 plugins/epan/opcua/Makefile
2826 plugins/epan/profinet/Makefile
2827 plugins/epan/stats_tree/Makefile
2828 plugins/epan/transum/Makefile
2829 plugins/epan/unistim/Makefile
2830 plugins/epan/wimax/Makefile
2831 plugins/epan/wimaxasncp/Makefile
2832 plugins/epan/wimaxmacphy/Makefile
2833 plugins/wiretap/usbdump/Makefile
2834 plugins/codecs/l16_mono/Makefile
2835 _CUSTOM_PLUGIN_CONFIG_FILES_
2836 randpkt_core/doxygen.cfg
2837 randpkt_core/Makefile
2839 tools/lemon/Makefile
2842 writecap/doxygen.cfg
2851 if test "x$have_gtk" = "xyes"; then
2852 gtk_lib_message=" (with GTK+ v$GTK_VERSION)"
2855 if test "x$have_qt" = "xyes" ; then
2856 enable_wireshark_qt="yes"
2857 qt_lib_message=" (with Qt$qt_version v$QT_VERSION)"
2859 enable_wireshark_qt="no"
2862 if test "x$enable_setcap_install" = "xyes" ; then
2863 setcap_message="yes"
2868 if test "x$enable_setuid_install" = "xyes" ; then
2869 setuid_message="yes"
2874 if test "x$DUMPCAP_GROUP" = "x" ; then
2875 dumpcap_group_message="(none)"
2877 dumpcap_group_message="$DUMPCAP_GROUP"
2880 if test "x$want_zlib" = "xno" ; then
2886 if test "x$have_lua" = "xyes" ; then
2892 if test "x$have_qt_multimedia_lib" = "xyes" ; then
2893 qt_multimedia_message="yes"
2895 qt_multimedia_message="no"
2898 if test "x$want_portaudio" = "xyes" ; then
2899 portaudio_message="yes"
2901 portaudio_message="no"
2904 if test "x$want_krb5" = "xno" ; then
2907 krb5_message="yes ($ac_krb5_version)"
2910 if test "x$have_good_c_ares" = "xyes" ; then
2911 c_ares_message="yes"
2913 c_ares_message="no (name resolution will be disabled)"
2916 if test "x$have_good_libcap" = "xyes" ; then
2917 libcap_message="yes"
2922 if test "x$have_good_maxminddb" = "xyes" ; then
2923 maxminddb_message="yes"
2925 maxminddb_message="no"
2928 if test "x$have_good_libssh" = "xyes" ; then
2929 libssh_message="yes"
2930 if test "x$have_ssh_userauth_agent" = "xno" ; then
2931 ssh_userauth_agent_message=" (without ssh_userauth_agent)"
2937 if test "x$have_good_nghttp2" = "xyes" ; then
2938 nghttp2_message="yes"
2940 nghttp2_message="no"
2943 if test "x$have_good_bcg729" = "xyes" ; then
2944 bcg729_message="yes"
2949 if test "x$have_wsug" = xyes -a "x$want_wsug" != xno; then
2956 echo " CPPFLAGS: $WS_CPPFLAGS $CPPFLAGS"
2958 echo " CFLAGS: $WS_CFLAGS $CFLAGS"
2960 echo " CXXFLAGS: $WS_CXXFLAGS $CXXFLAGS"
2962 echo " LDFLAGS: $WS_LDFLAGS $LDFLAGS"
2967 echo "The Wireshark package has been configured with the following options:"
2968 echo " GLib version : v$GLIB_VERSION"
2969 echo " Build wireshark : $enable_wireshark_qt$qt_lib_message"
2970 echo " Build wireshark-gtk : $have_gtk""$gtk_lib_message"
2971 echo " Build tshark : $enable_tshark"
2972 echo " Build tfshark : $enable_tfshark"
2973 echo " Build capinfos : $enable_capinfos"
2974 echo " Build captype : $enable_captype"
2975 echo " Build editcap : $enable_editcap"
2976 echo " Build dumpcap : $enable_dumpcap"
2977 echo " Build mergecap : $enable_mergecap"
2978 echo " Build reordercap : $enable_reordercap"
2979 echo " Build text2pcap : $enable_text2pcap"
2980 echo " Build randpkt : $enable_randpkt"
2981 echo " Build dftest : $enable_dftest"
2982 echo " Build rawshark : $enable_rawshark"
2983 echo " Build sharkd : $enable_sharkd"
2984 echo " Build fuzzshark : $enable_fuzzshark"
2985 echo " Build androiddump : $enable_androiddump"
2986 echo " Build sshdump : $enable_sshdump"
2987 echo " Build ciscodump : $enable_ciscodump"
2988 echo " Build randpktdump : $enable_randpktdump"
2989 echo " Build udpdump : $enable_udpdump"
2990 echo " Build MaxMind DB resolver : $maxminddb_message"
2991 echo " Build User's Guide : $wsug_message"
2993 echo " Save files as pcapng by default : $enable_pcap_ng_default"
2994 echo " Install dumpcap with capabilities : $setcap_message"
2995 echo " Install dumpcap setuid : $setuid_message"
2996 echo " Use dumpcap group : $dumpcap_group_message"
2997 echo " Use plugins : $have_plugins"
2998 echo " Use Lua library : $lua_message"
2999 echo " Build Qt RTP player : $qt_multimedia_message"
3000 echo " Build GTK+ RTP player : $portaudio_message"
3001 echo " Use pcap library : $want_pcap"
3002 echo " Use zlib library : $zlib_message"
3003 echo " Use kerberos library : $krb5_message"
3004 echo " Use c-ares library : $c_ares_message"
3005 echo " Use SMI MIB library : $have_libsmi"
3006 echo " Use GNU gcrypt library : yes"
3007 echo " Use GnuTLS library : $tls_message"
3008 echo " Use POSIX capabilities library : $libcap_message"
3009 echo " Use libssh library : ${libssh_message}${ssh_userauth_agent_message}"
3010 echo " Use nl library : $libnl_message"
3011 echo " Use SBC codec library : $have_sbc"
3012 echo " Use SpanDSP library : $have_spandsp"
3013 echo " Use bcg729 library : $bcg729_message"
3014 echo " Use libxml2 library : $have_libxml2"
3015 echo " Use nghttp2 library : $nghttp2_message"
3016 echo " Use LZ4 library : $have_lz4"
3017 echo " Use Snappy library : $have_snappy"
3018 #echo " Use GDK-Pixbuf with GResource: $have_gresource_pixbuf"
3020 # We're slowly migrating to CMake. The following still use or refer
3023 # - INSTALL and INSTALL.configure
3026 # - doc/README.packaging
3027 # - doc/README.idl2wrs
3028 # - doc/README.plugins
3029 # - docbook/wsdg_src/WSDG_chapter_dissection.asciidoc
3030 # - docbook/wsdg_src/WSDG_chapter_sources.asciidoc
3031 # - docbook/wsug_src/WSUG_chapter_build_install.asciidoc
3032 # - tools/git-compare-abis.sh
3034 AC_MSG_NOTICE([Builds using Autotools might be removed in the future.])