7 dnl Check for CPU / vendor / OS
8 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
9 dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
10 dnl needs. Using `AC_CANONICAL_TARGET' is enough to run the two other
14 dnl AC_CANONICAL_BUILD
17 AM_INIT_AUTOMAKE(wireshark, 0.99.9)
21 dnl Checks for programs.
24 dnl Work around libtool bug (fixed in the version 1.5a?)
25 AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
28 AC_PATH_PROG(PERL, perl)
30 AC_PATH_PROG(YACCDUMMY, $YACC)
31 if test "x$YACCDUMMY" = x
33 AC_MSG_ERROR(I couldn't find yacc (or bison or ...); make sure it's installed and in your path)
36 AC_PATH_PROG(LEXDUMMY, $LEX)
37 if test "x$LEXDUMMY" = x
39 AC_MSG_ERROR(I couldn't find (f)lex; make sure it's installed and in your path)
41 AC_PATH_PROG(POD2MAN, pod2man)
42 if test "x$POD2MAN" = x
45 # The alternative is not to build the man pages....
47 AC_MSG_ERROR(I couldn't find pod2man; make sure it's installed and in your path)
49 AC_PATH_PROG(POD2HTML, pod2html)
50 if test "x$POD2HTML" = x
53 # The alternative is not to build the HTML man pages....
55 AC_MSG_ERROR(I couldn't find pod2html; make sure it's installed and in your path)
57 AC_PATH_PROG(HTML_VIEWER, xdg-open)
58 if test "x$HTML_VIEWER" = x
60 AC_PATH_PROG(HTML_VIEWER, htmlview)
61 if test "x$HTML_VIEWER" = x
63 AC_DEFINE_UNQUOTED(HTML_VIEWER, "mozilla", [HTML viewer, e.g. mozilla])
65 AC_DEFINE_UNQUOTED(HTML_VIEWER, "htmlview", [HTML viewer, e.g. mozilla])
68 AC_DEFINE_UNQUOTED(HTML_VIEWER, "xdg-open", [HTML viewer, e.g. mozilla])
71 AC_PATH_PROG(LEX, flex)
72 AC_PATH_PROG(PYTHON, python)
83 if test "x$CC_FOR_BUILD" = x
87 AC_SUBST(CC_FOR_BUILD)
90 AC_PATH_PROG(DOXYGEN, doxygen)
91 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no")
92 AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
97 AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@],
98 [use gnutls library @<:@default=yes@:>@]),
99 with_gnutls="$withval", with_gnutls="yes")
100 if test "x$with_gnutls" = "xyes"; then
101 AM_PATH_LIBGNUTLS(1.2.0,
103 echo "gnuTLS found, enabling ssl decryption"
104 AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use gnutls library])
108 if test x$libgnutls_config_prefix != x ; then
109 AC_MSG_ERROR([[gnuTLS not found; install gnuTLS-devel package for your system]])
111 echo echo "gnuTLS not found, disabling ssl decryption"
120 AC_ARG_WITH([gcrypt],
121 AC_HELP_STRING( [--with-gcrypt=@<:@yes/no@:>@],
122 [use gcrypt library @<:@default=yes@:>@]),
123 with_gcrypt="$withval", with_gcrypt="yes")
124 if test "x$with_gcrypt" = "xyes"; then
125 AM_PATH_LIBGCRYPT(1.1.42,
127 echo "libgcrypt found, enabling ipsec decryption"
128 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt])
132 if test x$libgcrypt_config_prefix != x ; then
133 AC_MSG_ERROR([[libgcrypt not found; install libgcrypt-devel package for your system]])
135 echo "libgcrypt not found, disabling ipsec decryption"
143 # FIXME: currently the path argument to with-libsmi is being ignored
147 AC_PATH_PROG(XSLTPROC, xsltproc)
148 AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
149 AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
152 AC_PATH_PROG(XMLLINT, xmllint)
153 AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
154 AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
156 # Check for fop (translate .fo to e.g. pdf)
157 AC_PATH_PROG(FOP, fop)
158 AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
159 AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
161 # Check for hhc (html help compiler)
162 AC_PATH_PROG(HHC, hhc.exe)
163 AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
164 AM_CONDITIONAL(HAVE_HHC, test x$HAVE_HHC = xyes)
166 # Check for packaging utilities
167 # For now, we check to see if the various packaging utilites are in our
168 # path. I'm too lazy to write code to go hunt for them. - Gerald
169 AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no")
170 AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no")
171 AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no")
173 if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \
174 -a x$HAVE_PKGTRANS = xyes ; then
175 HAVE_SVR4_PACKAGING=yes
177 HAVE_SVR4_PACKAGING=no
179 AC_SUBST(HAVE_SVR4_PACKAGING)
181 AC_WIRESHARK_RPM_CHECK
185 # Try to add some additional gcc checks to CFLAGS
187 AC_ARG_ENABLE(extra-gcc-checks,
188 AC_HELP_STRING( [--enable-extra-gcc-checks],
189 [Do additional -W checks in GCC. @<:@default=no@:>@]),
191 wireshark_extra_gcc_flags=$enableval
192 if test $enableval != no
194 AC_WIRESHARK_GCC_CFLAGS_CHECK(-pedantic)
195 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Woverflow)
196 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-long-long)
197 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wbad-function-cast)
198 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-qual)
199 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
200 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
201 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshorten-64-to-32)
202 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
203 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-declarations)
204 #Temporarily put cast-align here waiting eradication of 'cast
205 #increases required alignment of target type' on the Solaris
207 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
210 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wall -W)
211 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
212 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wendif-labels)
213 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpointer-arith)
214 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
215 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
218 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
219 # so we can use _U_ to flag unused function arguments and not get warnings
220 # about them. Otherwise, add '-D_U_=""', so that _U_ used to flag an unused
221 # function argument will compile with non-GCC compilers.
223 if test "x$GCC" = "xyes" ; then
224 CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
226 CFLAGS="-D_U_=\"\" $CFLAGS"
230 # If we're running gcc, will enable a barrier "stop on warning".
231 # This barrier is set for a very large part of the code. However, it is
232 # typically not set for "generated" code (lex, ans2wrs, idl2wrs, ...)
234 warnings_as_errors_default="yes"
235 AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
236 AC_ARG_ENABLE(warnings-as-errors,
237 AC_HELP_STRING( [--enable-warnings-as-errors],
238 [Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
240 if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
241 with_warnings_as_errors="yes"
244 with_warnings_as_errors="no"
248 if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
249 with_warnings_as_errors="yes"
252 with_warnings_as_errors="no"
256 AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
259 # Add any platform-specific compiler flags needed.
261 AC_MSG_CHECKING(for platform-specific compiler flags)
262 if test "x$GCC" = "xyes" ; then
264 # GCC - do any platform-specific tweaking necessary.
268 # the X11 headers don't automatically include prototype info
269 # and a lot don't include the return type
270 CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15"
271 AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
275 # See comments above about Apple's lovely C compiler.
277 CFLAGS="-no-cpp-precomp $CFLAGS"
278 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
281 AC_MSG_RESULT(none needed)
286 # Not GCC - assume it's the vendor's compiler.
291 # HP's ANSI C compiler; flags suggested by Jost Martin.
292 # "-Ae" for ANSI C plus extensions such as "long long".
293 # "+O2", for optimization. XXX - works with "-g"?
295 CFLAGS="-Ae +O2 $CFLAGS"
296 AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
300 # It may be called "cc", but it's really a GCC derivative
301 # with a problematic special precompiler and precompiled
302 # headers; turn off the special precompiler, as some
303 # apparently-legal code won't compile with its precompiled
306 CFLAGS="-no-cpp-precomp $CFLAGS"
307 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
310 AC_MSG_RESULT(none needed)
316 # Add any platform-specific linker flags needed.
318 AC_MSG_CHECKING(for platform-specific linker flags)
322 # Add -Wl,-single_module to the LDFLAGS used with shared
323 # libraries, to fix some error that show up in some cases;
324 # some Apple documentation recommends it for most shared
327 LDFLAGS_SHAREDLIB="-Wl,-single_module"
329 # Add -Wl,-search_paths_first to make sure that if we search
330 # directories A and B, in that order, for a given library, a
331 # non-shared version in directory A, rather than a shared
332 # version in directory B, is chosen (so we can use
333 # --with-pcap=/usr/local to force all programs to be linked
334 # with a static version installed in /usr/local/lib rather than
335 # the system version in /usr/lib).
337 LDFLAGS="-Wl,-search_paths_first $LDFLAGS"
338 AC_MSG_RESULT([Apple linker - added -Wl,-single_module and -Wl,-search_paths_first])
342 # Shared libraries in cygwin/Win32 must never contain
345 LDFLAGS="$LDFLAGS -no-undefined"
346 AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
349 AC_MSG_RESULT(none needed)
352 AC_SUBST(LDFLAGS_SHAREDLIB)
355 # On OS X, if we find the headers for Core Foundation, Launch Services,
356 # and Core Services, add -framework options to link with Application
357 # Services (of which Launch Services is a subframework), Core Foundation
358 # (required by the Launch Services APIs), and Core Services, so we can
359 # use them to launch a Web browser from the Help menu and to use
360 # Gestalt() to get the Mac OS X version number.
365 AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
367 ac_frameworks="-framework ApplicationServices -framework CoreFoundation -framework CoreServices"
368 LIBS="$LIBS $ac_frameworks"
371 # include <CoreFoundation/CFBase.h>
372 # include <CoreFoundation/CFString.h>
373 # include <CoreFoundation/CFURL.h>
374 # include <ApplicationServices/ApplicationServices.h>
375 # include <CoreServices/CoreServices.h>
378 CFStringRef url_CFString;
383 url_CFString = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII);
384 url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL);
385 status = LSOpenCFURLRef(url_CFURL, NULL);
387 Gestalt(gestaltSystemVersion, &os_version);
389 ac_cv_can_use_osx_frameworks=yes,
390 ac_cv_can_use_osx_frameworks=no,
391 [echo $ac_n "cross compiling; assumed OK... $ac_c"])
392 if test "$ac_cv_can_use_osx_frameworks" = yes ; then
393 AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
394 FRAMEWORKS="$ac_frameworks"
404 dnl Look in /usr/local for header files and libraries ?
405 dnl XXX FIXME don't include /usr/local if it is already in the system
406 dnl search path as this causes gcc 3.2 on Linux to complain about a change
407 dnl of the system search order for includes
408 AC_ARG_ENABLE(usr-local,
409 AC_HELP_STRING( [--enable-usr-local],
410 [look for headers and libs in /usr/local tree. @<:@default=yes@:>@]),
411 ac_cv_enable_usr_local=$enableval,ac_cv_enable_usr_local=yes)
413 AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
414 if test "x$ac_cv_enable_usr_local" = "xyes" ; then
417 # Arrange that we search for header files in the source directory
418 # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
419 # as various packages we use ("libpcap", "zlib", "adns", "pcre")
420 # may have been installed under "/usr/local/include".
422 CFLAGS="$CFLAGS -I/usr/local/include"
423 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
426 # Arrange that we search for libraries in "/usr/local/lib".
428 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
434 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
439 AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
440 if test x$LD_LIBRARY_PATH != x ; then
441 LIBS="$LIBS -R$LD_LIBRARY_PATH"
442 AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
444 AC_MSG_RESULT(no -- this may be a problem in a few seconds)
450 # Check for versions of "sed" inadequate to handle, in libtool, a list
451 # of object files as large as the list in Wireshark.
453 # On Solaris, we check for "/bin/sed", "/usr/bin/sed", and "/usr/ucb/sed",
454 # as both "/usr/bin/sed" (which is also "/bin/sed", as "/bin" is just a
455 # symlink to "/usr/bin", but people may have "/bin" before "/usr/bin" in
456 # their search path) and "/usr/ucb/sed" are inadequate; "/usr/xpg4/bin/sed"
457 # is the only "sed" that comes with Solaris that can handle Wireshark.
459 # Add any checks here that are necessary for other OSes.
461 AC_WIRESHARK_GNU_SED_CHECK
462 if test "$HAVE_GNU_SED" = no ; then
465 AC_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
467 /bin/sed|/usr/bin/sed|/usr/ucb/sed)
469 AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
484 # Enable/disable tshark
486 AC_ARG_ENABLE(wireshark,
487 AC_HELP_STRING( [--enable-wireshark],
488 [build GTK+-based wireshark. @<:@default=yes, if GTK+ available@:>@]),
489 enable_wireshark=$enableval,enable_wireshark=yes)
492 AC_HELP_STRING( [--disable-gtk2],
493 [build Glib1/Gtk1+-based wireshark/tshark. @<:@default=no@:>@]),
494 enable_gtk2=$enableval,enable_gtk2=yes)
495 AM_CONDITIONAL(USE_GTK2, test x$enable_gtk2 = xyes)
497 AC_ARG_ENABLE(threads,
498 AC_HELP_STRING( [--enable-threads],
499 [use threads in wireshark. @<:@default=no@:>@]),
500 enable_threads=$enableval,enable_threads=no)
501 AM_CONDITIONAL(USE_THREADS, test x$enable_threads = xyes)
503 AC_ARG_ENABLE(profile-build,
504 AC_HELP_STRING( [--enable-profile-build],
505 [build profile-ready binaries. @<:@default=no@:>@]),
506 enable_profile_build=$enableval,enable_profile_build=no)
507 AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)
508 AC_MSG_CHECKING(if profile builds must be generated)
509 if test "x$enable_profile_build" = "xyes" ; then
510 if test "x$GCC" = "xyes" ; then
512 CFLAGS=" -pg $CFLAGS"
515 echo "Building profile binaries currently only supported for GCC."
521 # Create DATAFILE_DIR #define for config.h
522 datafiledir=$datadir/wireshark
524 test "x$prefix" = xNONE && prefix=$ac_default_prefix
525 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
526 # Ugly hack, but I don't see how this problem can be solved
527 # properly that DATAFILE_DIR had a value starting with
528 # "${prefix}/" instead of e.g. "/usr/local/"
529 eval eval echo "$datafiledir"
531 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data])
534 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
535 # programs to be built with GTK+.
537 if test "x$enable_gtk2" = "xyes" -a "x$enable_wireshark" = "xyes"; then
539 AM_PATH_GTK_2_0(2.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread)
540 elif test "x$enable_gtk2" != "xyes" -a "x$enable_wireshark" = "xyes"; then
542 AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
548 # This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
549 # GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
550 # However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
551 # set when generating the Makefile, so we can make programs that require
552 # only GLib link with @GLIB_LIBS@ and make programs that require GTK+
553 # link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
554 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
555 # programs to be built with GLib.
557 if test "$GTK_OK" = "no" ; then
559 # We don't have GTK+.
560 # If they didn't explicitly say "--disable-wireshark", fail (so
561 # that, unless they explicitly indicated that they don't want
562 # Wireshark, we stop so they know they won't be getting
563 # Wireshark unless they fix the GTK+ problem).
565 if test "x$enable_wireshark" = "xyes"; then
566 AC_MSG_ERROR([GTK+ isn't available, so Wireshark can't be compiled])
571 if test "x$enable_gtk2" = "xyes" ; then
572 AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib2 distribution not found.), gmodule)
574 AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
577 wireshark_bin="wireshark\$(EXEEXT)"
578 wireshark_man="wireshark.1"
579 wireshark_SUBDIRS="codecs gtk"
581 if test "$GTK_OK" = "two" ; then
582 AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
584 AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
589 # Check whether GLib modules are supported, to determine whether we
590 # can support plugins.
592 AC_MSG_CHECKING(whether GLib supports loadable modules)
593 ac_save_CFLAGS="$CFLAGS"
595 CFLAGS="$CFLAGS $GLIB_CFLAGS"
596 LIBS="$GLIB_LIBS $LIBS"
606 if (g_module_supported())
607 return 0; /* success */
609 return 1; /* failure */
611 ], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
612 [echo $ac_n "cross compiling; assumed OK... $ac_c"
613 ac_cv_glib_supports_modules=yes])
614 CFLAGS="$ac_save_CFLAGS"
616 if test "$ac_cv_glib_supports_modules" = yes ; then
625 # We can't just check for <inttypes.h> - some systems have one that
626 # doesn't define all the PRI[doxu]64 macros.
628 AC_CHECK_HEADERS(inttypes.h,
631 # OK, we have inttypes.h, but does it define those macros?
633 AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
638 #include <inttypes.h>
641 #include <sys/types.h>
645 printf("%" PRId64 "\n", (gint64)1);
646 printf("%" PRIo64 "\n", (guint64)1);
647 printf("%" PRIx64 "\n", (guint64)1);
648 printf("%" PRIX64 "\n", (guint64)1);
649 printf("%" PRIu64 "\n", (guint64)1);
655 ac_wireshark_inttypes_h_defines_formats=yes
659 ac_wireshark_inttypes_h_defines_formats=no
664 # We don't have inttypes.h, so it obviously can't define those
667 ac_wireshark_inttypes_h_defines_formats=no
669 if test "$ac_wireshark_inttypes_h_defines_formats" = yes; then
670 AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if <inttypes.h> defines PRI[doxu]64 macros])
672 AC_WIRESHARK_CHECK_64BIT_FORMAT(ll,
674 AC_WIRESHARK_CHECK_64BIT_FORMAT(L,
676 AC_WIRESHARK_CHECK_64BIT_FORMAT(q,
678 AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
684 AC_SUBST(wireshark_bin)
685 AC_SUBST(wireshark_man)
687 rdps_bin="rdps\$(EXEEXT)"
691 # Enable/disable tshark
693 AC_ARG_ENABLE(tshark,
694 AC_HELP_STRING( [--enable-tshark],
695 [build tshark. @<:@default=yes@:>@]),
696 tshark=$enableval,enable_tshark=yes)
698 if test "x$enable_tshark" = "xyes" ; then
699 tshark_bin="tshark\$(EXEEXT)"
700 tshark_man="tshark.1"
701 wiresharkfilter_man="wireshark-filter.4"
708 AC_SUBST(wiresharkfilter_man)
712 # Enable/disable editcap
714 AC_ARG_ENABLE(editcap,
715 AC_HELP_STRING( [--enable-editcap],
716 [build editcap. @<:@default=yes@:>@]),
717 enable_editcap=$enableval,enable_editcap=yes)
719 if test "x$enable_editcap" = "xyes" ; then
720 editcap_bin="editcap\$(EXEEXT)"
721 editcap_man="editcap.1"
726 AC_SUBST(editcap_bin)
727 AC_SUBST(editcap_man)
729 # Enabling/disabling of dumpcap is done later (after we know if we have PCAP
732 # Enable/disable capinfos
734 AC_ARG_ENABLE(capinfos,
735 AC_HELP_STRING( [--enable-capinfos],
736 [build capinfos. @<:@default=yes@:>@]),
737 enable_capinfos=$enableval,enable_capinfos=yes)
739 if test "x$enable_capinfos" = "xyes" ; then
740 capinfos_bin="capinfos\$(EXEEXT)"
741 capinfos_man="capinfos.1"
746 AC_SUBST(capinfos_bin)
747 AC_SUBST(capinfos_man)
750 # Enable/disable mergecap
752 AC_ARG_ENABLE(mergecap,
753 AC_HELP_STRING( [--enable-mergecap],
754 [build mergecap. @<:@default=yes@:>@]),
755 enable_mergecap=$enableval,enable_mergecap=yes)
757 if test "x$enable_mergecap" = "xyes" ; then
758 mergecap_bin="mergecap\$(EXEEXT)"
759 mergecap_man="mergecap.1"
764 AC_SUBST(mergecap_bin)
765 AC_SUBST(mergecap_man)
768 # Enable/disable text2pcap
770 AC_ARG_ENABLE(text2pcap,
771 AC_HELP_STRING( [--enable-text2pcap],
772 [build text2pcap. @<:@default=yes@:>@]),
773 text2pcap=$enableval,enable_text2pcap=yes)
775 if test "x$enable_text2pcap" = "xyes" ; then
776 text2pcap_bin="text2pcap\$(EXEEXT)"
777 text2pcap_man="text2pcap.1"
782 AC_SUBST(text2pcap_bin)
783 AC_SUBST(text2pcap_man)
785 # Enable/disable idl2wrs
787 AC_ARG_ENABLE(idl2wrs,
788 AC_HELP_STRING( [--enable-idl2wrs],
789 [build idl2wrs. @<:@default=yes@:>@]),
790 enable_idl2wrs=$enableval,enable_idl2wrs=yes)
792 if test "x$enable_idl2wrs" = "xyes" ; then
793 idl2wrs_bin="idl2wrs"
794 idl2wrs_man="idl2wrs.1"
799 AC_SUBST(idl2wrs_bin)
800 AC_SUBST(idl2wrs_man)
803 # Enable/disable dftest
805 AC_ARG_ENABLE(dftest,
806 AC_HELP_STRING( [--enable-dftest],
807 [build dftest. @<:@default=yes@:>@]),
808 enable_dftest=$enableval,enable_dftest=yes)
810 if test "x$enable_dftest" = "xyes" ; then
811 dftest_bin="dftest\$(EXEEXT)"
818 # Enable/disable randpkt
820 AC_ARG_ENABLE(randpkt,
821 AC_HELP_STRING( [--enable-randpkt],
822 [build randpkt. @<:@default=yes@:>@]),
823 enable_randpkt=$enableval,enable_randpkt=yes)
825 if test "x$enable_randpkt" = "xyes" ; then
826 randpkt_bin="randpkt\$(EXEEXT)"
830 AC_SUBST(randpkt_bin)
834 dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
835 dnl "gethostbyname()".
836 AC_WIRESHARK_GETHOSTBY_LIB_CHECK
838 dnl Checks for "connect()", used as a proxy for "socket()" - and
839 dnl "-lsocket", if we need it to get "connect()".
840 AC_WIRESHARK_SOCKET_LIB_CHECK
843 AC_MSG_CHECKING(whether to use libpcap for packet capture)
846 AC_HELP_STRING( [--with-pcap@<:@=DIR@:>@],
847 [use libpcap for packet capturing. @<:@default=yes@:>@]),
849 if test $withval = no
852 elif test $withval = yes
863 if test "x$want_pcap" = "xno" ; then
867 AC_WIRESHARK_PCAP_CHECK
870 # Enable/disable dumpcap
873 AC_MSG_CHECKING(whether to build dumpcap)
875 AC_ARG_ENABLE(dumpcap,
876 AC_HELP_STRING( [--enable-dumpcap],
877 [build dumpcap. @<:@default=yes@:>@]),
878 enable_dumpcap=$enableval,enable_dumpcap=yes)
880 if test "x$enable_dumpcap" = "xyes" ; then
881 if test "x$want_pcap" = "xno" ; then
883 AC_MSG_RESULT(pcap not available - disabling dumpcap)
891 if test "x$enable_dumpcap" = "xyes" ; then
892 dumpcap_bin="dumpcap\$(EXEEXT)"
893 dumpcap_man="dumpcap.1"
898 AC_SUBST(dumpcap_bin)
899 AC_SUBST(dumpcap_man)
901 # Enable/disable rawshark
904 AC_MSG_CHECKING(whether to build rawshark)
906 AC_ARG_ENABLE(rawshark,
907 AC_HELP_STRING( [--enable-rawshark],
908 [build rawshark. @<:@default=yes@:>@]),
909 rawshark=$enableval,enable_rawshark=yes)
911 if test "x$enable_rawshark" = "xyes" ; then
912 if test "x$want_pcap" = "xno" ; then
914 AC_MSG_RESULT(pcap not available - disabling rawshark)
922 if test "x$enable_rawshark" = "xyes" ; then
923 rawshark_bin="rawshark\$(EXEEXT)"
924 rawshark_man="rawshark.1"
929 AC_SUBST(rawshark_bin)
930 AC_SUBST(rawshark_man)
933 dnl pcap remote check
934 AC_MSG_CHECKING(whether to use libpcap remote capturing feature)
936 AC_ARG_WITH(pcap-remote,
937 [ --with-pcap-remote use libpcap remote capturing (requires libpcap)],
939 if test $withval = no
948 if test "x$want_pcap_remote" = "xno" -o "x$want_pcap" = "xno" ; then
952 AC_WIRESHARK_PCAP_REMOTE_CHECK
956 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
959 AC_HELP_STRING( [--with-zlib@<:@=DIR@:>@],
960 [use zlib (located in directory DIR, if supplied) to read compressed data. @<:@default=yes, if available@:>@]),
962 if test $withval = no
965 elif test $withval = yes
974 # Use zlib if it's present, otherwise don't.
976 want_zlib=ifavailable
979 if test "x$want_zlib" = "xno" ; then
983 AC_WIRESHARK_ZLIB_CHECK
984 if test "x$want_zlib" = "xno" ; then
985 AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
991 AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
994 AC_HELP_STRING( [--with-pcre@<:@=DIR@:>@],
995 [use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions. @<:@default=yes, if available@:>@]),
997 if test $withval = no
1000 elif test $withval = yes
1009 # Use libpcre if it's present, otherwise don't.
1011 want_pcre=ifavailable
1014 if test "x$want_pcre" = "xno" ; then
1018 AC_WIRESHARK_LIBPCRE_CHECK
1019 if test "x$want_pcre" = "xno" ; then
1020 AC_MSG_RESULT(libpcre not found - disabling support for perl compatible regular expressions in dfilters)
1026 AC_MSG_CHECKING(whether to use liblua for the lua scripting plugin)
1029 AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
1030 [use liblua (located in directory DIR, if supplied) for the lua scripting plugin. @<:@default=no@:>@]),
1032 if test $withval = no
1035 elif test $withval = yes
1044 # Don't use liblua by default (it isn't ready yet)
1049 if test "x$want_lua" = "xno" ; then
1053 AC_WIRESHARK_LIBLUA_CHECK
1054 if test "x$want_lua" = "xno" ; then
1055 AC_MSG_RESULT(liblua not found - disabling support for the lua scripting plugin)
1058 AM_CONDITIONAL(HAVE_LIBLUA, test x$want_lua = xyes)
1062 AC_MSG_CHECKING(whether to use libportaudio for the rtp_player)
1064 AC_ARG_WITH(portaudio,
1065 AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@],
1066 [use libportaudio (located in directory DIR, if supplied) for the rtp_player. @<:@default=yes, if available@:>@]),
1068 if test $withval = no
1071 elif test $withval = yes
1076 portaudio_dir=$withval
1080 # Use libportaudio by default
1082 want_portaudio=ifavailable
1085 if test "x$want_portaudio" = "xno" ; then
1089 AC_WIRESHARK_LIBPORTAUDIO_CHECK
1090 if test "x$want_portaudio" = "xno" ; then
1091 AC_MSG_RESULT(libportaudio not found - disabling support for the rtp_player)
1094 AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
1099 AC_HELP_STRING( [--enable-ipv6],
1100 [use ipv6 name resolution, if available. @<:@default=yes@:>@]),
1101 enable_ipv6=$enableval,enable_ipv6=yes)
1103 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
1104 if test "x$enable_ipv6" = "xno" ; then
1108 AC_WIRESHARK_IPV6_STACK
1112 dnl Check if dumpcap should be installed setuid
1113 AC_ARG_ENABLE(setuid-install,
1114 AC_HELP_STRING( [--enable-setuid-install],
1115 [install dumpcap as setuid @<:@default=no@:>@]),
1116 enable_setuid_install=$enableval,enable_setuid_install=no)
1118 AC_MSG_CHECKING(whether to install dumpcap setuid)
1119 if test "x$enable_setuid_install" = "xno" ; then
1122 if test "x$enable_dumpcap" = "xno" ; then
1123 AC_MSG_ERROR(Setuid install works only with --enable-dumpcap, but dumpcap is disabled)
1129 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
1130 AC_CHECK_FUNCS(setresuid setresgid)
1132 dnl libcap (not libpcap) check
1134 AC_MSG_CHECKING(whether to use the libcap capabilities library)
1137 AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@],
1138 [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management. @<:@default=yes, if present@:>@]),
1140 if test "x$withval" = "xno"; then
1142 elif test "x$withval" = "xyes"; then
1144 elif test -d "$withval"; then
1146 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1149 if test "x$with_libcap" = "xno" ; then
1153 AC_WIRESHARK_LIBCAP_CHECK
1155 AC_SUBST(LIBCAP_LIBS)
1157 dnl Checks for header files.
1159 AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
1160 AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h)
1161 AC_CHECK_HEADERS(netinet/in.h)
1162 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
1169 AC_MSG_CHECKING(whether to use SSL library)
1172 AC_HELP_STRING( [--with-ssl@<:@=DIR@:>@],
1173 [use SSL crypto library (located in directory DIR, if supplied). @<:@default=no@:>@]),
1175 if test "x$withval" = "xno"; then
1177 elif test "x$withval" = "xyes"; then
1179 elif test -d "$withval"; then
1181 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1186 if test "x$want_ssl" = "xyes"; then
1188 AC_CHECK_LIB(crypto,EVP_md5,
1193 AC_MSG_ERROR([SSL crypto library was requested, but is not available])
1201 AC_MSG_CHECKING(whether to use kerberos)
1204 AC_HELP_STRING( [--with-krb5@<:@=DIR@:>@],
1205 [use kerberos (located in directory DIR, if supplied) to use in kerberos dissection @<:@default=yes@:>@]),
1207 if test $withval = no
1210 elif test $withval = yes
1219 # Use kerberos if specified, otherwise don't.
1221 want_krb5=ifavailable
1224 if test "x$want_krb5" = "xno" ; then
1228 AC_WIRESHARK_KRB5_CHECK
1234 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
1237 AC_HELP_STRING( [--with-adns@<:@=DIR@:>@],
1238 [use GNU ADNS (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1240 if test "x$withval" = "xno"; then
1242 elif test "x$withval" = "xyes"; then
1244 elif test -d "$withval"; then
1246 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1249 if test "x$with_adns" = "xno" ; then
1253 AC_WIRESHARK_ADNS_CHECK
1258 # Define WS_VAR_IMPORT appropriately for declarations of external
1259 # variables exported from dynamically-linked libraries.
1261 AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
1264 # Define HAVE_AIRPDCAP
1265 # We'll want to remove this eventually.
1267 AC_DEFINE(HAVE_AIRPDCAP, 1, [Enable AirPDcap (WPA/WPA2 decryption)])
1269 dnl Checks for typedefs, structures, and compiler characteristics.
1272 # We need to know whether "struct sockaddr" has an "sa_len" member
1273 # for get_interface_list().
1275 AC_WIRESHARK_STRUCT_SA_LEN
1277 # We must know our byte order
1280 # Checks whether "-traditional" is needed when using "ioctl".
1281 # XXX - do we need this?
1282 AC_PROG_GCC_TRADITIONAL
1285 # Does GLib define G_GINT64_MODIFIER?
1287 AC_MSG_CHECKING([[whether glib.h defines the G_GINT64_MODIFIER macro]])
1293 #if GTK_MAJOR_VERSION >= 2
1294 #include <glib/gprintf.h>
1301 g_snprintf(strbuf, sizeof strbuf, "%" G_GINT64_MODIFIER "x\n", (gint64)1);
1310 AC_WIRESHARK_CHECK_64BIT_FORMAT(l,
1312 AC_WIRESHARK_CHECK_64BIT_FORMAT(ll,
1314 AC_WIRESHARK_CHECK_64BIT_FORMAT(L,
1316 AC_WIRESHARK_CHECK_64BIT_FORMAT(q,
1318 AC_MSG_ERROR([neither %lx nor %llx nor %Lx nor %qx worked on a 64-bit integer])
1327 AC_CHECK_FUNC(getopt, GETOPT_O="",
1328 [GETOPT_O="getopt.o"
1329 AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
1331 if test "$ac_cv_func_getopt" = no ; then
1338 AC_CHECK_FUNC(strerror, STRERROR_O="",
1339 [STRERROR_O="strerror.o"
1340 AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
1342 if test "$ac_cv_func_strerror" = no ; then
1343 STRERROR_C="strerror.c"
1344 STRERROR_O="strerror.o"
1346 AC_SUBST(STRERROR_C)
1347 AC_SUBST(STRERROR_O)
1349 AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
1350 STRCASECMP_O="strcasecmp.o")
1351 if test "$ac_cv_func_strcasecmp" = no ; then
1352 STRCASECMP_C="strcasecmp.c"
1353 STRCASECMP_O="strcasecmp.o"
1355 AC_SUBST(STRCASECMP_C)
1356 AC_SUBST(STRCASECMP_O)
1358 AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
1359 STRNCASECMP_O="strncasecmp.o")
1360 if test "$ac_cv_func_strncasecmp" = no ; then
1361 STRNCASECMP_C="strncasecmp.c"
1362 STRNCASECMP_O="strncasecmp.o"
1364 AC_SUBST(STRNCASECMP_C)
1365 AC_SUBST(STRNCASECMP_O)
1367 AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
1368 MKSTEMP_O="mkstemp.o")
1369 if test "$ac_cv_func_mkstemp" = no ; then
1370 MKSTEMP_C="mkstemp.c"
1371 MKSTEMP_O="mkstemp.o"
1376 ac_save_LIBS="$LIBS"
1377 LIBS="$GLIB_LIBS $LIBS"
1378 G_ASCII_STRCASECMP_C=""
1379 G_ASCII_STRCASECMP_O=""
1380 G_ASCII_STRCASECMP_LO=""
1381 AC_CHECK_FUNC(g_ascii_strcasecmp,
1382 [G_ASCII_STRCASECMP_O=""
1383 G_ASCII_STRCASECMP_LO=""],
1384 [G_ASCII_STRCASECMP_O="g_ascii_strcasecmp.o"
1385 G_ASCII_STRCASECMP_LO="g_ascii_strcasecmp.lo"
1386 AC_DEFINE(NEED_G_ASCII_STRCASECMP_H, 1, [Define if g_ascii_strcasecmp.h needs to be included])
1388 LIBS="$ac_save_LIBS"
1389 if test "$ac_cv_func_g_ascii_strcasecmp" = no ; then
1390 G_ASCII_STRCASECMP_C="g_ascii_strcasecmp.c"
1391 G_ASCII_STRCASECMP_O="g_ascii_strcasecmp.o"
1392 G_ASCII_STRCASECMP_LO="g_ascii_strcasecmp.lo"
1394 AC_SUBST(G_ASCII_STRCASECMP_C)
1395 AC_SUBST(G_ASCII_STRCASECMP_O)
1396 AC_SUBST(G_ASCII_STRCASECMP_LO)
1398 ac_save_LIBS="$LIBS"
1399 LIBS="$GLIB_LIBS $LIBS"
1400 G_ASCII_STRTOULL_C=""
1401 G_ASCII_STRTOULL_O=""
1402 G_ASCII_STRTOULL_LO=""
1403 AC_CHECK_FUNC(g_ascii_strtoull,
1404 [G_ASCII_STRTOULL_O=""
1405 G_ASCII_STRTOULL_LO=""],
1406 [G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
1407 G_ASCII_STRTOULL_LO="g_ascii_strtoull.lo"
1408 AC_DEFINE(NEED_G_ASCII_STRTOULL_H, 1, [Define if g_ascii_strtoull.h needs to be included])
1410 LIBS="$ac_save_LIBS"
1411 if test "$ac_cv_func_g_ascii_strtoull" = no ; then
1412 G_ASCII_STRTOULL_C="g_ascii_strtoull.c"
1413 G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
1414 G_ASCII_STRTOULL_LO="g_ascii_strtoull.lo"
1416 AC_SUBST(G_ASCII_STRTOULL_C)
1417 AC_SUBST(G_ASCII_STRTOULL_O)
1418 AC_SUBST(G_ASCII_STRTOULL_LO)
1420 AC_CHECK_FUNC(inet_aton,
1423 [INET_ATON_O="inet_aton.o"
1424 INET_ATON_LO="inet_aton.lo"
1426 if test "$ac_cv_func_inet_aton" = no ; then
1427 INET_ATON_C="inet_aton.c"
1428 INET_ATON_O="inet_aton.o"
1429 INET_ATON_LO="inet_aton.lo"
1430 AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
1432 AC_SUBST(INET_ATON_C)
1433 AC_SUBST(INET_ATON_O)
1434 AC_SUBST(INET_ATON_LO)
1436 AC_SEARCH_LIBS(inet_pton, [socket nsl], [
1437 dnl check for pre-BIND82 inet_pton() bug.
1438 AC_MSG_CHECKING(for broken inet_pton)
1439 AC_TRY_RUN([#include <sys/types.h>
1440 #include <sys/socket.h>
1441 #include <netinet/in.h>
1442 #include <arpa/inet.h>
1447 /* this should return 0 (error) */
1448 return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
1452 }], [AC_MSG_RESULT(ok);
1453 have_inet_pton=yes], [AC_MSG_RESULT(broken);
1454 have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
1455 have_inet_pton=no])],
1457 if test "$have_inet_pton" = no; then
1458 INET_PTON_C="inet_pton.c"
1459 INET_PTON_O="inet_pton.o"
1460 INET_PTON_LO="inet_pton.lo"
1466 AC_SUBST(INET_PTON_C)
1467 AC_SUBST(INET_PTON_O)
1468 AC_SUBST(INET_PTON_LO)
1470 AC_SEARCH_LIBS(inet_ntop, [socket nsl], [
1471 AC_MSG_CHECKING([for inet_ntop prototype])
1472 AC_TRY_COMPILE([#include <stdio.h>
1473 #include <sys/types.h>
1474 #include <sys/socket.h>
1475 #include <netinet/in.h>
1476 #include <arpa/inet.h>
1478 extern const char *inet_ntop(int, const void *, char *, size_t);],, [
1480 AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1481 [Define if inet_ntop() prototype exists])], [
1482 AC_TRY_COMPILE([#include <stdio.h>
1483 #include <sys/types.h>
1484 #include <sys/socket.h>
1485 #include <netinet/in.h>
1486 #include <arpa/inet.h>
1488 extern const char *inet_ntop(int, const void *, char *, socklen_t);],, [
1490 AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1491 [Define if inet_ntop() prototype exists])], [
1492 AC_MSG_RESULT(no)])])
1495 INET_NTOP_C="inet_ntop.c"
1496 INET_NTOP_O="inet_ntop.o"
1497 INET_NTOP_LO="inet_ntop.lo"
1498 AC_DEFINE(NEED_INET_V6DEFS_H, 1,
1499 [Define if inet/v6defs.h needs to be included])])
1500 AC_SUBST(INET_NTOP_C)
1501 AC_SUBST(INET_NTOP_O)
1502 AC_SUBST(INET_NTOP_LO)
1504 AC_CHECK_FUNC(strptime, STRPTIME_O="",
1505 [STRPTIME_O="strptime.o"
1506 AC_DEFINE(NEED_STRPTIME_H, 1, [Define if strptime.h needs to be included])
1508 if test "$ac_cv_func_strptime" = no ; then
1509 STRPTIME_C="strptime.c"
1510 STRPTIME_O="strptime.o"
1512 AC_SUBST(STRPTIME_C)
1513 AC_SUBST(STRPTIME_O)
1515 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
1516 AC_CHECK_FUNCS(issetugid)
1517 AC_CHECK_FUNCS(mmap mprotect sysconf)
1519 dnl blank for now, but will be used in future
1520 AC_SUBST(wireshark_SUBDIRS)
1523 dnl check whether plugins should be enabled and, if they should be,
1524 dnl check for plugins directory - stolen from Amanda's configure.in
1526 dnl we don't wish to expand ${libdir} yet
1527 plugindir='${libdir}/wireshark/plugins/${VERSION}'
1528 AC_ARG_WITH(plugins,
1529 AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@],
1530 [support plugins (installed in DIR, if supplied). @<:@default=yes, if possible@:>@]),
1532 if test "x$withval" = "xno"; then
1534 elif test "x$have_plugins" = "xno"; then
1535 AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1536 elif test "x$withval" != "xyes"; then
1537 plugindir="$withval"
1540 AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
1541 if test x$have_plugins = xyes
1543 AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
1546 CPPFLAGS="$CPPFLAGS '-DPLUGIN_DIR=\"\$(plugindir)\"'"
1549 # The plugin dissectors reside in ./plugins/PROTO/
1551 PLUGIN_LIBS="-L../../epan -lwireshark $GLIB_LIBS"
1552 AC_SUBST(PLUGIN_LIBS)
1556 # Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
1557 # (autoconf? automake? libtool?) - with the newer version(s), it's
1558 # just an alias for AC_PROG_LIBTOOL, which is called earlier.
1560 # With older version(s) of those tool(s), however, it's not just an
1561 # alias, and the configure scripts don't work without it.
1564 AC_SUBST(LIBTOOL_DEPS)
1566 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
1567 if test x$enable_static = xyes -a x$have_plugins = xyes
1569 AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Wireshark])
1571 AC_SUBST(ENABLE_STATIC)
1573 dnl Save the cacheable configure results to config.cache before recursing
1576 AM_CONFIG_HEADER(config.h)
1581 asn1/acp133/Makefile
1583 asn1/ansi_map/Makefile
1584 asn1/ansi-tcap/Makefile
1596 asn1/gsmmap/Makefile
1605 asn1/h450-ros/Makefile
1610 asn1/logotype-cert-extn/Makefile
1612 asn1/mpeg-audio/Makefile
1613 asn1/mpeg-pes/Makefile
1615 asn1/ns-cert-exts/Makefile
1619 asn1/pkcs12/Makefile
1620 asn1/pkinit/Makefile
1621 asn1/pkix1explicit/Makefile
1622 asn1/pkix1implicit/Makefile
1623 asn1/pkixcmp/Makefile
1624 asn1/pkixcrmf/Makefile
1625 asn1/pkixproxy/Makefile
1626 asn1/pkixqualified/Makefile
1627 asn1/pkixtsp/Makefile
1630 asn1/q932-ros/Makefile
1643 asn1/spnego/Makefile
1648 asn1/wlancertextn/Makefile
1652 asn1/x509af/Makefile
1653 asn1/x509ce/Makefile
1654 asn1/x509if/Makefile
1655 asn1/x509sat/Makefile
1661 epan/dfilter/Makefile
1662 epan/dissectors/Makefile
1663 epan/ftypes/Makefile
1670 packaging/nsis/Makefile
1671 packaging/rpm/Makefile
1672 packaging/rpm/SPECS/Makefile
1673 packaging/rpm/SPECS/wireshark.spec
1674 packaging/svr4/Makefile
1675 packaging/svr4/checkinstall
1676 packaging/svr4/pkginfo
1678 plugins/agentx/Makefile
1679 plugins/artnet/Makefile
1680 plugins/asn1/Makefile
1681 plugins/ciscosm/Makefile
1682 plugins/docsis/Makefile
1683 plugins/enttec/Makefile
1684 plugins/ethercat/Makefile
1685 plugins/giop/Makefile
1686 plugins/gryphon/Makefile
1687 plugins/irda/Makefile
1688 plugins/lwres/Makefile
1689 plugins/m2m/Makefile
1690 plugins/mate/Makefile
1691 plugins/opcua/Makefile
1692 plugins/opsi/Makefile
1693 plugins/pcli/Makefile
1694 plugins/profinet/Makefile
1695 plugins/rlm/Makefile
1696 plugins/rtnet/Makefile
1697 plugins/rudp/Makefile
1698 plugins/sbus/Makefile
1699 plugins/stats_tree/Makefile
1700 plugins/unistim/Makefile
1701 plugins/v5ua/Makefile
1702 plugins/wimax/Makefile
1703 plugins/wimaxasncp/Makefile
1706 tools/lemon/Makefile
1709 dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
1714 if test "x$enable_setuid_install" = "xyes" ; then
1715 setuid_message="yes"
1720 if test "x$want_zlib" = "xno" ; then
1726 if test "x$want_pcre" = "xno" ; then
1732 if test "x$want_lua" = "xyes" -a "x$have_plugins" = "xyes" ; then
1738 if test "x$want_portaudio" = "xyes" ; then
1739 portaudio_message="yes"
1741 portaudio_message="no"
1744 if test "x$want_ssl" = "xno" ; then
1750 if test "x$want_krb5" = "xno" ; then
1753 krb5_message="yes ($ac_krb5_version)"
1756 if test "x$have_good_adns" = "xyes" ; then
1762 if test "x$have_good_libcap" = "xyes" ; then
1763 libcap_message="yes"
1769 echo "The Wireshark package has been configured with the following options."
1770 echo " Build wireshark : $enable_wireshark"
1771 echo " Build tshark : $enable_tshark"
1772 echo " Build capinfos : $enable_capinfos"
1773 echo " Build editcap : $enable_editcap"
1774 echo " Build dumpcap : $enable_dumpcap"
1775 echo " Build mergecap : $enable_mergecap"
1776 echo " Build text2pcap : $enable_text2pcap"
1777 echo " Build idl2wrs : $enable_idl2wrs"
1778 echo " Build randpkt : $enable_randpkt"
1779 echo " Build dftest : $enable_dftest"
1780 echo " Build rawshark : $enable_rawshark"
1782 echo " Install dumpcap setuid : $setuid_message"
1783 echo " Use plugins : $have_plugins"
1784 echo " Build lua plugin : $lua_message"
1785 echo " Build rtp_player : $portaudio_message"
1786 echo " Use GTK+ v2 library : $enable_gtk2"
1787 if test "x$enable_gtk2" = "xyes" ; then
1788 echo " Use threads : $enable_threads"
1789 echo " Build profile binaries : $enable_profile_build"
1791 echo " Use pcap library : $want_pcap"
1792 echo " Use zlib library : $zlib_message"
1793 echo " Use pcre library : $pcre_message"
1794 echo " Use kerberos library : $krb5_message"
1795 echo " Use GNU ADNS library : $adns_message"
1796 echo " Use SMI MIB library : $libsmi_message"
1797 echo " Use GNU crypto library : $gcrypt_message"
1798 echo " Use SSL crypto library : $ssl_message"
1799 echo " Use IPv6 name resolution : $enable_ipv6"
1800 echo " Use gnutls library : $tls_message"
1801 echo " Use libcap library : $libcap_message"