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@:>@],
253 [use Qt @<:@default=yes, if available@:>@]),
254 with_qt="$withval", with_qt="yes")
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 Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs Qt${qt_version}Core | sed -e 's/-F//' -e 's/ -framework.*//'`
1206 AC_SUBST(Qt_LDFLAGS)
1208 if test -z "${MOC_OPTIONS+1}"
1210 # Squelch moc verbose "nothing to do" output
1213 AC_SUBST(MOC_OPTIONS)
1220 # They didn't explicitly ask for Qt,
1221 # so just don't build with it.
1229 # This is probably macOS, and the
1230 # problem could be that this is a
1231 # later version of Qt that doesn't
1232 # install .pc files on macOS, so
1233 # pkg-config can't find it.
1235 AC_MSG_ERROR([Qt is not installed or may not work with the configure script; try using CMake, instead])
1240 # Qt might be installed, but only
1241 # for use by applications, not
1244 AC_MSG_ERROR([Qt is not installed for development])
1255 AC_MSG_ERROR([Qt 4 is not installed or may not work with the configure script; try using CMake, instead])
1262 AC_MSG_ERROR([Qt 4 is not installed for development])
1273 AC_MSG_ERROR([Qt 5 is not installed or may not work with the configure script; try using CMake, instead])
1280 AC_MSG_ERROR([Qt 5 is not installed for development])
1288 for want_gtk_version in $with_gtk; do
1289 AS_CASE([$want_gtk_version],
1290 [3], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK],
1291 [gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
1294 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`
1295 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=3"
1300 [2], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK],
1301 [gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
1304 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
1305 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=2"
1310 [fail3], [AC_MSG_ERROR([GTK+ 3 was requested but is not installed for development])],
1311 [fail2], [AC_MSG_ERROR([GTK+ 2 was requested but is not installed for development])],
1312 [fail], [AC_MSG_ERROR([GTK+ was requested but is not installed for development])])
1314 AS_IF([test "x$have_gtk" = xyes], [break])
1317 if test "$have_gtk" = "yes" ; then
1318 # If we're building with GTK, complain and then add flags for it
1320 AC_MSG_WARN([The GTK+ UI is deprecated and will be removed in a future release.])
1324 GTK_CONFIG="$GLIB_CONFIG"
1326 gtk_major_version=`echo $GTK_VERSION | cut -d. -f1`
1327 gtk_minor_version=`echo $GTK_VERSION | cut -d. -f2`
1329 AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATED], [GTK_CONFIG])
1330 if test \( $gtk_major_version -eq 3 -a $gtk_minor_version -ge 10 \) ; then
1331 ## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
1332 ## The deprecations in Gtk 3.10 will not be fixed ...
1333 AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATION_WARNINGS], [GTK_CONFIG])
1335 AX_APPEND_FLAG([-DGTK_DISABLE_DEPRECATED], [GTK_CONFIG])
1337 AX_APPEND_FLAG([-DGTK_DISABLE_SINGLE_INCLUDES], [GTK_CONFIG])
1338 if test ! \( $gtk_major_version -eq 2 -a $gtk_minor_version -lt 20 \) ; then
1339 # Enable GSEAL when building with GTK > 2.20
1340 # (Versions prior to 2.22 lacked some necessary accessors.)
1341 AX_APPEND_FLAG([-DGSEAL_ENABLE], [GTK_CONFIG])
1344 GTK_CFLAGS="$GTK_CONFIG $GTK_CFLAGS"
1348 AC_SUBST(GTK_CFLAGS)
1350 AC_SUBST(GUI_CONFIGURE_FLAGS)
1352 # Check for GTK GUI support for GResource pixbufs
1353 have_gresource_pixbuf=no
1354 if test "x$have_gtk" = "xyes"; then
1355 AC_MSG_CHECKING(whether GDK-Pixbuf can load data using GResource)
1356 PKG_CHECK_EXISTS([gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26],
1359 AC_DEFINE(HAVE_GDK_GRESOURCE, 1, [Defined if GResource is supported])
1360 have_gresource_pixbuf=yes
1362 [AC_MSG_RESULT(no)])
1364 AM_CONDITIONAL(HAVE_GRESOURCE_PIXBUF, test "x$have_gresource_pixbuf" = "xyes")
1366 if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
1367 # We have both GTK and Qt and thus will be building both wireshark
1368 # and wireshark-gtk.
1370 wireshark_bin="wireshark\$(EXEEXT) wireshark-gtk\$(EXEEXT)"
1371 wireshark_man="wireshark.1"
1372 wireshark_SUBDIRS="ui/qt ui/gtk"
1373 elif test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then
1374 # We don't have GTK+ but we have Qt.
1376 wireshark_bin="wireshark\$(EXEEXT)"
1377 wireshark_man="wireshark.1"
1378 wireshark_SUBDIRS="ui/qt"
1379 elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
1380 # We have GTK+ but not Qt.
1382 wireshark_bin="wireshark-gtk\$(EXEEXT)"
1383 wireshark_man="wireshark.1"
1384 wireshark_SUBDIRS="ui/gtk"
1385 elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
1386 # We have neither GTK+ nor Qt.
1388 # If they didn't explicitly say "--disable-wireshark",
1389 # fail (so that, unless they explicitly indicated that
1390 # they don't want Wireshark, we stop so they know they
1391 # won't be getting Wireshark unless they fix the GTK+/Qt
1394 if test "x$enable_wireshark" = "xyes"; then
1395 if test "$with_qt" != "no" -a "$with_gtk" != "no" ; then
1399 # This is probably macOS, and the
1400 # problem could be that this is a
1401 # later version of Qt that doesn't
1402 # install .pc files on macOS, so
1403 # pkg-config can't find it.
1405 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])
1410 # Qt might be installed, but only
1411 # for use by applications, not
1414 AC_MSG_ERROR([Neither Qt nor GTK+ are installed for development, so Wireshark can't be compiled])
1417 elif test "$with_qt" != "no" -a "$with_gtk" = "no" ; then
1421 # This is probably macOS, and the
1422 # problem could be that this is a
1423 # later version of Qt that doesn't
1424 # install .pc files on macOS, so
1425 # pkg-config can't find it.
1427 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])
1432 # Qt might be installed, but only
1433 # for use by applications, not
1436 AC_MSG_ERROR([Qt is not installed for development and GTK+ was not requested, so Wireshark can't be compiled])
1439 elif test "$with_qt" = "no" -a "$with_gtk" != "no" ; then
1440 AC_MSG_ERROR([Qt was not requested and GTK+ is not installed for development, so Wireshark can't be compiled])
1441 elif test "$with_qt" = "no" -a "$with_gtk" = "no" ; then
1442 AC_MSG_ERROR([Neither Qt nor GTK+ were requested, so Wireshark can't be compiled])
1447 wireshark_SUBDIRS=""
1451 # If we have <dlfcn.h>, check whether we have dladdr.
1453 if test "$ac_cv_header_dlfcn_h" = "yes"
1456 # Use GLib compiler flags and linker flags; GLib's gmodule
1457 # stuff uses the dl APIs if available, so it might know
1458 # what flags are needed.
1460 ac_save_CFLAGS="$CFLAGS"
1461 ac_save_LIBS="$LIBS"
1462 CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
1463 LIBS="$LIBS $GLIB_LIBS"
1464 AC_CHECK_FUNCS(dladdr)
1465 if test x$ac_cv_func_dladdr = xno
1468 # OK, try it with -ldl, in case you need that to get
1469 # dladdr(). For some reason, on Linux, that's not
1470 # part of the GLib flags; perhaps GLib itself is
1471 # linked with libdl, so that you can link with
1472 # Glib and it'll pull libdl in itself.
1475 AC_CHECK_FUNCS(dladdr)
1477 CFLAGS="$ac_save_CFLAGS"
1478 LIBS="$ac_save_LIBS"
1481 AC_SUBST(wireshark_bin)
1482 AC_SUBST(wireshark_man)
1483 AC_SUBST(wireshark_SUBDIRS)
1484 AM_CONDITIONAL(HAVE_Qt, test "$have_qt" = "yes")
1485 AM_CONDITIONAL(HAVE_GTK, test "$have_gtk" = "yes")
1487 # Enable/disable tshark
1488 AC_ARG_ENABLE(tshark,
1489 AC_HELP_STRING( [--enable-tshark],
1490 [build tshark @<:@default=yes@:>@]),
1491 tshark=$enableval,enable_tshark=yes)
1493 if test "x$enable_tshark" = "xyes" ; then
1494 tshark_bin="tshark\$(EXEEXT)"
1495 tshark_man="tshark.1"
1496 wiresharkfilter_man="wireshark-filter.4"
1501 AC_SUBST(tshark_bin)
1502 AC_SUBST(tshark_man)
1504 # Enable/disable editcap
1506 AC_ARG_ENABLE(editcap,
1507 AC_HELP_STRING( [--enable-editcap],
1508 [build editcap @<:@default=yes@:>@]),
1509 enable_editcap=$enableval,enable_editcap=yes)
1511 if test "x$enable_editcap" = "xyes" ; then
1512 editcap_bin="editcap\$(EXEEXT)"
1513 editcap_man="editcap.1"
1518 AC_SUBST(editcap_bin)
1519 AC_SUBST(editcap_man)
1522 # Enabling/disabling of dumpcap is done later (after we know if we have PCAP
1525 # Enable/disable capinfos
1527 AC_ARG_ENABLE(capinfos,
1528 AC_HELP_STRING( [--enable-capinfos],
1529 [build capinfos @<:@default=yes@:>@]),
1530 enable_capinfos=$enableval,enable_capinfos=yes)
1532 if test "x$enable_capinfos" = "xyes" ; then
1533 capinfos_bin="capinfos\$(EXEEXT)"
1534 capinfos_man="capinfos.1"
1539 AC_SUBST(capinfos_bin)
1540 AC_SUBST(capinfos_man)
1542 # Enable/disable captype
1544 AC_ARG_ENABLE(captype,
1545 AC_HELP_STRING( [--enable-captype],
1546 [build captype @<:@default=yes@:>@]),
1547 enable_captype=$enableval,enable_captype=yes)
1549 if test "x$enable_captype" = "xyes" ; then
1550 captype_bin="captype\$(EXEEXT)"
1551 captype_man="captype.1"
1556 AC_SUBST(captype_bin)
1557 AC_SUBST(captype_man)
1559 # Enable/disable mergecap
1561 AC_ARG_ENABLE(mergecap,
1562 AC_HELP_STRING( [--enable-mergecap],
1563 [build mergecap @<:@default=yes@:>@]),
1564 enable_mergecap=$enableval,enable_mergecap=yes)
1566 if test "x$enable_mergecap" = "xyes" ; then
1567 mergecap_bin="mergecap\$(EXEEXT)"
1568 mergecap_man="mergecap.1"
1573 AC_SUBST(mergecap_bin)
1574 AC_SUBST(mergecap_man)
1576 # Enable/disable reordercap
1578 AC_ARG_ENABLE(reordercap,
1579 AC_HELP_STRING( [--enable-reordercap],
1580 [build reordercap @<:@default=yes@:>@]),
1581 enable_reordercap=$enableval,enable_reordercap=yes)
1583 if test "x$enable_reordercap" = "xyes" ; then
1584 reordercap_bin="reordercap\$(EXEEXT)"
1585 reordercap_man="reordercap.1"
1590 AC_SUBST(reordercap_bin)
1591 AC_SUBST(reordercap_man)
1593 # Enable/disable text2pcap
1595 AC_ARG_ENABLE(text2pcap,
1596 AC_HELP_STRING( [--enable-text2pcap],
1597 [build text2pcap @<:@default=yes@:>@]),
1598 text2pcap=$enableval,enable_text2pcap=yes)
1600 if test "x$enable_text2pcap" = "xyes" ; then
1601 text2pcap_bin="text2pcap\$(EXEEXT)"
1602 text2pcap_man="text2pcap.1"
1607 AC_SUBST(text2pcap_bin)
1608 AC_SUBST(text2pcap_man)
1610 # Enable/disable dftest
1612 AC_ARG_ENABLE(dftest,
1613 AC_HELP_STRING( [--enable-dftest],
1614 [build dftest @<:@default=yes@:>@]),
1615 enable_dftest=$enableval,enable_dftest=yes)
1617 if test "x$enable_dftest" = "xyes" ; then
1618 dftest_bin="dftest\$(EXEEXT)"
1619 dftest_man="dftest.1"
1624 AC_SUBST(dftest_bin)
1625 AC_SUBST(dftest_man)
1627 # Enable/disable randpkt
1629 AC_ARG_ENABLE(randpkt,
1630 AC_HELP_STRING( [--enable-randpkt],
1631 [build randpkt @<:@default=yes@:>@]),
1632 enable_randpkt=$enableval,enable_randpkt=yes)
1634 if test "x$enable_randpkt" = "xyes" ; then
1635 randpkt_bin="randpkt\$(EXEEXT)"
1636 randpkt_man="randpkt.1"
1641 AC_SUBST(randpkt_bin)
1642 AC_SUBST(randpkt_man)
1644 AC_SUBST(wiresharkfilter_man)
1647 AC_MSG_CHECKING(whether to use libpcap for packet capture)
1650 AC_HELP_STRING( [--with-pcap@<:@=DIR@:>@],
1651 [use libpcap for packet capturing @<:@default=yes@:>@]),
1653 if test $withval = no
1656 elif test $withval = yes
1667 if test "x$want_pcap" = "xno" ; then
1671 AC_WIRESHARK_PCAP_CHECK
1675 AC_MSG_CHECKING(whether to build dumpcap)
1677 AC_ARG_ENABLE(dumpcap,
1678 AC_HELP_STRING( [--enable-dumpcap],
1679 [build dumpcap @<:@default=yes@:>@]),
1680 enable_dumpcap=$enableval,enable_dumpcap=yes)
1682 if test "x$enable_dumpcap" = "xyes" ; then
1683 if test "x$want_pcap" = "xno" ; then
1685 AC_MSG_RESULT(pcap not installed for development - disabling dumpcap)
1693 if test "x$enable_dumpcap" = "xyes" ; then
1694 dumpcap_bin="dumpcap\$(EXEEXT)"
1695 dumpcap_man="dumpcap.1"
1700 AC_SUBST(dumpcap_bin)
1701 AC_SUBST(dumpcap_man)
1703 # Enable/disable rawshark
1706 AC_MSG_CHECKING(whether to build rawshark)
1708 AC_ARG_ENABLE(rawshark,
1709 AC_HELP_STRING( [--enable-rawshark],
1710 [build rawshark @<:@default=yes@:>@]),
1711 rawshark=$enableval,enable_rawshark=yes)
1713 if test "x$enable_rawshark" = "xyes" ; then
1714 if test "x$want_pcap" = "xno" ; then
1716 AC_MSG_RESULT(pcap not installed for development - disabling rawshark)
1724 if test "x$enable_rawshark" = "xyes" ; then
1725 rawshark_bin="rawshark\$(EXEEXT)"
1726 rawshark_man="rawshark.1"
1731 AC_SUBST(rawshark_bin)
1732 AC_SUBST(rawshark_man)
1734 # Enable/disable sharkd
1735 AC_ARG_ENABLE(sharkd,
1736 AC_HELP_STRING( [--enable-sharkd],
1737 [build sharkd @<:@default=yes@:>@]),
1738 sharkd=$enableval,enable_sharkd=yes)
1740 if test "x$enable_sharkd" = "xyes" ; then
1741 sharkd_bin="sharkd\$(EXEEXT)"
1745 AC_SUBST(sharkd_bin)
1747 # Enable/disable tfshark
1748 AC_ARG_ENABLE(tfshark,
1749 AC_HELP_STRING( [--enable-tfshark],
1750 [build tfshark (Experimental) @<:@default=no@:>@]),
1751 tfshark=$enableval,enable_tfshark=no)
1753 if test "x$enable_tfshark" = "xyes" ; then
1754 tfshark_bin="tfshark\$(EXEEXT)"
1755 tfshark_man="tfshark.1"
1756 wiresharkfilter_man="wireshark-filter.4"
1761 AC_SUBST(tfshark_bin)
1762 AC_SUBST(tfshark_man)
1764 # Enable/disable fuzzshark
1765 AC_ARG_ENABLE(fuzzshark,
1766 AC_HELP_STRING( [--enable-fuzzshark],
1767 [build fuzzshark @<:@default=yes@:>@]),
1768 fuzzshark=$enableval,enable_fuzzshark=yes)
1770 if test "x$enable_fuzzshark" = "xyes" ; then
1771 fuzzshark_bin="fuzzshark\$(EXEEXT)"
1775 AC_SUBST(fuzzshark_bin)
1778 dnl Use pcapng by default
1779 AC_ARG_ENABLE(pcap-ng-default,
1780 AC_HELP_STRING( [--enable-pcap-ng-default],
1781 [use the pcapng file format by default instead of pcap @<:@default=yes@:>@]),
1782 enable_pcap_ng_default=$enableval,enable_pcap_ng_default=yes)
1783 if test x$enable_pcap_ng_default = xyes; then
1784 AC_DEFINE(PCAP_NG_DEFAULT, 1, [Support for pcapng])
1788 AC_MSG_CHECKING(whether to use zlib for gzip compression and decompression)
1791 AC_HELP_STRING([--with-zlib@<:@=DIR@:>@],
1792 [use zlib (located in directory DIR, if supplied) for gzip compression and decompression @<:@default=yes, if available@:>@]),
1794 if test "x$withval" = "xno"
1797 elif test "x$withval" = "xyes"
1806 # Use zlib if it's present, otherwise don't.
1808 want_zlib=ifavailable
1811 if test "x$want_zlib" = "xno" ; then
1815 AC_WIRESHARK_ZLIB_CHECK
1816 if test "x$want_zlib" = "xno" ; then
1817 AC_MSG_RESULT(zlib not found - disabling gzip compression and decompression)
1819 if test "x$ac_cv_func_inflatePrime" = "xno" ; then
1820 AC_MSG_RESULT(inflatePrime not found in zlib - disabling gzipped capture file support)
1827 AC_MSG_CHECKING(whether to use lz4 compression and decompression)
1830 AC_HELP_STRING([--with-lz4@<:@=DIR@:>@],
1831 [use lz4 (located in directory DIR, if supplied) for lz4 compression and decompression @<:@default=yes, if available@:>@]),
1833 if test "x$withval" = "xno"
1836 elif test "x$withval" = "xyes"
1845 # Use lz4 if it's present, otherwise don't.
1847 want_lz4=ifavailable
1851 if test "x$want_lz4" = "xno" ; then
1855 AC_WIRESHARK_LZ4_CHECK
1856 if test "x$want_lz4" = "xno" ; then
1857 AC_MSG_RESULT(lz4 not found - disabling lz4 compression and decompression)
1859 if test "x$ac_cv_func_LZ4_decompress_safe" = "xno" ; then
1860 AC_MSG_RESULT(LZ4_decompress_safe not found in lz4 - disabling cql lz4 decompression)
1870 AC_MSG_CHECKING(whether to use snappy compression and decompression)
1873 AC_HELP_STRING([--with-snappy@<:@=DIR@:>@],
1874 [use snappy (located in directory DIR, if supplied) for snappy compression and decompression @<:@default=yes, if available@:>@]),
1876 if test "x$withval" = "xno"
1879 elif test "x$withval" = "xyes"
1884 snappy_dir="$withval"
1888 # Use snappy if it's present, otherwise don't.
1890 want_snappy=ifavailable
1894 if test "x$want_snappy" = "xno" ; then
1898 AC_WIRESHARK_SNAPPY_CHECK
1899 if test "x$want_snappy" = "xno" ; then
1900 AC_MSG_RESULT(snappy not found - disabling snappy compression and decompression)
1902 if test "x$ac_cv_func_snappy_uncompress" = "xno" ; then
1903 AC_MSG_RESULT(snappy_uncompress not found in snappy - disabling cql snappy decompression)
1909 AC_SUBST(SNAPPY_LIBS)
1913 AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
1914 [use liblua (located in directory DIR, if supplied) for the Lua scripting plugin @<:@default=yes, if available@:>@]),
1916 if test $withval = no
1919 elif test $withval = yes
1924 want_lua_dir=$withval
1927 # By default use Lua if we can find it
1928 want_lua=ifavailable
1931 if test "x$want_lua" != "xno" ; then
1932 AC_WIRESHARK_LIBLUA_CHECK
1934 if test "x$want_lua" = "xyes" -a "x$have_lua" = "xno"
1936 AC_MSG_ERROR([Lua support was requested, but is not installed for development])
1939 if test "x$have_lua" = "xyes"
1941 AC_DEFINE(HAVE_LUA, 1, [Define to use Lua])
1943 AM_CONDITIONAL(HAVE_LIBLUA, test x$have_lua = xyes)
1945 AC_SUBST(LUA_CFLAGS)
1949 AC_MSG_CHECKING(whether to use libportaudio for the GTK+ RTP player)
1951 AC_ARG_WITH(portaudio,
1952 AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@],
1953 [use libportaudio (located in directory DIR, if supplied) for the GTK+ RTP player @<:@default=yes, if available@:>@]),
1955 if test $withval = no
1958 elif test $withval = yes
1963 portaudio_dir=$withval
1967 # Use libportaudio by default
1969 want_portaudio=ifavailable
1972 if test "x$want_portaudio" = "xno" ; then
1976 AC_WIRESHARK_LIBPORTAUDIO_CHECK
1977 if test "x$want_portaudio" = "xno" ; then
1978 AC_MSG_RESULT(libportaudio not found - disabling support for the GTK+ RTP player)
1981 AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
1984 dnl Check if dumpcap should be installed with filesystem capabilities
1985 AC_PATH_PROG(SETCAP, setcap)
1986 AC_ARG_ENABLE(setcap-install,
1987 AC_HELP_STRING( [--enable-setcap-install],
1988 [install dumpcap with cap_net_admin and cap_net_raw @<:@default=no@:>@]),
1989 enable_setcap_install=$enableval,enable_setcap_install=no)
1991 AC_MSG_CHECKING(whether to install dumpcap with cap_net_admin and cap_net_raw capabilities)
1992 if test "x$enable_setcap_install" = "xno" ; then
1995 if test "x$SETCAP" = "x" ; then
1996 AC_MSG_RESULT(setcap not found)
1997 AC_MSG_ERROR([Setcap install was requested, but setcap was not found])
1998 elif test "x$enable_dumpcap" = "xno" ; then
1999 AC_MSG_RESULT(dumpcap disabled)
2000 AC_MSG_ERROR([Setcap install works only with dumpcap, but dumpcap is disabled])
2006 AM_CONDITIONAL(SETCAP_INSTALL, test x$enable_setcap_install = xyes)
2008 dnl Check if dumpcap should be installed setuid
2009 AC_ARG_ENABLE(setuid-install,
2010 AC_HELP_STRING( [--enable-setuid-install],
2011 [install dumpcap as setuid @<:@default=no@:>@]),
2012 enable_setuid_install=$enableval,enable_setuid_install=no)
2014 AC_MSG_CHECKING(whether to install dumpcap setuid)
2015 if test "x$enable_setuid_install" = "xno" ; then
2018 if test "x$enable_setcap_install" = "xyes" ; then
2019 enable_setuid_install=no
2020 AC_MSG_RESULT(setcap and setuid both selected)
2021 AC_MSG_ERROR(You must choose one of setcap install and setuid install)
2022 elif test "x$enable_dumpcap" = "xno" ; then
2023 AC_MSG_RESULT(dumpcap disabled)
2024 AC_MSG_ERROR([Setuid install works only with dumpcap, but dumpcap is disabled])
2030 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
2031 AC_CHECK_FUNCS(setresuid setresgid)
2033 dnl ...but our Network Operations group is named "no"!
2035 AC_ARG_WITH(dumpcap-group,
2036 AC_HELP_STRING( [--with-dumpcap-group=GROUP],
2037 [restrict dumpcap to GROUP]),
2039 if test "x$withval" = "xyes"; then
2040 AC_MSG_ERROR([No dumpcap group specified.])
2041 elif test "x$withval" != "xno"; then
2042 if test "x$enable_dumpcap" = "xno" ; then
2043 AC_MSG_ERROR(dumpcap group install works only with dumpcap but dumpcap is disabled)
2045 AC_MSG_RESULT($withval)
2046 DUMPCAP_GROUP="$withval"
2049 AC_SUBST(DUMPCAP_GROUP)
2050 AM_CONDITIONAL(HAVE_DUMPCAP_GROUP, test x$DUMPCAP_GROUP != x)
2052 dnl libcap (not libpcap) check
2054 AC_MSG_CHECKING(whether to use the libcap capabilities library)
2057 AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@],
2058 [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management @<:@default=yes, if present@:>@]),
2060 if test "x$withval" = "xno"; then
2062 elif test "x$withval" = "xyes"; then
2064 elif test -d "$withval"; then
2066 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2069 if test "x$with_libcap" = "xno" ; then
2073 AC_WIRESHARK_LIBCAP_CHECK
2075 AC_SUBST(LIBCAP_LIBS)
2077 dnl Checks for header files.
2078 dnl Some of these may not be needed: http://hacks.owlfolio.org/header-survey/
2079 dnl Note, however, that, whilst this script is generally run only on UN*Xes:
2081 dnl 1) we also support building on and for Windows and not all of those
2082 dnl headers are present on Windows, so the code has to check a
2083 dnl #define *anyway* to determine whether to include the header
2088 dnl 2) this might also be run on Windows with a sufficiently UNIXy
2089 dnl environment such as Cygwin (although Wireshark should be built
2090 dnl natively rather than using Cygwin).
2092 AC_CHECK_HEADERS(fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h unistd.h)
2093 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)
2094 AC_CHECK_HEADERS(netinet/in.h)
2095 AC_CHECK_HEADERS(arpa/inet.h)
2096 AC_CHECK_HEADERS(ifaddrs.h)
2099 # On Linux, check for some additional headers, which we need as a
2100 # workaround for a bonding driver bug and for libpcap's current lack
2101 # of its own workaround for that bug.
2105 AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,,[#include <sys/socket.h>])
2110 AC_MSG_CHECKING(whether to use Kerberos library)
2113 AC_HELP_STRING( [--with-krb5@<:@=DIR@:>@],
2114 [use Kerberos library (located in directory DIR, if supplied) to use in Kerberos dissection @<:@default=yes@:>@]),
2116 if test $withval = no
2119 elif test $withval = yes
2128 # Use Kerberos library if available, otherwise don't.
2130 want_krb5=ifavailable
2133 if test "x$want_krb5" = "xno" ; then
2137 AC_WIRESHARK_KRB5_CHECK
2141 dnl We use GnuTLS for SSL decryption but some builds of Kerberos require
2142 dnl linking with OpenSSL. We don't want to build with it by default due to
2143 dnl annoying license incompatibilities between the OpenSSL license and the GPL,
2144 dnl so we require an explicit option to configure.
2146 AC_ARG_WITH(krb5-crypto-openssl,
2147 AC_HELP_STRING( [--with-krb5-crypto-openssl],
2148 [Allow linking with OpenSSL for Kerberos crypto backend @<:@default=no@:>@]))
2152 AC_MSG_CHECKING(whether to use the c-ares library if available)
2155 AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@],
2156 [use c-ares (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2158 if test "x$withval" = "xno"; then
2160 elif test "x$withval" = "xyes"; then
2162 elif test -d "$withval"; then
2164 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2167 if test "x$want_c_ares" = "xno" ; then
2171 AC_WIRESHARK_C_ARES_CHECK
2173 AC_SUBST(C_ARES_LIBS)
2175 dnl MaxMind DB Check
2177 AC_MSG_CHECKING(whether to use the MaxMind DB IP address mapping library if available)
2179 AC_ARG_WITH(maxminddb,
2180 AC_HELP_STRING( [--with-maxminddb@<:@=DIR@:>@],
2181 [use MaxMind DB (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2183 if test "x$withval" = "xno"; then
2185 elif test "x$withval" = "xyes"; then
2187 elif test -d "$withval"; then
2189 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2192 if test "x$want_maxminddb" = "xno"; then
2196 AC_WIRESHARK_MAXMINDDB_CHECK
2198 AC_SUBST(MAXMINDDB_LIBS)
2200 if test "x$have_good_maxminddb" = "xyes" ; then
2201 mmdbresolve_bin="mmdbresolve\$(EXEEXT)"
2202 mmdbresolve_man="mmdbresolve.1"
2207 AC_SUBST(mmdbresolve_bin)
2208 AC_SUBST(mmdbresolve_man)
2212 AC_MSG_CHECKING(whether to use the libssh library if available)
2215 AC_HELP_STRING( [--with-libssh@<:@=DIR@:>@],
2216 [use libssh (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2218 if test "x$withval" = "xno"; then
2220 elif test "x$withval" = "xyes"; then
2222 elif test -d "$withval"; then
2224 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2227 if test "x$want_libssh" = "xno"; then
2231 AC_WIRESHARK_LIBSSH_CHECK
2233 AC_SUBST(LIBSSH_LIBS)
2237 AC_MSG_CHECKING(whether to use the nghttp2 HPACK library if available)
2239 AC_ARG_WITH(nghttp2,
2240 AC_HELP_STRING( [--with-nghttp2@<:@=DIR@:>@],
2241 [use nghttp2 (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2243 if test "x$withval" = "xno"; then
2245 elif test "x$withval" = "xyes"; then
2247 elif test -d "$withval"; then
2249 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2252 if test "x$want_nghttp2" = "xno"; then
2256 AC_WIRESHARK_NGHTTP2_CHECK
2258 AC_SUBST(NGHTTP2_LIBS)
2260 dnl Checks for typedefs, structures, and compiler characteristics.
2263 # Check how we can get the time zone abbreviation
2266 # We need to know whether "struct stat" has an "st_flags" member
2267 # for file_user_immutable().
2269 AC_CHECK_MEMBERS([struct stat.st_flags])
2271 # We need to know whether "struct stat" has an "st_birthtime" member
2272 # or an "__st_birthtime" member for the file set dialog.
2274 AC_CHECK_MEMBERS([struct stat.st_birthtime])
2275 AC_CHECK_MEMBERS([struct stat.__st_birthtime])
2277 # We need to know whether "struct sockaddr" has an "sa_len" member
2278 # for get_interface_list().
2280 AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,
2281 [#ifdef HAVE_SYS_TYPES_H
2282 #include <sys/types.h>
2284 #ifdef HAVE_SYS_SOCKET_H
2285 #include <sys/socket.h>
2288 AC_REPLACE_FUNCS(getopt_long)
2289 if test "x$ac_cv_func_getopt_long" = xyes; then
2291 # The OS has getopt_long(), so it might have optreset. Do we have it?
2293 AC_CACHE_CHECK([whether optreset is defined], ac_cv_have_optreset,
2294 AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int optreset;return optreset;]])],
2295 ac_cv_have_optreset=yes, ac_cv_have_optreset=no))
2296 if test "$ac_cv_have_optreset" = yes ; then
2297 AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if you have the optreset variable])
2301 # The OS doesn't have getopt_long(), so we're using the GNU libc
2302 # version that we have in wsutil. It doesn't have optreset, so we
2303 # don't need to check for it.
2305 # However, it uses alloca(), so we may need to include alloca.h;
2308 AC_CHECK_HEADERS(alloca.h)
2311 AC_REPLACE_FUNCS(strptime)
2313 AC_CHECK_FUNCS(mkstemps)
2314 AC_CHECK_FUNCS(issetugid)
2315 AC_CHECK_FUNCS(sysconf)
2316 AC_CHECK_FUNCS(getifaddrs)
2317 AC_CHECK_FUNC(getexecname)
2320 # Check for SpeexDSP (http://www.speex.org)
2322 AS_IF([test "x$have_qt_multimedia_lib" = xyes],
2323 [PKG_CHECK_MODULES(SPEEXDSP, speexdsp, [have_speexdsp=yes], [have_speexdsp=no])])
2324 AS_IF([test "x$have_speexdsp" = xyes],
2325 [AC_DEFINE(HAVE_SPEEXDSP, 1, [Define to 1 if you have SpeexDSP])])
2326 AM_CONDITIONAL(HAVE_SPEEXDSP, [test "x$have_speexdsp" = "xyes"])
2328 # Check Bluetooth SBC codec for RTP Player
2329 # git://git.kernel.org/pub/scm/bluetooth/sbc.git
2331 AC_HELP_STRING( [--with-sbc=@<:@yes/no@:>@],
2332 [use SBC codec to play Bluetooth A2DP stream @<:@default=yes, if available@:>@]),
2333 with_sbc="$withval"; want_sbc="yes", with_sbc="yes")
2335 PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
2336 if test "x$with_sbc" != "xno"; then
2337 if (test "${have_sbc}" = "yes"); then
2338 AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library])
2339 elif test "x$want_sbc" = "xyes"; then
2340 # Error out if the user explicitly requested the sbc library
2341 AC_MSG_ERROR([SBC codec library was requested, but is not installed for development])
2346 AM_CONDITIONAL(HAVE_SBC, test "x$have_sbc" = "xyes")
2349 # Check SpanDSP library for RTP Player
2350 # http://www.soft-switch.org/
2351 AC_ARG_WITH([spandsp],
2352 AC_HELP_STRING( [--with-spandsp=@<:@yes/no@:>@],
2353 [use SpanDSP to play G.722/G.726 codecs @<:@default=yes, if available@:>@]),
2354 with_spandsp="$withval"; want_spandsp="yes", with_spandsp="yes")
2356 PKG_CHECK_MODULES(SPANDSP, spandsp, [have_spandsp=yes], [have_spandsp=no])
2357 if test "x$with_spandsp" != "xno"; then
2358 if (test "${have_spandsp}" = "yes"); then
2359 AC_DEFINE(HAVE_SPANDSP, 1, [Define if you have the SpanDSP library])
2360 elif test "x$want_spandsp" = "xyes"; then
2361 # Error out if the user explicitly requested the SpanDSP library
2362 AC_MSG_ERROR([SpanDSP library was requested, but is not installed for development])
2367 AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes")
2370 # Check bcg729 library for RTP Player
2371 # https://www.linphone.org/technical-corner/bcg729/overview
2374 AC_MSG_CHECKING(whether to use the bcg729 library if available)
2376 AC_ARG_WITH([bcg729],
2377 AC_HELP_STRING( [--with-bcg729=@<:@=DIR@:>@],
2378 [use bcg729 to play G.729 codec(located in directory DIR, if supplied) @<:@default=yes, if present@:>@]),
2380 if test "x$withval" = "xno"; then
2382 elif test "x$withval" = "xyes"; then
2384 elif test -d "$withval"; then
2386 AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
2389 if test "x$want_bcg729" = "xno"; then
2393 AC_WIRESHARK_BCG729_CHECK
2395 AC_SUBST(BCG729_LIBS)
2396 AM_CONDITIONAL(HAVE_BCG729, test "x$have_good_bcg729" = "xyes")
2400 AC_ARG_WITH(libxml2,
2401 AC_HELP_STRING([--with-libxml2=@<:@yes/no@:>@],
2402 [Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors @<:@default=yes, if available@:>@]),
2403 with_libxml2="$withval"; want_libxml2="yes", with_libxml2="yes")
2405 PKG_CHECK_MODULES(LIBXML2, libxml-2.0, [have_libxml2=yes], [have_libxml2=no])
2406 if test "x$with_libxml2" != "xno"; then
2407 if (test "${have_libxml2}" = "yes"); then
2408 AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have libxml2])
2409 elif test "x$want_libxml2" = "xyes"; then
2410 # Error out if the user explicitly requested libxml2
2411 AC_MSG_ERROR([Libxml2 was requested, but is not installed for development])
2416 AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes")
2422 AC_HELP_STRING([--with-libsmi=@<:@yes/no@:>@],
2423 [use libsmi MIB/PIB library @<:@default=yes, if available@:>@]),
2424 [], [with_libsmi="if_available"])
2427 if test "x$with_libsmi" != "xno"; then
2428 PKG_CHECK_MODULES(LIBSMI, libsmi,
2430 AC_DEFINE(HAVE_LIBSMI, 1, [Define if you have libsmi])
2432 [if test "x$with_libsmi" = "xyes"; then
2433 # Error out if the user explicitly requested libsmi
2434 AC_MSG_ERROR([Libsmi was requested, but is not installed for development])
2441 dnl check whether plugins should be enabled
2443 AC_ARG_ENABLE(plugins,
2444 AC_HELP_STRING( [--enable-plugins],
2445 [support plugins (if available on your platform) @<:@default=yes@:>@]),
2446 [have_plugins=$enableval], [have_plugins=yes])
2448 AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
2449 if test x$have_plugins = xyes
2451 AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
2453 dnl we don't wish to expand ${libdir} yet
2454 plugindir="\${libdir}/wireshark/plugins/$VERSION_RELEASE"
2458 # The plugin dissectors reside in ./plugins/PROTO/
2461 AC_SUBST(PLUGIN_LIBS)
2464 dnl check whether extcap programs should be enabled and, if they should be,
2465 dnl check for extcap directory - stolen from Amanda's configure.ac
2467 dnl we don't wish to expand ${libdir} yet
2468 extcapdir="\${libdir}/wireshark/extcap"
2469 extcap_man="extcap.4"
2471 AC_SUBST(extcap_man)
2474 dnl androiddump check
2475 AC_MSG_CHECKING(whether to build androiddump)
2477 AC_ARG_ENABLE(androiddump,
2478 AC_HELP_STRING( [--enable-androiddump],
2479 [build androiddump @<:@default=yes@:>@]),
2480 androiddump=$enableval,enable_androiddump=yes)
2482 if test "x$enable_androiddump" = "xyes" ; then
2488 AC_ARG_ENABLE(androiddump_use_libpcap,
2489 AC_HELP_STRING( [--enable-androiddump-use-libpcap],
2490 [build androiddump using libpcap @<:@default=no@:>@]),
2491 androiddump_use_libpcap=$enableval,enable_androiddump_use_libpcap=no)
2493 if test "x$enable_androiddump" = "xyes" -a "x$enable_androiddump_use_libpcap" = "xyes" ; then
2494 AC_DEFINE(ANDROIDDUMP_USE_LIBPCAP, 1, [Androiddump will use Libpcap])
2497 if test "x$enable_androiddump" = "xyes" ; then
2498 androiddump_bin="androiddump\$(EXEEXT)"
2499 androiddump_man="androiddump.1"
2504 AC_SUBST(androiddump_bin)
2505 AC_SUBST(androiddump_man)
2508 AC_MSG_CHECKING(whether to build sshdump)
2510 AC_ARG_ENABLE(sshdump,
2511 AC_HELP_STRING( [--enable-sshdump],
2512 [build sshdump @<:@default=yes@:>@]),
2513 [],[enable_sshdump=yes])
2515 if test "x$have_libssh_pointsix" != xyes; then
2516 AC_MSG_RESULT([no, libssh >= 0.6.0 not installed for development])
2518 elif test "x$enable_sshdump" = "xyes" ; then
2524 if test "x$enable_sshdump" = "xyes" ; then
2525 sshdump_bin="sshdump\$(EXEEXT)"
2526 sshdump_man="sshdump.1"
2531 AC_SUBST(sshdump_bin)
2532 AC_SUBST(sshdump_man)
2535 AC_MSG_CHECKING(whether to build ciscodump)
2537 AC_ARG_ENABLE(ciscodump,
2538 AC_HELP_STRING( [--enable-ciscodump],
2539 [build ciscodump @<:@default=yes@:>@]),
2540 [],[enable_ciscodump=yes])
2542 if test "x$have_libssh_pointsix" != xyes; then
2543 AC_MSG_RESULT([no, libssh >= 0.6.0 not installed for development])
2545 elif test "x$enable_ciscodump" = "xyes" ; then
2551 if test "x$enable_ciscodump" = "xyes" ; then
2552 ciscodump_bin="ciscodump\$(EXEEXT)"
2553 ciscodump_man="ciscodump.1"
2558 AC_SUBST(ciscodump_bin)
2559 AC_SUBST(ciscodump_man)
2561 dnl randpktdump check
2562 AC_MSG_CHECKING(whether to build randpktdump)
2564 AC_ARG_ENABLE(randpktdump,
2565 AC_HELP_STRING( [--enable-randpktdump],
2566 [build randpktdump @<:@default=yes@:>@]),
2567 randpktdump=$enableval,enable_randpktdump=yes)
2569 if test "x$enable_randpktdump" = "xyes" ; then
2575 if test "x$enable_randpktdump" = "xyes" ; then
2576 randpktdump_bin="randpktdump\$(EXEEXT)"
2577 randpktdump_man="randpktdump.1"
2582 AC_SUBST(randpktdump_bin)
2583 AC_SUBST(randpktdump_man)
2586 AC_MSG_CHECKING(whether to build udpdump)
2588 AC_ARG_ENABLE(udpdump,
2589 AC_HELP_STRING( [--enable-udpdump],
2590 [build udpdump @<:@default=yes@:>@]),
2591 [],[enable_udpdump=yes])
2593 if test "x$enable_udpdump" = "xyes" ; then
2599 if test "x$enable_udpdump" = "xyes" ; then
2600 udpdump_bin="udpdump\$(EXEEXT)"
2601 udpdump_man="udpdump.1"
2606 AC_SUBST(udpdump_bin)
2607 AC_SUBST(udpdump_man)
2609 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
2610 if test x$enable_static = xyes
2612 AC_DEFINE(ENABLE_STATIC, 1, [Link Wireshark libraries statically])
2615 # Gather which GUI we're building for rpmbuild
2616 if test "x$have_gtk" = "xyes"; then
2617 if test "x$gtk_major_version" = "x3"; then
2618 RPMBUILD_WITH_ARGS="--with gtk3 --without gtk2"
2620 RPMBUILD_WITH_ARGS="--without gtk3 --with gtk2"
2623 RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3"
2625 if test "x$have_qt" = "xyes" ; then
2626 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt5"
2628 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt --without qt5"
2630 if test "x$have_lua" = "xyes" ; then
2631 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with lua"
2633 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without lua"
2635 AC_SUBST(RPMBUILD_WITH_ARGS)
2636 AC_SUBST(RPM_VERSION, version_major.version_minor.version_micro)
2638 AC_SUBST(WS_CPPFLAGS)
2640 AC_SUBST(WS_CXXFLAGS)
2641 AC_SUBST(WS_LDFLAGS)
2643 AC_SUBST(WS_CFLAGS_FOR_BUILD)
2645 AH_BOTTOM([#include <ws_diag_control.h>])
2647 dnl Save the cacheable configure results to config.cache before recursing
2650 m4_sinclude(plugins/Custom.m4) dnl
2651 m4_ifndef(_CUSTOM_PLUGIN_CONFIG_FILES_, m4_define(_CUSTOM_PLUGIN_CONFIG_FILES_)) dnl
2653 sinclude(epan/dissectors/asn1/Custom.m4) dnl
2654 ifdef(_CUSTOM_ASN1_AC_OUTPUT_,, define(_CUSTOM_ASN1_AC_OUTPUT_, )) dnl
2656 AC_CONFIG_HEADERS([config.h])
2661 epan/dissectors/asn1/Makefile
2663 _CUSTOM_ASN1_AC_OUTPUT_
2664 epan/dissectors/asn1/acp133/Makefile
2665 epan/dissectors/asn1/acse/Makefile
2666 epan/dissectors/asn1/ansi_map/Makefile
2667 epan/dissectors/asn1/ansi_tcap/Makefile
2668 epan/dissectors/asn1/atn-cm/Makefile
2669 epan/dissectors/asn1/atn-cpdlc/Makefile
2670 epan/dissectors/asn1/atn-ulcs/Makefile
2671 epan/dissectors/asn1/c1222/Makefile
2672 epan/dissectors/asn1/camel/Makefile
2673 epan/dissectors/asn1/cdt/Makefile
2674 epan/dissectors/asn1/charging_ase/Makefile
2675 epan/dissectors/asn1/cmip/Makefile
2676 epan/dissectors/asn1/cmp/Makefile
2677 epan/dissectors/asn1/crmf/Makefile
2678 epan/dissectors/asn1/cms/Makefile
2679 epan/dissectors/asn1/credssp/Makefile
2680 epan/dissectors/asn1/dap/Makefile
2681 epan/dissectors/asn1/disp/Makefile
2682 epan/dissectors/asn1/dop/Makefile
2683 epan/dissectors/asn1/dsp/Makefile
2684 epan/dissectors/asn1/ess/Makefile
2685 epan/dissectors/asn1/f1ap/Makefile
2686 epan/dissectors/asn1/ftam/Makefile
2687 epan/dissectors/asn1/goose/Makefile
2688 epan/dissectors/asn1/gprscdr/Makefile
2689 epan/dissectors/asn1/gsm_map/Makefile
2690 epan/dissectors/asn1/h225/Makefile
2691 epan/dissectors/asn1/h235/Makefile
2692 epan/dissectors/asn1/h245/Makefile
2693 epan/dissectors/asn1/h248/Makefile
2694 epan/dissectors/asn1/h282/Makefile
2695 epan/dissectors/asn1/h283/Makefile
2696 epan/dissectors/asn1/h323/Makefile
2697 epan/dissectors/asn1/h450/Makefile
2698 epan/dissectors/asn1/h450-ros/Makefile
2699 epan/dissectors/asn1/h460/Makefile
2700 epan/dissectors/asn1/h501/Makefile
2701 epan/dissectors/asn1/HI2Operations/Makefile
2702 epan/dissectors/asn1/hnbap/Makefile
2703 epan/dissectors/asn1/idmp/Makefile
2704 epan/dissectors/asn1/ilp/Makefile
2705 epan/dissectors/asn1/inap/Makefile
2706 epan/dissectors/asn1/isdn-sup/Makefile
2707 epan/dissectors/asn1/kerberos/Makefile
2708 epan/dissectors/asn1/lcsap/Makefile
2709 epan/dissectors/asn1/ldap/Makefile
2710 epan/dissectors/asn1/logotypecertextn/Makefile
2711 epan/dissectors/asn1/lpp/Makefile
2712 epan/dissectors/asn1/lppa/Makefile
2713 epan/dissectors/asn1/lppe/Makefile
2714 epan/dissectors/asn1/lte-rrc/Makefile
2715 epan/dissectors/asn1/m2ap/Makefile
2716 epan/dissectors/asn1/m3ap/Makefile
2717 epan/dissectors/asn1/mms/Makefile
2718 epan/dissectors/asn1/mpeg-audio/Makefile
2719 epan/dissectors/asn1/mpeg-pes/Makefile
2720 epan/dissectors/asn1/mudurl/Makefile
2721 epan/dissectors/asn1/nbap/Makefile
2722 epan/dissectors/asn1/nr-rrc/Makefile
2723 epan/dissectors/asn1/ns_cert_exts/Makefile
2724 epan/dissectors/asn1/novell_pkis/Makefile
2725 epan/dissectors/asn1/ocsp/Makefile
2726 epan/dissectors/asn1/p1/Makefile
2727 epan/dissectors/asn1/p22/Makefile
2728 epan/dissectors/asn1/p7/Makefile
2729 epan/dissectors/asn1/p772/Makefile
2730 epan/dissectors/asn1/pcap/Makefile
2731 epan/dissectors/asn1/pkcs1/Makefile
2732 epan/dissectors/asn1/pkcs12/Makefile
2733 epan/dissectors/asn1/pkinit/Makefile
2734 epan/dissectors/asn1/pkixac/Makefile
2735 epan/dissectors/asn1/pkix1explicit/Makefile
2736 epan/dissectors/asn1/pkix1implicit/Makefile
2737 epan/dissectors/asn1/pkixproxy/Makefile
2738 epan/dissectors/asn1/pkixqualified/Makefile
2739 epan/dissectors/asn1/pkixtsp/Makefile
2740 epan/dissectors/asn1/pres/Makefile
2741 epan/dissectors/asn1/q932/Makefile
2742 epan/dissectors/asn1/q932-ros/Makefile
2743 epan/dissectors/asn1/qsig/Makefile
2744 epan/dissectors/asn1/ranap/Makefile
2745 epan/dissectors/asn1/rnsap/Makefile
2746 epan/dissectors/asn1/ros/Makefile
2747 epan/dissectors/asn1/rrc/Makefile
2748 epan/dissectors/asn1/rrlp/Makefile
2749 epan/dissectors/asn1/rtse/Makefile
2750 epan/dissectors/asn1/rua/Makefile
2751 epan/dissectors/asn1/s1ap/Makefile
2752 epan/dissectors/asn1/sabp/Makefile
2753 epan/dissectors/asn1/sbc-ap/Makefile
2754 epan/dissectors/asn1/smrse/Makefile
2755 epan/dissectors/asn1/snmp/Makefile
2756 epan/dissectors/asn1/spnego/Makefile
2757 epan/dissectors/asn1/sv/Makefile
2758 epan/dissectors/asn1/t124/Makefile
2759 epan/dissectors/asn1/t125/Makefile
2760 epan/dissectors/asn1/t38/Makefile
2761 epan/dissectors/asn1/tcap/Makefile
2762 epan/dissectors/asn1/tetra/Makefile
2763 epan/dissectors/asn1/ulp/Makefile
2764 epan/dissectors/asn1/wlancertextn/Makefile
2765 epan/dissectors/asn1/x2ap/Makefile
2766 epan/dissectors/asn1/x509af/Makefile
2767 epan/dissectors/asn1/x509ce/Makefile
2768 epan/dissectors/asn1/x509if/Makefile
2769 epan/dissectors/asn1/x509sat/Makefile
2771 capchild/doxygen.cfg
2773 caputils/doxygen.cfg
2779 epan/dfilter/Makefile
2780 epan/dissectors/Makefile
2781 epan/dissectors/dcerpc/Makefile
2782 epan/ftypes/Makefile
2796 packaging/macosx/Info.plist
2797 packaging/macosx/Makefile
2798 packaging/macosx/Wireshark_package.pmdoc/index.xml
2799 packaging/nsis/Makefile
2800 packaging/rpm/Makefile
2801 packaging/rpm/SPECS/Makefile
2802 packaging/rpm/SPECS/wireshark.spec
2803 packaging/wix/Makefile
2805 plugins/epan/ethercat/Makefile
2806 plugins/epan/gryphon/Makefile
2807 plugins/epan/irda/Makefile
2808 plugins/epan/mate/Makefile
2809 plugins/epan/opcua/Makefile
2810 plugins/epan/profinet/Makefile
2811 plugins/epan/stats_tree/Makefile
2812 plugins/epan/transum/Makefile
2813 plugins/epan/unistim/Makefile
2814 plugins/epan/wimax/Makefile
2815 plugins/epan/wimaxasncp/Makefile
2816 plugins/epan/wimaxmacphy/Makefile
2817 plugins/wiretap/usbdump/Makefile
2818 plugins/codecs/l16_mono/Makefile
2819 _CUSTOM_PLUGIN_CONFIG_FILES_
2820 randpkt_core/doxygen.cfg
2821 randpkt_core/Makefile
2823 tools/lemon/Makefile
2826 writecap/doxygen.cfg
2835 if test "x$have_gtk" = "xyes"; then
2836 gtk_lib_message=" (with GTK+ v$GTK_VERSION)"
2839 if test "x$have_qt" = "xyes" ; then
2840 enable_wireshark_qt="yes"
2841 qt_lib_message=" (with Qt$qt_version v$QT_VERSION)"
2843 enable_wireshark_qt="no"
2846 if test "x$enable_setcap_install" = "xyes" ; then
2847 setcap_message="yes"
2852 if test "x$enable_setuid_install" = "xyes" ; then
2853 setuid_message="yes"
2858 if test "x$DUMPCAP_GROUP" = "x" ; then
2859 dumpcap_group_message="(none)"
2861 dumpcap_group_message="$DUMPCAP_GROUP"
2864 if test "x$want_zlib" = "xno" ; then
2870 if test "x$have_lua" = "xyes" ; then
2876 if test "x$have_qt_multimedia_lib" = "xyes" ; then
2877 qt_multimedia_message="yes"
2879 qt_multimedia_message="no"
2882 if test "x$want_portaudio" = "xyes" ; then
2883 portaudio_message="yes"
2885 portaudio_message="no"
2888 if test "x$want_krb5" = "xno" ; then
2891 krb5_message="yes ($ac_krb5_version)"
2894 if test "x$have_good_c_ares" = "xyes" ; then
2895 c_ares_message="yes"
2897 c_ares_message="no (name resolution will be disabled)"
2900 if test "x$have_good_libcap" = "xyes" ; then
2901 libcap_message="yes"
2906 if test "x$have_good_maxminddb" = "xyes" ; then
2907 maxminddb_message="yes"
2909 maxminddb_message="no"
2912 if test "x$have_good_libssh" = "xyes" ; then
2913 libssh_message="yes"
2914 if test "x$have_ssh_userauth_agent" = "xno" ; then
2915 ssh_userauth_agent_message=" (without ssh_userauth_agent)"
2921 if test "x$have_good_nghttp2" = "xyes" ; then
2922 nghttp2_message="yes"
2924 nghttp2_message="no"
2927 if test "x$have_good_bcg729" = "xyes" ; then
2928 bcg729_message="yes"
2933 if test "x$have_wsug" = xyes -a "x$want_wsug" != xno; then
2940 echo " CPPFLAGS: $WS_CPPFLAGS $CPPFLAGS"
2942 echo " CFLAGS: $WS_CFLAGS $CFLAGS"
2944 echo " CXXFLAGS: $WS_CXXFLAGS $CXXFLAGS"
2946 echo " LDFLAGS: $WS_LDFLAGS $LDFLAGS"
2951 echo "The Wireshark package has been configured with the following options:"
2952 echo " GLib version : v$GLIB_VERSION"
2953 echo " Build wireshark : $enable_wireshark_qt$qt_lib_message"
2954 echo " Build wireshark-gtk : $have_gtk""$gtk_lib_message"
2955 echo " Build tshark : $enable_tshark"
2956 echo " Build tfshark : $enable_tfshark"
2957 echo " Build capinfos : $enable_capinfos"
2958 echo " Build captype : $enable_captype"
2959 echo " Build editcap : $enable_editcap"
2960 echo " Build dumpcap : $enable_dumpcap"
2961 echo " Build mergecap : $enable_mergecap"
2962 echo " Build reordercap : $enable_reordercap"
2963 echo " Build text2pcap : $enable_text2pcap"
2964 echo " Build randpkt : $enable_randpkt"
2965 echo " Build dftest : $enable_dftest"
2966 echo " Build rawshark : $enable_rawshark"
2967 echo " Build sharkd : $enable_sharkd"
2968 echo " Build fuzzshark : $enable_fuzzshark"
2969 echo " Build androiddump : $enable_androiddump"
2970 echo " Build sshdump : $enable_sshdump"
2971 echo " Build ciscodump : $enable_ciscodump"
2972 echo " Build randpktdump : $enable_randpktdump"
2973 echo " Build udpdump : $enable_udpdump"
2974 echo " Build MaxMind DB resolver : $maxminddb_message"
2975 echo " Build User's Guide : $wsug_message"
2977 echo " Save files as pcapng by default : $enable_pcap_ng_default"
2978 echo " Install dumpcap with capabilities : $setcap_message"
2979 echo " Install dumpcap setuid : $setuid_message"
2980 echo " Use dumpcap group : $dumpcap_group_message"
2981 echo " Use plugins : $have_plugins"
2982 echo " Use Lua library : $lua_message"
2983 echo " Build Qt RTP player : $qt_multimedia_message"
2984 echo " Build GTK+ RTP player : $portaudio_message"
2985 echo " Use pcap library : $want_pcap"
2986 echo " Use zlib library : $zlib_message"
2987 echo " Use kerberos library : $krb5_message"
2988 echo " Use c-ares library : $c_ares_message"
2989 echo " Use SMI MIB library : $have_libsmi"
2990 echo " Use GNU gcrypt library : yes"
2991 echo " Use GnuTLS library : $tls_message"
2992 echo " Use POSIX capabilities library : $libcap_message"
2993 echo " Use libssh library : ${libssh_message}${ssh_userauth_agent_message}"
2994 echo " Use nl library : $libnl_message"
2995 echo " Use SBC codec library : $have_sbc"
2996 echo " Use SpanDSP library : $have_spandsp"
2997 echo " Use bcg729 library : $bcg729_message"
2998 echo " Use libxml2 library : $have_libxml2"
2999 echo " Use nghttp2 library : $nghttp2_message"
3000 echo " Use LZ4 library : $have_lz4"
3001 echo " Use Snappy library : $have_snappy"
3002 #echo " Use GDK-Pixbuf with GResource: $have_gresource_pixbuf"
3004 # We're slowly migrating to CMake. The following still use or refer
3007 # - INSTALL and INSTALL.configure
3010 # - doc/README.packaging
3011 # - doc/README.idl2wrs
3012 # - doc/README.plugins
3013 # - docbook/wsdg_src/WSDG_chapter_dissection.asciidoc
3014 # - docbook/wsdg_src/WSDG_chapter_sources.asciidoc
3015 # - docbook/wsug_src/WSUG_chapter_build_install.asciidoc
3016 # - tools/git-compare-abis.sh
3018 AC_MSG_NOTICE([Builds using Autotools might be removed in the future.])