5 dnl Check for CPU / vendor / OS
6 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
7 dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
8 dnl needs. Using `AC_CANONICAL_TARGET' is enough to run the two other
12 dnl AC_CANONICAL_BUILD
13 dnl AC_CANONICAL_TARGET
15 AC_INIT(wireshark, 1.3.1)
16 AM_INIT_AUTOMAKE([1.9 tar-ustar])
20 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(LEX, flex)
39 AC_MSG_ERROR(I couldn't find flex; 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)
59 # XXX - this looks for various HTML viewers on the host, not the target;
60 # we really want to know what's available on the target, for cross-builds.
61 # That would probably require us to, at run time, look for xdg-open and,
62 # if we don't find it, look for mozilla, htmlview, etc.
64 AC_PATH_PROG(HTML_VIEWER, xdg-open)
65 if test "x$HTML_VIEWER" != x
68 # XXX - the HTML_VIEWER shell variable is the full path of xdg-open.
69 # Define some variable to be that, so we just run that?
71 AC_DEFINE(HAVE_XDG_OPEN, 1, [Define if we have xdg-open])
74 # XXX - we have to define HTML_VIEWER for the prefs.c code that
75 # sets the default value of the Web browser preference, even
76 # though that preference won't be offered.
78 AC_DEFINE_UNQUOTED(HTML_VIEWER, "xdg-open", [HTML viewer, e.g. mozilla])
80 AC_PATH_PROG(HTML_VIEWER, htmlview)
81 if test "x$HTML_VIEWER" = x
83 AC_DEFINE_UNQUOTED(HTML_VIEWER, "mozilla", [HTML viewer, e.g. mozilla])
85 AC_DEFINE_UNQUOTED(HTML_VIEWER, "htmlview", [HTML viewer, e.g. mozilla])
89 AC_PATH_PROG(LEX, flex)
90 AC_PATH_PROG(PYTHON, python)
101 if test "x$CC_FOR_BUILD" = x
105 AC_SUBST(CC_FOR_BUILD)
108 AC_PATH_PROG(DOXYGEN, doxygen)
109 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no")
110 AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
114 AC_ARG_WITH([gnutls],
115 AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@],
116 [use gnutls library @<:@default=yes@:>@]),
117 with_gnutls="$withval", with_gnutls="yes")
118 if test "x$with_gnutls" = "xyes"; then
119 PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0],
121 echo "gnuTLS found, enabling ssl decryption"
122 AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use gnutls library])
126 echo echo "gnuTLS not found, disabling ssl decryption"
134 AC_ARG_WITH([gcrypt],
135 AC_HELP_STRING( [--with-gcrypt=@<:@yes/no@:>@],
136 [use gcrypt library @<:@default=yes@:>@]),
137 with_gcrypt="$withval", with_gcrypt="yes")
138 if test "x$with_gcrypt" = "xyes"; then
139 AM_PATH_LIBGCRYPT(1.1.92,
141 echo "libgcrypt found, enabling ipsec decryption"
142 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt])
146 if test x$libgcrypt_config_prefix != x ; then
147 AC_MSG_ERROR([[libgcrypt not found; install libgcrypt-devel package for your system]])
149 echo "libgcrypt not found, disabling ipsec decryption"
157 # FIXME: currently the path argument to with-libsmi is being ignored
161 AC_PATH_PROG(XSLTPROC, xsltproc)
162 AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
163 AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
166 AC_PATH_PROG(XMLLINT, xmllint)
167 AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
168 AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
170 # Check for fop (translate .fo to e.g. pdf)
171 AC_PATH_PROG(FOP, fop)
172 AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
173 AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
175 # Check for hhc (html help compiler)
176 AC_PATH_PROG(HHC, hhc.exe)
177 AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
178 AM_CONDITIONAL(HAVE_HHC, test x$HAVE_HHC = xyes)
180 # Check for packaging utilities
181 # For now, we check to see if the various packaging utilites are in our
182 # path. I'm too lazy to write code to go hunt for them. - Gerald
185 AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no")
186 AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no")
187 AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no")
189 if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \
190 -a x$HAVE_PKGTRANS = xyes ; then
191 HAVE_SVR4_PACKAGING=yes
193 HAVE_SVR4_PACKAGING=no
195 AC_SUBST(HAVE_SVR4_PACKAGING)
198 AC_WIRESHARK_RPM_CHECK
202 AC_CHECK_PROG(HAVE_DPKG_BUILDPACKAGE, dpkg-buildpackage, "yes", "no")
205 AC_CHECK_PROG(HAVE_XCODEBUILD, xcodebuild, "yes", "no")
206 AC_CHECK_PROG(HAVE_HDIUTIL, hdiutil, "yes", "no")
207 AC_CHECK_PROG(HAVE_BLESS, bless, "yes", "no")
209 if test x$HAVE_XCODEBUILD = xyes -a x$HAVE_HDIUTIL = xyes \
210 -a x$HAVE_BLESS = xyes ; then
211 HAVE_OSX_PACKAGING=yes
213 HAVE_OSX_PACKAGING=no
215 AC_SUBST(HAVE_OSX_PACKAGING)
218 # Try to add some additional gcc checks to CFLAGS
220 AC_ARG_ENABLE(extra-gcc-checks,
221 AC_HELP_STRING( [--enable-extra-gcc-checks],
222 [Do additional -W checks in GCC. @<:@default=no@:>@]),
224 wireshark_extra_gcc_flags=$enableval
225 if test $enableval != no
227 AC_WIRESHARK_GCC_CFLAGS_CHECK(-pedantic)
228 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Woverflow)
229 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wlogical-op)
230 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-overlength-strings)
231 # AC_WIRESHARK_GCC_CFLAGS_CHECK(-fstrict-overflow -Wstrict-overflow=4)
232 # AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wunreachable-code)
233 # AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wunsafe-loop-optimizations)
234 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-long-long)
235 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wbad-function-cast)
236 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-qual)
237 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Waddress)
238 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
239 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wattributes)
240 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
241 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdiv-by-zero)
242 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
243 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wignored-qualifiers)
244 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpragmas)
245 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wredundant-decls)
246 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wvla)
248 # epan/dissectors/packet-ncp2222.inc blocks this one
251 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
252 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
253 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-declarations)
255 # epan/dissectors/packet-afs.c blocks this one for now.
257 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshadow)
259 # More cleanup needed for this on LP64.
261 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshorten-64-to-32)
264 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wall -W) # -W is now known as -Wextra
265 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wextra) # -W is now known as -Wextra
266 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
267 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wendif-labels)
268 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpointer-arith)
269 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
270 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
271 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
272 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
274 AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--as-needed])
277 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
278 # so we can use _U_ to flag unused function arguments and not get warnings
279 # about them. Otherwise, add '-D_U_=""', so that _U_ used to flag an unused
280 # function argument will compile with non-GCC compilers.
282 if test "x$GCC" = "xyes" ; then
283 CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
285 CFLAGS="-D_U_=\"\" $CFLAGS"
289 # If we're running gcc, will enable a barrier "stop on warning".
290 # This barrier is set for a very large part of the code. However, it is
291 # typically not set for "generated" code (flex, ans2wrs, idl2wrs, ...)
293 warnings_as_errors_default="yes"
294 AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
295 AC_ARG_ENABLE(warnings-as-errors,
296 AC_HELP_STRING( [--enable-warnings-as-errors],
297 [Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
299 if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
300 with_warnings_as_errors="yes"
303 with_warnings_as_errors="no"
307 if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
308 with_warnings_as_errors="yes"
311 with_warnings_as_errors="no"
315 AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
318 # Add any platform-specific compiler flags needed.
320 AC_MSG_CHECKING(for platform-specific compiler flags)
321 if test "x$GCC" = "xyes" ; then
323 # GCC - do any platform-specific tweaking necessary.
327 # the X11 headers don't automatically include prototype info
328 # and a lot don't include the return type
329 CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15"
330 AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
334 # See comments above about Apple's lovely C compiler.
336 CFLAGS="-no-cpp-precomp $CFLAGS"
337 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
340 AC_MSG_RESULT(none needed)
345 # Not GCC - assume it's the vendor's compiler.
350 # HP's ANSI C compiler; flags suggested by Jost Martin.
351 # "-Ae" for ANSI C plus extensions such as "long long".
352 # "+O2", for optimization. XXX - works with "-g"?
354 CFLAGS="-Ae +O2 $CFLAGS"
355 AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
359 # It may be called "cc", but it's really a GCC derivative
360 # with a problematic special precompiler and precompiled
361 # headers; turn off the special precompiler, as some
362 # apparently-legal code won't compile with its precompiled
365 CFLAGS="-no-cpp-precomp $CFLAGS"
366 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
369 AC_MSG_RESULT(none needed)
375 # Add any platform-specific linker flags needed.
377 AC_MSG_CHECKING(for platform-specific linker flags)
381 # Add -Wl,-single_module to the LDFLAGS used with shared
382 # libraries, to fix some error that show up in some cases;
383 # some Apple documentation recommends it for most shared
386 LDFLAGS_SHAREDLIB="-Wl,-single_module"
388 # Add -Wl,-search_paths_first to make sure that if we search
389 # directories A and B, in that order, for a given library, a
390 # non-shared version in directory A, rather than a shared
391 # version in directory B, is chosen (so we can use
392 # --with-pcap=/usr/local to force all programs to be linked
393 # with a static version installed in /usr/local/lib rather than
394 # the system version in /usr/lib).
396 LDFLAGS="-Wl,-search_paths_first $LDFLAGS"
397 AC_MSG_RESULT([Apple linker - added -Wl,-single_module and -Wl,-search_paths_first])
401 # Shared libraries in cygwin/Win32 must never contain
404 LDFLAGS="$LDFLAGS -no-undefined"
405 AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
408 AC_MSG_RESULT(none needed)
411 AC_SUBST(LDFLAGS_SHAREDLIB)
414 # On OS X, if we find the headers for Core Foundation, Launch Services,
415 # and Core Services, add -framework options to link with Application
416 # Services (of which Launch Services is a subframework), Core Foundation
417 # (required by the Launch Services APIs), and Core Services, so we can
418 # use them to launch a Web browser from the Help menu and to use
419 # Gestalt() to get the Mac OS X version number.
424 AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
426 ac_frameworks="-framework ApplicationServices -framework CoreFoundation -framework CoreServices"
427 LIBS="$LIBS $ac_frameworks"
430 # include <CoreFoundation/CFBase.h>
431 # include <CoreFoundation/CFString.h>
432 # include <CoreFoundation/CFURL.h>
433 # include <ApplicationServices/ApplicationServices.h>
434 # include <CoreServices/CoreServices.h>
437 CFStringRef url_CFString;
442 url_CFString = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII);
443 url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL);
444 status = LSOpenCFURLRef(url_CFURL, NULL);
446 Gestalt(gestaltSystemVersion, &os_version);
448 ac_cv_can_use_osx_frameworks=yes,
449 ac_cv_can_use_osx_frameworks=no,
450 [echo $ac_n "cross compiling; assumed OK... $ac_c"])
451 if test "$ac_cv_can_use_osx_frameworks" = yes ; then
452 AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
453 FRAMEWORKS="$ac_frameworks"
464 # If using $prefix we add "$prefix/include" to the include search path
465 # and "$prefix/lib" to the library search path.
467 if test "x$prefix" != "x" ; then
468 AC_MSG_CHECKING(whether to use $prefix for headers and libraries)
469 if test -d $prefix/include ; then
472 # Arrange that we search for header files in "$prefix/include", as
473 # various packages we use may have been installed under "$prefix/include".
475 CFLAGS="$CFLAGS -I$prefix/include"
476 CPPFLAGS="$CPPFLAGS -I$prefix/include"
479 # Arrange that we search for libraries in "$prefix/lib".
481 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $prefix/lib)
487 dnl Look in /usr/local for header files and libraries ?
488 dnl XXX FIXME don't include /usr/local if it is already in the system
489 dnl search path as this causes gcc 3.2 on Linux to complain about a change
490 dnl of the system search order for includes
491 AC_ARG_ENABLE(usr-local,
492 AC_HELP_STRING( [--enable-usr-local],
493 [look for headers and libs in /usr/local tree. @<:@default=yes@:>@]),
494 ac_cv_enable_usr_local=$enableval,ac_cv_enable_usr_local=yes)
496 AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
497 if test "x$ac_cv_enable_usr_local" = "xyes" ; then
500 # Arrange that we search for header files in the source directory
501 # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
502 # as various packages we use ("libpcap", "zlib", "adns", "pcre")
503 # may have been installed under "/usr/local/include".
505 CFLAGS="$CFLAGS -I/usr/local/include"
506 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
509 # Arrange that we search for libraries in "/usr/local/lib".
511 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
517 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
522 AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
523 if test x$LD_LIBRARY_PATH != x ; then
524 LIBS="$LIBS -R$LD_LIBRARY_PATH"
525 AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
527 AC_MSG_RESULT(no -- this may be a problem in a few seconds)
533 # Check for versions of "sed" inadequate to handle, in libtool, a list
534 # of object files as large as the list in Wireshark.
536 # On Solaris, we check for "/bin/sed", "/usr/bin/sed", and "/usr/ucb/sed",
537 # as both "/usr/bin/sed" (which is also "/bin/sed", as "/bin" is just a
538 # symlink to "/usr/bin", but people may have "/bin" before "/usr/bin" in
539 # their search path) and "/usr/ucb/sed" are inadequate; "/usr/xpg4/bin/sed"
540 # is the only "sed" that comes with Solaris that can handle Wireshark.
542 # Add any checks here that are necessary for other OSes.
544 AC_WIRESHARK_GNU_SED_CHECK
545 if test "$HAVE_GNU_SED" = no ; then
548 AC_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
550 /bin/sed|/usr/bin/sed|/usr/ucb/sed)
552 AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
567 # Enable/disable tshark
569 AC_ARG_ENABLE(wireshark,
570 AC_HELP_STRING( [--enable-wireshark],
571 [build GTK+-based wireshark. @<:@default=yes, if GTK+ available@:>@]),
572 enable_wireshark=$enableval,enable_wireshark=yes)
574 AC_ARG_ENABLE(threads,
575 AC_HELP_STRING( [--enable-threads],
576 [use threads in wireshark. @<:@default=no@:>@]),
577 enable_threads=$enableval,enable_threads=no)
578 AM_CONDITIONAL(USE_THREADS, test x$enable_threads = xyes)
580 AC_ARG_ENABLE(profile-build,
581 AC_HELP_STRING( [--enable-profile-build],
582 [build profile-ready binaries. @<:@default=no@:>@]),
583 enable_profile_build=$enableval,enable_profile_build=no)
584 AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)
585 AC_MSG_CHECKING(if profile builds must be generated)
586 if test "x$enable_profile_build" = "xyes" ; then
587 if test "x$GCC" = "xyes" ; then
589 CFLAGS=" -pg $CFLAGS"
592 echo "Building profile binaries currently only supported for GCC."
598 # Create DATAFILE_DIR #define for config.h
599 datafiledir=$datadir/wireshark
601 test "x$prefix" = xNONE && prefix=$ac_default_prefix
602 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
603 # Ugly hack, but I don't see how this problem can be solved
604 # properly that DATAFILE_DIR had a value starting with
605 # "${prefix}/" instead of e.g. "/usr/local/"
606 eval eval echo "$datafiledir"
608 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data])
610 # GTK checks; we require GTK+ 2.4 or later.
611 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
612 # programs to be built with GTK+.
614 if test "x$enable_wireshark" = "xyes"; then
615 AM_PATH_GTK_2_0(2.4.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread)
621 # This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
622 # GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
623 # However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
624 # set when generating the Makefile, so we can make programs that require
625 # only GLib link with @GLIB_LIBS@ and make programs that require GTK+
626 # link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
627 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
628 # programs to be built with GLib.
630 if test "$GTK_OK" = "no" ; then
632 # We don't have GTK+.
633 # If they didn't explicitly say "--disable-wireshark", fail (so
634 # that, unless they explicitly indicated that they don't want
635 # Wireshark, we stop so they know they won't be getting
636 # Wireshark unless they fix the GTK+ problem).
638 if test "x$enable_wireshark" = "xyes"; then
639 AC_MSG_ERROR([GTK+ 2.4 or later isn't available, so Wireshark can't be compiled])
644 AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
647 wireshark_bin="wireshark\$(EXEEXT)"
648 wireshark_man="wireshark.1"
649 wireshark_SUBDIRS="codecs gtk"
651 AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
655 # Check whether GLib modules are supported, to determine whether we
656 # can support plugins.
658 AC_MSG_CHECKING(whether GLib supports loadable modules)
659 ac_save_CFLAGS="$CFLAGS"
661 CFLAGS="$CFLAGS $GLIB_CFLAGS"
662 LIBS="$GLIB_LIBS $LIBS"
672 if (g_module_supported())
673 return 0; /* success */
675 return 1; /* failure */
677 ], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
678 [echo $ac_n "cross compiling; assumed OK... $ac_c"
679 ac_cv_glib_supports_modules=yes])
680 CFLAGS="$ac_save_CFLAGS"
682 if test "$ac_cv_glib_supports_modules" = yes ; then
691 # If we have <dlfcn.h>, check whether we can use dladdr to find a
692 # filename (hopefully, a full pathname, but no guarantees) for
695 if test "$ac_cv_header_dlfcn_h" = "yes"
697 AC_MSG_CHECKING(whether dladdr can be used to find the pathname of an executable)
698 ac_save_CFLAGS="$CFLAGS"
700 CFLAGS="$CFLAGS $GLIB_CFLAGS"
701 LIBS="$GLIB_LIBS $LIBS"
703 #define _GNU_SOURCE /* required on Linux, sigh */
711 if (!dladdr((void *)main, &info))
712 return 1; /* failure */
713 return 0; /* assume success */
715 ], ac_cv_dladdr_finds_executable_path=yes, ac_cv_dladdr_finds_executable_path=no,
716 [echo $ac_n "cross compiling; assumed OK... $ac_c"
717 ac_cv_dladdr_finds_executable_path=yes])
718 CFLAGS="$ac_save_CFLAGS"
720 if test x$ac_cv_dladdr_finds_executable_path = xyes
722 AC_DEFINE(DLADDR_FINDS_EXECUTABLE_PATH, 1, [Define if dladdr can be used to find the path of the executable])
724 AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
727 dnl IGE Mac integration check
728 AC_MSG_CHECKING(whether to use IGE Mac integration functions)
730 AC_ARG_WITH(ige-mac-integration,
731 AC_HELP_STRING( [--with-ige-mac-integration],
732 [use IGE Mac integration. (@<:@default=yes, if available@:>@]),
734 if test $withval = no
736 want_ige_mac_integration=no
738 want_ige_mac_integration=yes
741 want_ige_mac_integration=yes
743 if test "x$want_ige_mac_integration" = "xno" -o "x$no_gtk" = "xyes" ; then
747 AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
751 AC_SUBST(wireshark_bin)
752 AC_SUBST(wireshark_man)
755 # Enable/disable tshark
757 AC_ARG_ENABLE(tshark,
758 AC_HELP_STRING( [--enable-tshark],
759 [build tshark. @<:@default=yes@:>@]),
760 tshark=$enableval,enable_tshark=yes)
762 if test "x$enable_tshark" = "xyes" ; then
763 tshark_bin="tshark\$(EXEEXT)"
764 tshark_man="tshark.1"
765 wiresharkfilter_man="wireshark-filter.4"
772 AC_SUBST(wiresharkfilter_man)
776 # Enable/disable editcap
778 AC_ARG_ENABLE(editcap,
779 AC_HELP_STRING( [--enable-editcap],
780 [build editcap. @<:@default=yes@:>@]),
781 enable_editcap=$enableval,enable_editcap=yes)
783 if test "x$enable_editcap" = "xyes" ; then
784 editcap_bin="editcap\$(EXEEXT)"
785 editcap_man="editcap.1"
790 AC_SUBST(editcap_bin)
791 AC_SUBST(editcap_man)
793 # Enabling/disabling of dumpcap is done later (after we know if we have PCAP
796 # Enable/disable capinfos
798 AC_ARG_ENABLE(capinfos,
799 AC_HELP_STRING( [--enable-capinfos],
800 [build capinfos. @<:@default=yes@:>@]),
801 enable_capinfos=$enableval,enable_capinfos=yes)
803 if test "x$enable_capinfos" = "xyes" ; then
804 capinfos_bin="capinfos\$(EXEEXT)"
805 capinfos_man="capinfos.1"
810 AC_SUBST(capinfos_bin)
811 AC_SUBST(capinfos_man)
814 # Enable/disable mergecap
816 AC_ARG_ENABLE(mergecap,
817 AC_HELP_STRING( [--enable-mergecap],
818 [build mergecap. @<:@default=yes@:>@]),
819 enable_mergecap=$enableval,enable_mergecap=yes)
821 if test "x$enable_mergecap" = "xyes" ; then
822 mergecap_bin="mergecap\$(EXEEXT)"
823 mergecap_man="mergecap.1"
828 AC_SUBST(mergecap_bin)
829 AC_SUBST(mergecap_man)
832 # Enable/disable text2pcap
834 AC_ARG_ENABLE(text2pcap,
835 AC_HELP_STRING( [--enable-text2pcap],
836 [build text2pcap. @<:@default=yes@:>@]),
837 text2pcap=$enableval,enable_text2pcap=yes)
839 if test "x$enable_text2pcap" = "xyes" ; then
840 text2pcap_bin="text2pcap\$(EXEEXT)"
841 text2pcap_man="text2pcap.1"
846 AC_SUBST(text2pcap_bin)
847 AC_SUBST(text2pcap_man)
849 # Enable/disable idl2wrs
851 AC_ARG_ENABLE(idl2wrs,
852 AC_HELP_STRING( [--enable-idl2wrs],
853 [build idl2wrs. @<:@default=yes@:>@]),
854 enable_idl2wrs=$enableval,enable_idl2wrs=yes)
856 if test "x$enable_idl2wrs" = "xyes" ; then
857 idl2wrs_bin="idl2wrs"
858 idl2wrs_man="idl2wrs.1"
863 AC_SUBST(idl2wrs_bin)
864 AC_SUBST(idl2wrs_man)
867 # Enable/disable dftest
869 AC_ARG_ENABLE(dftest,
870 AC_HELP_STRING( [--enable-dftest],
871 [build dftest. @<:@default=yes@:>@]),
872 enable_dftest=$enableval,enable_dftest=yes)
874 if test "x$enable_dftest" = "xyes" ; then
875 dftest_bin="dftest\$(EXEEXT)"
882 # Enable/disable randpkt
884 AC_ARG_ENABLE(randpkt,
885 AC_HELP_STRING( [--enable-randpkt],
886 [build randpkt. @<:@default=yes@:>@]),
887 enable_randpkt=$enableval,enable_randpkt=yes)
889 if test "x$enable_randpkt" = "xyes" ; then
890 randpkt_bin="randpkt\$(EXEEXT)"
894 AC_SUBST(randpkt_bin)
898 dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
899 dnl "gethostbyname()".
900 AC_WIRESHARK_GETHOSTBY_LIB_CHECK
902 dnl Checks for "connect()", used as a proxy for "socket()" - and
903 dnl "-lsocket", if we need it to get "connect()".
904 AC_WIRESHARK_SOCKET_LIB_CHECK
907 AC_MSG_CHECKING(whether to use libpcap for packet capture)
910 AC_HELP_STRING( [--with-pcap@<:@=DIR@:>@],
911 [use libpcap for packet capturing. @<:@default=yes@:>@]),
913 if test $withval = no
916 elif test $withval = yes
927 if test "x$want_pcap" = "xno" ; then
931 AC_WIRESHARK_PCAP_CHECK
934 # Enable/disable dumpcap
937 AC_MSG_CHECKING(whether to build dumpcap)
939 AC_ARG_ENABLE(dumpcap,
940 AC_HELP_STRING( [--enable-dumpcap],
941 [build dumpcap. @<:@default=yes@:>@]),
942 enable_dumpcap=$enableval,enable_dumpcap=yes)
944 if test "x$enable_dumpcap" = "xyes" ; then
945 if test "x$want_pcap" = "xno" ; then
947 AC_MSG_RESULT(pcap not available - disabling dumpcap)
955 if test "x$enable_dumpcap" = "xyes" ; then
956 dumpcap_bin="dumpcap\$(EXEEXT)"
957 dumpcap_man="dumpcap.1"
962 AC_SUBST(dumpcap_bin)
963 AC_SUBST(dumpcap_man)
965 # Enable/disable rawshark
968 AC_MSG_CHECKING(whether to build rawshark)
970 AC_ARG_ENABLE(rawshark,
971 AC_HELP_STRING( [--enable-rawshark],
972 [build rawshark. @<:@default=yes@:>@]),
973 rawshark=$enableval,enable_rawshark=yes)
975 if test "x$enable_rawshark" = "xyes" ; then
976 if test "x$want_pcap" = "xno" ; then
978 AC_MSG_RESULT(pcap not available - disabling rawshark)
986 if test "x$enable_rawshark" = "xyes" ; then
987 rawshark_bin="rawshark\$(EXEEXT)"
988 rawshark_man="rawshark.1"
993 AC_SUBST(rawshark_bin)
994 AC_SUBST(rawshark_man)
997 dnl pcap remote check
998 AC_MSG_CHECKING(whether to use libpcap remote capturing feature)
1000 AC_ARG_WITH(pcap-remote,
1001 [ --with-pcap-remote use libpcap remote capturing (requires libpcap)],
1003 if test $withval = no
1007 want_pcap_remote=yes
1012 if test "x$want_pcap_remote" = "xno" -o "x$want_pcap" = "xno" ; then
1016 AC_WIRESHARK_PCAP_REMOTE_CHECK
1020 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
1023 AC_HELP_STRING( [--with-zlib@<:@=DIR@:>@],
1024 [use zlib (located in directory DIR, if supplied) to read compressed data. @<:@default=yes, if available@:>@]),
1026 if test $withval = no
1029 elif test $withval = yes
1038 # Use zlib if it's present, otherwise don't.
1040 want_zlib=ifavailable
1043 if test "x$want_zlib" = "xno" ; then
1047 AC_WIRESHARK_ZLIB_CHECK
1048 if test "x$want_zlib" = "xno" ; then
1049 AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
1055 AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
1058 AC_HELP_STRING( [--with-pcre@<:@=DIR@:>@],
1059 [use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions. @<:@default=yes, if available@:>@]),
1061 if test $withval = no
1064 elif test $withval = yes
1073 # Use libpcre if it's present, otherwise don't.
1075 want_pcre=ifavailable
1078 if test "x$want_pcre" = "xno" ; then
1082 AC_WIRESHARK_LIBPCRE_CHECK
1083 if test "x$want_pcre" = "xno" ; then
1084 AC_MSG_RESULT(libpcre not found - disabling support for perl compatible regular expressions in dfilters)
1090 AC_MSG_CHECKING(whether to use liblua for the lua scripting plugin)
1093 AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
1094 [use liblua (located in directory DIR, if supplied) for the lua scripting plugin. @<:@default=yes, if available@:>@]),
1096 if test $withval = no
1099 elif test $withval = yes
1108 # Use liblua by default
1110 want_lua=ifavailable
1113 if test "x$want_lua" = "xno" ; then
1117 AC_WIRESHARK_LIBLUA_CHECK
1118 if test "x$want_lua" = "xno" ; then
1119 AC_MSG_RESULT(liblua not found - disabling support for the lua scripting plugin)
1122 AM_CONDITIONAL(HAVE_LIBLUA, test x$want_lua = xyes)
1126 AC_MSG_CHECKING(whether to use libportaudio for the rtp_player)
1128 AC_ARG_WITH(portaudio,
1129 AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@],
1130 [use libportaudio (located in directory DIR, if supplied) for the rtp_player. @<:@default=yes, if available@:>@]),
1132 if test $withval = no
1135 elif test $withval = yes
1140 portaudio_dir=$withval
1144 # Use libportaudio by default
1146 want_portaudio=ifavailable
1149 if test "x$want_portaudio" = "xno" ; then
1153 AC_WIRESHARK_LIBPORTAUDIO_CHECK
1154 if test "x$want_portaudio" = "xno" ; then
1155 AC_MSG_RESULT(libportaudio not found - disabling support for the rtp_player)
1158 AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
1163 AC_HELP_STRING( [--enable-ipv6],
1164 [use ipv6 name resolution, if available. @<:@default=yes@:>@]),
1165 enable_ipv6=$enableval,enable_ipv6=yes)
1167 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
1168 if test "x$enable_ipv6" = "xno" ; then
1172 AC_WIRESHARK_IPV6_STACK
1176 dnl Check if dumpcap should be installed setuid
1177 AC_ARG_ENABLE(setuid-install,
1178 AC_HELP_STRING( [--enable-setuid-install],
1179 [install dumpcap as setuid @<:@default=no@:>@]),
1180 enable_setuid_install=$enableval,enable_setuid_install=no)
1182 AC_MSG_CHECKING(whether to install dumpcap setuid)
1183 if test "x$enable_setuid_install" = "xno" ; then
1186 if test "x$enable_dumpcap" = "xno" ; then
1187 AC_MSG_ERROR(Setuid install works only with dumpcap but dumpcap is disabled)
1193 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
1194 AC_CHECK_FUNCS(setresuid setresgid)
1196 dnl libcap (not libpcap) check
1198 AC_MSG_CHECKING(whether to use the libcap capabilities library)
1201 AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@],
1202 [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management. @<:@default=yes, if present@:>@]),
1204 if test "x$withval" = "xno"; then
1206 elif test "x$withval" = "xyes"; then
1208 elif test -d "$withval"; then
1210 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1213 if test "x$with_libcap" = "xno" ; then
1217 AC_WIRESHARK_LIBCAP_CHECK
1219 AC_SUBST(LIBCAP_LIBS)
1221 dnl Checks for header files.
1222 AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
1223 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)
1224 AC_CHECK_HEADERS(netinet/in.h)
1225 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
1229 AC_MSG_CHECKING(whether to use SSL library)
1232 AC_HELP_STRING( [--with-ssl@<:@=DIR@:>@],
1233 [use SSL crypto library (located in directory DIR, if supplied). @<:@default=no@:>@]),
1235 if test "x$withval" = "xno"; then
1237 elif test "x$withval" = "xyes"; then
1239 elif test -d "$withval"; then
1241 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1246 if test "x$want_ssl" = "xyes"; then
1248 AC_CHECK_LIB(crypto,EVP_md5,
1253 AC_MSG_ERROR([SSL crypto library was requested, but is not available])
1261 AC_MSG_CHECKING(whether to use kerberos)
1264 AC_HELP_STRING( [--with-krb5@<:@=DIR@:>@],
1265 [use kerberos (located in directory DIR, if supplied) to use in kerberos dissection @<:@default=yes@:>@]),
1267 if test $withval = no
1270 elif test $withval = yes
1279 # Use kerberos if specified, otherwise don't.
1281 want_krb5=ifavailable
1284 if test "x$want_krb5" = "xno" ; then
1288 AC_WIRESHARK_KRB5_CHECK
1294 AC_MSG_CHECKING(whether to use the c-ares library if available)
1297 AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@],
1298 [use c-ares (located in directory DIR, if supplied). Supersedes --with-adns. @<:@default=yes, if present@:>@]),
1300 if test "x$withval" = "xno"; then
1302 elif test "x$withval" = "xyes"; then
1304 elif test -d "$withval"; then
1306 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1309 if test "x$want_c_ares" = "xno" ; then
1313 AC_WIRESHARK_C_ARES_CHECK
1315 AC_SUBST(C_ARES_LIBS)
1319 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
1322 AC_HELP_STRING( [--with-adns@<:@=DIR@:>@],
1323 [use GNU ADNS (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1325 if test "x$withval" = "xno"; then
1327 elif test "x$withval" = "xyes"; then
1329 elif test -d "$withval"; then
1331 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1334 if test "x$want_adns" = "xno" -o "x$have_good_c_ares" = "xyes" ; then
1338 AC_WIRESHARK_ADNS_CHECK
1344 AC_MSG_CHECKING(whether to use the GeoIP IP address mapping library if available)
1347 AC_HELP_STRING( [--with-geoip@<:@=DIR@:>@],
1348 [use GeoIP (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]),
1350 if test "x$withval" = "xno"; then
1352 elif test "x$withval" = "xyes"; then
1354 elif test -d "$withval"; then
1356 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1359 if test "x$want_geoip" = "xno"; then
1363 AC_WIRESHARK_GEOIP_CHECK
1365 AC_SUBST(GEOIP_LIBS)
1367 dnl Python devel Check
1369 AC_HELP_STRING( [--with-python@<:@=DIR@:>@],
1370 [use python interpretor (installed in DIR, if supplied). @<:@default=no@:>@ (EXPERIMENTAL)]),
1372 pythondir='${libdir}/wireshark/python/${VERSION}'
1373 if test "x$withval" = "xno"; then
1375 elif test "x$withval" != "xyes"; then
1376 pythondir="$withval"
1378 AC_WIRESHARK_PYTHON_CHECK
1381 AC_WIRESHARK_PYTHON_CHECK
1384 AM_CONDITIONAL(HAVE_LIBPY, test x$want_python = xyes)
1388 # Define WS_VAR_IMPORT appropriately for declarations of external
1389 # variables exported from dynamically-linked libraries.
1391 AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
1393 AC_ARG_ENABLE(airpcap,
1394 AC_HELP_STRING( [--enable-airpcap],
1395 [use airpcap in wireshark. @<:@default=no@:>@]),
1396 enable_airpcap=$enableval
1397 if test x$enable_airpcap != xno; then
1398 AC_DEFINE(HAVE_AIRPCAP, 1, [Enable AirPcap])
1402 # Define HAVE_AIRPDCAP
1403 # We'll want to remove this eventually.
1405 AC_DEFINE(HAVE_AIRPDCAP, 1, [Enable AirPDcap (WPA/WPA2 decryption)])
1407 dnl Checks for typedefs, structures, and compiler characteristics.
1410 # We need to know whether "struct sockaddr" has an "sa_len" member
1411 # for get_interface_list().
1413 AC_WIRESHARK_STRUCT_SA_LEN
1415 # We must know our byte order
1418 # Checks whether "-traditional" is needed when using "ioctl".
1419 # XXX - do we need this?
1420 AC_PROG_GCC_TRADITIONAL
1424 AC_CHECK_FUNC(getopt, GETOPT_O="",
1425 [GETOPT_O="getopt.o"
1426 AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
1428 if test "$ac_cv_func_getopt" = no ; then
1435 AC_CHECK_FUNC(strerror, STRERROR_O="",
1436 [STRERROR_O="strerror.o"
1437 AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
1439 if test "$ac_cv_func_strerror" = no ; then
1440 STRERROR_C="strerror.c"
1441 STRERROR_O="strerror.o"
1443 AC_SUBST(STRERROR_C)
1444 AC_SUBST(STRERROR_O)
1446 AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
1447 STRNCASECMP_O="strncasecmp.o")
1448 if test "$ac_cv_func_strncasecmp" = no ; then
1449 STRNCASECMP_C="strncasecmp.c"
1450 STRNCASECMP_O="strncasecmp.o"
1452 AC_SUBST(STRNCASECMP_C)
1453 AC_SUBST(STRNCASECMP_O)
1455 AC_CHECK_FUNCS(mkstemp mkdtemp)
1458 # XXX - if inet_aton isn't found, the build fails, with a complaint from
1459 # libtool about inet_aton.lo not being a valid libtool object. We
1460 # probably have to handle it - and all the other replacement functions that
1461 # get built into libwireshark - differently.
1463 AC_SEARCH_LIBS(inet_aton, [socket nsl], have_inet_aton=yes,
1465 if test "$have_inet_aton" = no; then
1466 INET_ATON_C="inet_aton.c"
1467 INET_ATON_O="inet_aton.o"
1468 INET_ATON_LO="inet_aton.lo"
1469 AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
1475 AC_SUBST(INET_ATON_C)
1476 AC_SUBST(INET_ATON_O)
1477 AC_SUBST(INET_ATON_LO)
1479 AC_SEARCH_LIBS(inet_pton, [socket nsl], [
1480 dnl check for pre-BIND82 inet_pton() bug.
1481 AC_MSG_CHECKING(for broken inet_pton)
1482 AC_TRY_RUN([#include <sys/types.h>
1483 #include <sys/socket.h>
1484 #include <netinet/in.h>
1485 #include <arpa/inet.h>
1490 /* this should return 0 (error) */
1491 return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
1495 }], [AC_MSG_RESULT(ok);
1496 have_inet_pton=yes], [AC_MSG_RESULT(broken);
1497 have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
1498 have_inet_pton=no])],
1500 if test "$have_inet_pton" = no; then
1501 INET_PTON_C="inet_pton.c"
1502 INET_PTON_O="inet_pton.o"
1503 INET_PTON_LO="inet_pton.lo"
1509 AC_SUBST(INET_PTON_C)
1510 AC_SUBST(INET_PTON_O)
1511 AC_SUBST(INET_PTON_LO)
1513 AC_SEARCH_LIBS(inet_ntop, [socket nsl], [
1514 AC_MSG_CHECKING([for inet_ntop prototype])
1515 AC_TRY_COMPILE([#include <stdio.h>
1516 #include <sys/types.h>
1517 #include <sys/socket.h>
1518 #include <netinet/in.h>
1519 #include <arpa/inet.h>
1521 extern const char *inet_ntop(int, const void *, char *, size_t);],, [
1523 AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1524 [Define if inet_ntop() prototype exists])], [
1525 AC_TRY_COMPILE([#include <stdio.h>
1526 #include <sys/types.h>
1527 #include <sys/socket.h>
1528 #include <netinet/in.h>
1529 #include <arpa/inet.h>
1531 extern const char *inet_ntop(int, const void *, char *, socklen_t);],, [
1533 AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1534 [Define if inet_ntop() prototype exists])], [
1535 AC_MSG_RESULT(no)])])
1538 INET_NTOP_C="inet_ntop.c"
1539 INET_NTOP_O="inet_ntop.o"
1540 INET_NTOP_LO="inet_ntop.lo"
1541 AC_DEFINE(NEED_INET_V6DEFS_H, 1,
1542 [Define if inet/v6defs.h needs to be included])])
1543 AC_SUBST(INET_NTOP_C)
1544 AC_SUBST(INET_NTOP_O)
1545 AC_SUBST(INET_NTOP_LO)
1547 AC_CHECK_FUNC(strptime, STRPTIME_O="",
1548 [STRPTIME_O="strptime.o"
1549 AC_DEFINE(NEED_STRPTIME_H, 1, [Define if strptime.h needs to be included])
1551 if test "$ac_cv_func_strptime" = no ; then
1552 STRPTIME_C="strptime.c"
1553 STRPTIME_O="strptime.o"
1555 AC_SUBST(STRPTIME_C)
1556 AC_SUBST(STRPTIME_O)
1558 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
1559 AC_CHECK_FUNCS(issetugid)
1560 AC_CHECK_FUNCS(mmap mprotect sysconf)
1562 dnl blank for now, but will be used in future
1563 AC_SUBST(wireshark_SUBDIRS)
1566 dnl check whether plugins should be enabled and, if they should be,
1567 dnl check for plugins directory - stolen from Amanda's configure.in
1569 dnl we don't wish to expand ${libdir} yet
1570 plugindir='${libdir}/wireshark/plugins/${VERSION}'
1571 AC_ARG_WITH(plugins,
1572 AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@],
1573 [support plugins (installed in DIR, if supplied). @<:@default=yes, if possible@:>@]),
1575 if test "x$withval" = "xno"; then
1577 elif test "x$have_plugins" = "xno"; then
1578 AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1579 elif test "x$withval" != "xyes"; then
1580 plugindir="$withval"
1583 AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
1584 if test x$have_plugins = xyes
1586 AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
1589 CPPFLAGS="$CPPFLAGS '-DPLUGIN_DIR=\"\$(plugindir)\"'"
1592 # The plugin dissectors reside in ./plugins/PROTO/
1595 AC_SUBST(PLUGIN_LIBS)
1599 # Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
1600 # (autoconf? automake? libtool?) - with the newer version(s), it's
1601 # just an alias for AC_PROG_LIBTOOL, which is called earlier.
1603 # With older version(s) of those tool(s), however, it's not just an
1604 # alias, and the configure scripts don't work without it.
1607 AC_SUBST(LIBTOOL_DEPS)
1609 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
1610 if test x$enable_static = xyes -a x$have_plugins = xyes
1612 AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Wireshark])
1614 AC_SUBST(ENABLE_STATIC)
1616 AC_ARG_ENABLE(new-packet-list,
1617 AC_HELP_STRING( [--enable-new-packet-list],
1618 [use new packet list feature. @<:@default=yes@:>@]),
1619 new_packet_list=$enableval,new_packet_list=yes)
1620 AC_MSG_CHECKING(if new packet list is used);
1621 if test "x$new_packet_list" = "xyes" ; then
1623 CFLAGS=" -DNEW_PACKET_LIST $CFLAGS"
1628 dnl Save the cacheable configure results to config.cache before recursing
1631 sinclude(plugins/Custom.m4) dnl
1632 ifdef(_CUSTOM_AC_OUTPUT_,, define(_CUSTOM_AC_OUTPUT_, )) dnl
1634 AM_CONFIG_HEADER(config.h)
1639 asn1/acp133/Makefile
1641 asn1/ansi_map/Makefile
1642 asn1/ansi-tcap/Makefile
1645 asn1/charging_ase/Makefile
1656 asn1/gsmmap/Makefile
1665 asn1/h450-ros/Makefile
1670 asn1/logotype-cert-extn/Makefile
1671 asn1/lte-rrc/Makefile
1673 asn1/mpeg-audio/Makefile
1674 asn1/mpeg-pes/Makefile
1676 asn1/ns-cert-exts/Makefile
1681 asn1/pkcs12/Makefile
1682 asn1/pkinit/Makefile
1683 asn1/pkix1explicit/Makefile
1684 asn1/pkix1implicit/Makefile
1685 asn1/pkixcmp/Makefile
1686 asn1/pkixcrmf/Makefile
1687 asn1/pkixproxy/Makefile
1688 asn1/pkixqualified/Makefile
1689 asn1/pkixtsp/Makefile
1692 asn1/q932-ros/Makefile
1705 asn1/spnego/Makefile
1710 asn1/wlancertextn/Makefile
1714 asn1/x509af/Makefile
1715 asn1/x509ce/Makefile
1716 asn1/x509if/Makefile
1717 asn1/x509sat/Makefile
1724 epan/dfilter/Makefile
1725 epan/dissectors/Makefile
1726 epan/ftypes/Makefile
1728 epan/wspython/Makefile
1734 packaging/macosx/Info.plist
1735 packaging/macosx/Makefile
1736 packaging/nsis/Makefile
1737 packaging/rpm/Makefile
1738 packaging/rpm/SPECS/Makefile
1739 packaging/rpm/SPECS/wireshark.spec
1740 packaging/svr4/Makefile
1741 packaging/svr4/checkinstall
1742 packaging/svr4/pkginfo
1744 plugins/asn1/Makefile
1745 plugins/docsis/Makefile
1746 plugins/ethercat/Makefile
1747 plugins/giop/Makefile
1748 plugins/gryphon/Makefile
1749 plugins/irda/Makefile
1750 plugins/m2m/Makefile
1751 plugins/mate/Makefile
1752 plugins/opcua/Makefile
1753 plugins/profinet/Makefile
1754 plugins/sercosiii/Makefile
1755 plugins/stats_tree/Makefile
1756 plugins/unistim/Makefile
1757 plugins/wimax/Makefile
1758 plugins/wimaxasncp/Makefile
1761 tools/lemon/Makefile
1766 dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
1771 if test "x$enable_setuid_install" = "xyes" ; then
1772 setuid_message="yes"
1777 if test "x$want_zlib" = "xno" ; then
1783 if test "x$want_pcre" = "xno" ; then
1789 if test "x$want_lua" = "xyes" ; then
1795 if test "x$want_python" = "xyes"; then
1796 python_message="yes"
1801 if test "x$want_portaudio" = "xyes" ; then
1802 portaudio_message="yes"
1804 portaudio_message="no"
1807 if test "x$want_ssl" = "xno" ; then
1813 if test "x$want_krb5" = "xno" ; then
1816 krb5_message="yes ($ac_krb5_version)"
1819 if test "x$have_good_c_ares" = "xyes" ; then
1820 c_ares_message="yes"
1825 if test "x$have_good_adns" = "xyes" ; then
1831 if test "x$have_good_libcap" = "xyes" ; then
1832 libcap_message="yes"
1837 if test "x$have_good_geoip" = "xyes" ; then
1844 echo "The Wireshark package has been configured with the following options."
1845 echo " Build wireshark : $enable_wireshark"
1846 echo " Build tshark : $enable_tshark"
1847 echo " Build capinfos : $enable_capinfos"
1848 echo " Build editcap : $enable_editcap"
1849 echo " Build dumpcap : $enable_dumpcap"
1850 echo " Build mergecap : $enable_mergecap"
1851 echo " Build text2pcap : $enable_text2pcap"
1852 echo " Build idl2wrs : $enable_idl2wrs"
1853 echo " Build randpkt : $enable_randpkt"
1854 echo " Build dftest : $enable_dftest"
1855 echo " Build rawshark : $enable_rawshark"
1857 echo " Install dumpcap setuid : $setuid_message"
1858 echo " Use plugins : $have_plugins"
1859 echo " Use lua library : $lua_message"
1860 echo " Use python binding : $python_message"
1861 echo " Build rtp_player : $portaudio_message"
1862 echo " Use threads : $enable_threads"
1863 echo " Build profile binaries : $enable_profile_build"
1864 echo " Use pcap library : $want_pcap"
1865 echo " Use zlib library : $zlib_message"
1866 echo " Use pcre library : $pcre_message"
1867 echo " Use kerberos library : $krb5_message"
1868 echo " Use c-ares library : $c_ares_message"
1869 echo " Use GNU ADNS library : $adns_message"
1870 echo " Use SMI MIB library : $libsmi_message"
1871 echo " Use GNU crypto library : $gcrypt_message"
1872 echo " Use SSL crypto library : $ssl_message"
1873 echo " Use IPv6 name resolution : $enable_ipv6"
1874 echo " Use gnutls library : $tls_message"
1875 echo " Use POSIX capabilities library : $libcap_message"
1876 echo " Use GeoIP library : $geoip_message"