Revert commit 28854.
[obnox/wireshark/wip.git] / configure.in
1 # $Id$
2 #
3 AC_PREREQ(2.60)
4
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
9 dnl macros.
10
11 dnl AC_CANONICAL_HOST
12 dnl AC_CANONICAL_BUILD
13 dnl AC_CANONICAL_TARGET
14
15 AC_INIT(wireshark, 1.3.0)
16 AM_INIT_AUTOMAKE([1.9 tar-ustar])
17
18 AM_DISABLE_STATIC
19
20 dnl Checks for programs.
21 AC_PROG_CC
22 AM_PROG_CC_C_O
23 AC_PROG_CPP
24 dnl Work around libtool bug (fixed in the version 1.5a?)
25 AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
26 AC_LIBTOOL_DLOPEN
27 AC_PROG_LIBTOOL
28 AC_PATH_PROG(PERL, perl)
29 AC_PROG_YACC
30 AC_PATH_PROG(YACCDUMMY, $YACC)
31 if test "x$YACCDUMMY" = x
32 then
33         AC_MSG_ERROR(I couldn't find yacc (or bison or ...); make sure it's installed and in your path)
34 fi
35 AM_PROG_LEX
36 AC_PATH_PROG(LEXDUMMY, $LEX)
37 if test "x$LEXDUMMY" = x
38 then
39         AC_MSG_ERROR(I couldn't find (f)lex; make sure it's installed and in your path)
40 fi
41 AC_PATH_PROG(POD2MAN, pod2man)
42 if test "x$POD2MAN" = x
43 then
44         #
45         # The alternative is not to build the man pages....
46         #
47         AC_MSG_ERROR(I couldn't find pod2man; make sure it's installed and in your path)
48 fi
49 AC_PATH_PROG(POD2HTML, pod2html)
50 if test "x$POD2HTML" = x
51 then
52         #
53         # The alternative is not to build the HTML man pages....
54         #
55         AC_MSG_ERROR(I couldn't find pod2html; make sure it's installed and in your path)
56 fi
57
58 #
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.
63 #
64 AC_PATH_PROG(HTML_VIEWER, xdg-open)
65 if test "x$HTML_VIEWER" != x
66 then
67         #
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?
70         #
71         AC_DEFINE(HAVE_XDG_OPEN, 1, [Define if we have xdg-open])
72
73         #
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.
77         #
78         AC_DEFINE_UNQUOTED(HTML_VIEWER, "xdg-open", [HTML viewer, e.g. mozilla])
79 else
80         AC_PATH_PROG(HTML_VIEWER, htmlview)
81         if test "x$HTML_VIEWER" = x
82         then
83                 AC_DEFINE_UNQUOTED(HTML_VIEWER, "mozilla", [HTML viewer, e.g. mozilla])
84         else
85                 AC_DEFINE_UNQUOTED(HTML_VIEWER, "htmlview", [HTML viewer, e.g. mozilla])
86         fi
87 fi
88
89 AC_PATH_PROG(LEX, flex)
90 AC_PATH_PROG(PYTHON, python)
91
92 AC_SUBST(PERL)
93 AC_SUBST(POD2MAN)
94 AC_SUBST(POD2HTML)
95 AC_SUBST(LEX)
96 AC_SUBST(FLEX_PATH)
97 AC_SUBST(PYTHON)
98 AC_SUBST(XSLTPROC)
99 AC_SUBST(XMLLINT)
100
101 if test "x$CC_FOR_BUILD" = x
102 then
103        CC_FOR_BUILD=$CC
104 fi
105 AC_SUBST(CC_FOR_BUILD)
106
107 # Check for doxygen
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)
111
112 # gnu tls
113 tls_message="no"
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   AM_PATH_LIBGNUTLS(1.2.0,
120         [
121                 echo "gnuTLS found, enabling ssl decryption"
122                 AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use gnutls library])
123                 tls_message="yes"
124         ]
125         , [
126                 if test x$libgnutls_config_prefix != x ; then
127                         AC_MSG_ERROR([[gnuTLS not found; install gnuTLS-devel package for your system]])
128                 else
129                         echo echo "gnuTLS not found, disabling ssl decryption"
130                         tls_message="no"
131                 fi
132         ]
133   )
134 fi
135
136 # libgrypt
137 gcrypt_message="no"
138 AC_ARG_WITH([gcrypt],
139   AC_HELP_STRING( [--with-gcrypt=@<:@yes/no@:>@],
140                   [use gcrypt library @<:@default=yes@:>@]),
141   with_gcrypt="$withval", with_gcrypt="yes")
142 if test "x$with_gcrypt" = "xyes"; then
143   AM_PATH_LIBGCRYPT(1.1.92,
144         [
145                 echo "libgcrypt found, enabling ipsec decryption"
146                 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt])
147                 gcrypt_message="yes"
148         ]
149         , [
150                 if test x$libgcrypt_config_prefix != x ; then
151                         AC_MSG_ERROR([[libgcrypt not found; install libgcrypt-devel package for your system]])
152                 else
153                         echo "libgcrypt not found, disabling ipsec decryption"
154                         gcrypt_message="no"
155                 fi
156         ]
157   )
158 fi
159
160 # libsmi
161 # FIXME: currently the path argument to with-libsmi is being ignored
162 AX_LIBSMI
163
164 # Check for xsltproc
165 AC_PATH_PROG(XSLTPROC, xsltproc)
166 AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
167 AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
168
169 # Check for xmllint
170 AC_PATH_PROG(XMLLINT, xmllint)
171 AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
172 AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
173
174 # Check for fop (translate .fo to e.g. pdf)
175 AC_PATH_PROG(FOP, fop)
176 AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
177 AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
178
179 # Check for hhc (html help compiler)
180 AC_PATH_PROG(HHC, hhc.exe)
181 AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
182 AM_CONDITIONAL(HAVE_HHC, test x$HAVE_HHC = xyes)
183
184 # Check for packaging utilities
185 # For now, we check to see if the various packaging utilites are in our
186 # path.  I'm too lazy to write code to go hunt for them.  -  Gerald
187
188 # SVR4/Solaris
189 AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no")
190 AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no")
191 AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no")
192
193 if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \
194      -a x$HAVE_PKGTRANS = xyes ; then
195   HAVE_SVR4_PACKAGING=yes
196 else
197   HAVE_SVR4_PACKAGING=no
198 fi
199 AC_SUBST(HAVE_SVR4_PACKAGING)
200
201 # RPM
202 AC_WIRESHARK_RPM_CHECK
203 AC_SUBST(HAVE_RPM)
204
205 # Debian
206 AC_CHECK_PROG(HAVE_DPKG_BUILDPACKAGE, dpkg-buildpackage, "yes", "no")
207
208 # Mac OS X
209 AC_CHECK_PROG(HAVE_XCODEBUILD, xcodebuild, "yes", "no")
210 AC_CHECK_PROG(HAVE_HDIUTIL, hdiutil, "yes", "no")
211 AC_CHECK_PROG(HAVE_BLESS, bless, "yes", "no")
212
213 if test x$HAVE_XCODEBUILD = xyes -a x$HAVE_HDIUTIL = xyes \
214      -a x$HAVE_BLESS = xyes ; then
215   HAVE_OSX_PACKAGING=yes
216 else
217   HAVE_OSX_PACKAGING=no
218 fi
219 AC_SUBST(HAVE_OSX_PACKAGING)
220
221 #
222 # Try to add some additional gcc checks to CFLAGS
223 #
224 AC_ARG_ENABLE(extra-gcc-checks,
225   AC_HELP_STRING( [--enable-extra-gcc-checks],
226                   [Do additional -W checks in GCC.  @<:@default=no@:>@]),
227 [
228         wireshark_extra_gcc_flags=$enableval
229         if test $enableval != no
230         then
231                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-pedantic)
232                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Woverflow)
233                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wlogical-op)
234                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-overlength-strings)
235 #               AC_WIRESHARK_GCC_CFLAGS_CHECK(-fstrict-overflow -Wstrict-overflow=4)
236 #               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wunreachable-code)
237                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-long-long)
238                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wbad-function-cast)
239                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-qual)
240                 #
241                 # epan/dissectors/packet-ncp2222.inc blocks this one
242                 # for now.
243                 #
244                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
245                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
246                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-declarations)
247                 #
248                 # epan/dissectors/packet-afs.c blocks this one for now.
249                 #
250                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshadow)
251                 #
252                 # More cleanup needed for this on LP64.
253                 #
254                 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshorten-64-to-32)
255         fi
256 ],)
257 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wall -W) # -W is now known as -Wextra
258 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wextra) # -W is now known as -Wextra
259 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
260 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wendif-labels)
261 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpointer-arith)
262 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
263 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
264 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
265 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
266
267 #
268 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
269 # so we can use _U_ to flag unused function arguments and not get warnings
270 # about them. Otherwise, add '-D_U_=""', so that _U_ used to flag an unused
271 # function argument will compile with non-GCC compilers.
272 #
273 if test "x$GCC" = "xyes" ; then
274   CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
275 else
276   CFLAGS="-D_U_=\"\" $CFLAGS"
277 fi
278
279 #
280 # If we're running gcc, will enable a barrier "stop on warning".
281 # This barrier is set for a very large part of the code. However, it is
282 # typically not set for "generated" code  (lex, ans2wrs, idl2wrs, ...)
283 #
284 warnings_as_errors_default="yes"
285 AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
286 AC_ARG_ENABLE(warnings-as-errors,
287   AC_HELP_STRING( [--enable-warnings-as-errors],
288                   [Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
289 [
290   if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
291     with_warnings_as_errors="yes"
292     AC_MSG_RESULT(yes)
293   else
294     with_warnings_as_errors="no"
295     AC_MSG_RESULT(no)
296   fi
297 ],
298   if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
299     with_warnings_as_errors="yes"
300     AC_MSG_RESULT(yes)
301   else
302     with_warnings_as_errors="no"
303     AC_MSG_RESULT(no)
304   fi
305 )
306 AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
307
308 #
309 # Add any platform-specific compiler flags needed.
310 #
311 AC_MSG_CHECKING(for platform-specific compiler flags)
312 if test "x$GCC" = "xyes" ; then
313         #
314         # GCC - do any platform-specific tweaking necessary.
315         #
316         case "$host_os" in
317         solaris*)
318                 # the X11 headers don't automatically include prototype info
319                 # and a lot don't include the return type
320                 CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15"
321                 AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
322                 ;;
323         darwin*)
324                 #
325                 # See comments above about Apple's lovely C compiler.
326                 #
327                 CFLAGS="-no-cpp-precomp $CFLAGS"
328                 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
329                 ;;
330         *)
331                 AC_MSG_RESULT(none needed)
332                 ;;
333         esac
334 else
335         #
336         # Not GCC - assume it's the vendor's compiler.
337         #
338         case "$host_os" in
339         hpux*)
340                 #
341                 # HP's ANSI C compiler; flags suggested by Jost Martin.
342                 # "-Ae" for ANSI C plus extensions such as "long long".
343                 # "+O2", for optimization.  XXX - works with "-g"?
344                 #
345                 CFLAGS="-Ae +O2 $CFLAGS"
346                 AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
347                 ;;
348         darwin*)
349                 #
350                 # It may be called "cc", but it's really a GCC derivative
351                 # with a problematic special precompiler and precompiled
352                 # headers; turn off the special precompiler, as some
353                 # apparently-legal code won't compile with its precompiled
354                 # headers.
355                 #
356                 CFLAGS="-no-cpp-precomp $CFLAGS"
357                 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
358                 ;;
359         *)
360                 AC_MSG_RESULT(none needed)
361                 ;;
362         esac
363 fi
364
365 #
366 # Add any platform-specific linker flags needed.
367 #
368 AC_MSG_CHECKING(for platform-specific linker flags)
369 case "$host_os" in
370 darwin*)
371         #
372         # Add -Wl,-single_module to the LDFLAGS used with shared
373         # libraries, to fix some error that show up in some cases;
374         # some Apple documentation recommends it for most shared
375         # libraries.
376         #
377         LDFLAGS_SHAREDLIB="-Wl,-single_module"
378         #
379         # Add -Wl,-search_paths_first to make sure that if we search
380         # directories A and B, in that order, for a given library, a
381         # non-shared version in directory A, rather than a shared
382         # version in directory B, is chosen (so we can use
383         # --with-pcap=/usr/local to force all programs to be linked
384         # with a static version installed in /usr/local/lib rather than
385         # the system version in /usr/lib).
386         #
387         LDFLAGS="-Wl,-search_paths_first $LDFLAGS"
388         AC_MSG_RESULT([Apple linker - added -Wl,-single_module and -Wl,-search_paths_first])
389         ;;
390 cygwin*)
391         #
392         # Shared libraries in cygwin/Win32 must never contain
393         # undefined symbols.
394         #
395         LDFLAGS="$LDFLAGS -no-undefined"
396         AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
397         ;;
398 *)
399         AC_MSG_RESULT(none needed)
400         ;;
401 esac
402 AC_SUBST(LDFLAGS_SHAREDLIB)
403
404 #
405 # On OS X, if we find the headers for Core Foundation, Launch Services,
406 # and Core Services, add -framework options to link with Application
407 # Services (of which Launch Services is a subframework), Core Foundation
408 # (required by the Launch Services APIs), and Core Services, so we can
409 # use them to launch a Web browser from the Help menu and to use
410 # Gestalt() to get the Mac OS X version number.
411 #
412 case "$host_os" in
413
414 darwin*)
415         AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
416         ac_save_LIBS="$LIBS"
417         ac_frameworks="-framework ApplicationServices -framework CoreFoundation -framework CoreServices"
418         LIBS="$LIBS $ac_frameworks"
419         AC_TRY_LINK(
420            [
421 #       include <CoreFoundation/CFBase.h>
422 #       include <CoreFoundation/CFString.h>
423 #       include <CoreFoundation/CFURL.h>
424 #       include <ApplicationServices/ApplicationServices.h>
425 #       include <CoreServices/CoreServices.h>
426            ],
427            [
428         CFStringRef url_CFString;
429         CFURLRef url_CFURL;
430         OSStatus status;
431         long os_version;
432
433         url_CFString = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII);
434         url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL);
435         status = LSOpenCFURLRef(url_CFURL, NULL);
436
437         Gestalt(gestaltSystemVersion, &os_version);
438            ],
439            ac_cv_can_use_osx_frameworks=yes,
440            ac_cv_can_use_osx_frameworks=no,
441            [echo $ac_n "cross compiling; assumed OK... $ac_c"])
442         if test "$ac_cv_can_use_osx_frameworks" = yes ; then
443                 AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
444                 FRAMEWORKS="$ac_frameworks"
445                 AC_MSG_RESULT(yes)
446         else
447                 AC_MSG_RESULT(no)
448         fi
449         LIBS="$ac_save_LIBS"
450         ;;
451 esac
452 AC_SUBST(FRAMEWORKS)
453
454 #
455 # If using $prefix we add "$prefix/include" to the include search path
456 # and "$prefix/lib" to the library search path.
457 #
458 if test "x$prefix" != "x" ; then
459         AC_MSG_CHECKING(whether to use $prefix for headers and libraries)
460         if test -d $prefix/include ; then
461                 AC_MSG_RESULT(yes)
462                 #
463                 # Arrange that we search for header files in "$prefix/include", as
464                 # various packages we use may have been installed under "$prefix/include".
465                 #
466                 CFLAGS="$CFLAGS -I$prefix/include"
467                 CPPFLAGS="$CPPFLAGS -I$prefix/include"
468
469                 #
470                 # Arrange that we search for libraries in "$prefix/lib".
471                 #
472                 AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $prefix/lib)
473         else
474                 AC_MSG_RESULT(no)
475         fi
476 fi
477
478 dnl Look in /usr/local for header files and libraries ?
479 dnl XXX FIXME don't include /usr/local if it is already in the system
480 dnl search path as this causes gcc 3.2 on Linux to complain about a change
481 dnl of the system search order for includes
482 AC_ARG_ENABLE(usr-local,
483   AC_HELP_STRING( [--enable-usr-local],
484                   [look for headers and libs in /usr/local tree.  @<:@default=yes@:>@]),
485     ac_cv_enable_usr_local=$enableval,ac_cv_enable_usr_local=yes)
486
487 AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
488 if test "x$ac_cv_enable_usr_local" = "xyes" ; then
489         AC_MSG_RESULT(yes)
490         #
491         # Arrange that we search for header files in the source directory
492         # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
493         # as various packages we use ("libpcap", "zlib", "adns", "pcre")
494         # may have been installed under "/usr/local/include".
495         #
496         CFLAGS="$CFLAGS -I/usr/local/include"
497         CPPFLAGS="$CPPFLAGS -I/usr/local/include"
498
499         #
500         # Arrange that we search for libraries in "/usr/local/lib".
501         #
502         AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
503 else
504         AC_MSG_RESULT(no)
505 fi
506
507 #
508 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
509 # link directory.
510 #
511 case "$host_os" in
512   solaris*)
513     AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
514     if test x$LD_LIBRARY_PATH != x ; then
515       LIBS="$LIBS -R$LD_LIBRARY_PATH"
516       AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
517     else
518       AC_MSG_RESULT(no -- this may be a problem in a few seconds)
519     fi
520   ;;
521 esac
522
523 #
524 # Check for versions of "sed" inadequate to handle, in libtool, a list
525 # of object files as large as the list in Wireshark.
526 #
527 # On Solaris, we check for "/bin/sed", "/usr/bin/sed", and "/usr/ucb/sed",
528 # as both "/usr/bin/sed" (which is also "/bin/sed", as "/bin" is just a
529 # symlink to "/usr/bin", but people may have "/bin" before "/usr/bin" in
530 # their search path) and "/usr/ucb/sed" are inadequate; "/usr/xpg4/bin/sed"
531 # is the only "sed" that comes with Solaris that can handle Wireshark.
532 #
533 # Add any checks here that are necessary for other OSes.
534 #
535 AC_WIRESHARK_GNU_SED_CHECK
536 if test "$HAVE_GNU_SED" = no ; then
537         case "$host_os" in
538         solaris*)
539                 AC_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
540                 case `which sed` in
541                         /bin/sed|/usr/bin/sed|/usr/ucb/sed)
542                         AC_MSG_RESULT(yes)
543                         AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
544                         ;;
545
546                         *)
547                         AC_MSG_RESULT(no)
548                         ;;
549                 esac
550                 ;;
551
552         *)
553                 :
554                 ;;
555         esac
556 fi
557
558 # Enable/disable tshark
559
560 AC_ARG_ENABLE(wireshark,
561   AC_HELP_STRING( [--enable-wireshark],
562                   [build GTK+-based wireshark.  @<:@default=yes, if GTK+ available@:>@]),
563     enable_wireshark=$enableval,enable_wireshark=yes)
564
565 AC_ARG_ENABLE(threads,
566   AC_HELP_STRING( [--enable-threads],
567                   [use threads in wireshark.  @<:@default=no@:>@]),
568     enable_threads=$enableval,enable_threads=no)
569 AM_CONDITIONAL(USE_THREADS, test x$enable_threads = xyes)
570
571 AC_ARG_ENABLE(profile-build,
572   AC_HELP_STRING( [--enable-profile-build],
573                   [build profile-ready binaries.  @<:@default=no@:>@]),
574     enable_profile_build=$enableval,enable_profile_build=no)
575 AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)
576 AC_MSG_CHECKING(if profile builds must be generated)
577 if test "x$enable_profile_build" = "xyes" ; then
578         if test "x$GCC" = "xyes" ; then
579                 AC_MSG_RESULT(yes)
580                 CFLAGS=" -pg $CFLAGS"
581         else
582                 AC_MSG_RESULT(no)
583                 echo "Building profile binaries currently only supported for GCC."
584         fi
585 else
586         AC_MSG_RESULT(no)
587 fi
588
589 # Create DATAFILE_DIR #define for config.h
590 datafiledir=$datadir/wireshark
591 datafiledir=`(
592     test "x$prefix" = xNONE && prefix=$ac_default_prefix
593     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
594     # Ugly hack, but I don't see how this problem can be solved
595     # properly that DATAFILE_DIR had a value starting with
596     # "${prefix}/" instead of e.g. "/usr/local/"
597     eval eval echo "$datafiledir"
598 )`
599 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data])
600
601 # GTK checks; we require GTK+ 2.4 or later.
602 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
603 # programs to be built with GTK+.
604 #
605 if test "x$enable_wireshark" = "xyes"; then
606         AM_PATH_GTK_2_0(2.4.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread)
607 else
608         GTK_OK=no
609 fi
610
611 # GLib checks
612 # This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
613 # GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
614 # However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
615 # set when generating the Makefile, so we can make programs that require
616 # only GLib link with @GLIB_LIBS@ and make programs that require GTK+
617 # link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
618 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
619 # programs to be built with GLib.
620 #
621 if test "$GTK_OK" = "no" ; then
622         #
623         # We don't have GTK+.
624         # If they didn't explicitly say "--disable-wireshark", fail (so
625         # that, unless they explicitly indicated that they don't want
626         # Wireshark, we stop so they know they won't be getting
627         # Wireshark unless they fix the GTK+ problem).
628         #
629         if test "x$enable_wireshark" = "xyes"; then
630                 AC_MSG_ERROR([GTK+ 2.4 or later isn't available, so Wireshark can't be compiled])
631         fi
632         wireshark_bin=""
633         wireshark_man=""
634         # Honor GLIB_CFLAGS
635         AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
636
637 else
638         wireshark_bin="wireshark\$(EXEEXT)"
639         wireshark_man="wireshark.1"
640         wireshark_SUBDIRS="codecs gtk"
641         # Honor GLIB_CFLAGS
642         AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
643 fi
644
645 #
646 # Check whether GLib modules are supported, to determine whether we
647 # can support plugins.
648 #
649 AC_MSG_CHECKING(whether GLib supports loadable modules)
650 ac_save_CFLAGS="$CFLAGS"
651 ac_save_LIBS="$LIBS"
652 CFLAGS="$CFLAGS $GLIB_CFLAGS"
653 LIBS="$GLIB_LIBS $LIBS"
654 AC_TRY_RUN([
655 #include <glib.h>
656 #include <gmodule.h>
657 #include <stdio.h>
658 #include <stdlib.h>
659
660 int
661 main ()
662 {
663   if (g_module_supported())
664     return 0;   /* success */
665   else
666     return 1;   /* failure */
667 }
668 ], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
669    [echo $ac_n "cross compiling; assumed OK... $ac_c"
670     ac_cv_glib_supports_modules=yes])
671 CFLAGS="$ac_save_CFLAGS"
672 LIBS="$ac_save_LIBS"
673 if test "$ac_cv_glib_supports_modules" = yes ; then
674   AC_MSG_RESULT(yes)
675   have_plugins=yes
676 else
677   AC_MSG_RESULT(no)
678   have_plugins=no
679 fi
680
681 #
682 # If we have <dlfcn.h>, check whether we can use dladdr to find a
683 # filename (hopefully, a full pathname, but no guarantees) for
684 # the executable.
685 #
686 if test "$ac_cv_header_dlfcn_h" = "yes"
687 then
688         AC_MSG_CHECKING(whether dladdr can be used to find the pathname of an executable)
689         ac_save_CFLAGS="$CFLAGS"
690         ac_save_LIBS="$LIBS"
691         CFLAGS="$CFLAGS $GLIB_CFLAGS"
692         LIBS="$GLIB_LIBS $LIBS"
693         AC_TRY_RUN([
694 #define _GNU_SOURCE     /* required on Linux, sigh */
695 #include <dlfcn.h>
696
697 int
698 main(void)
699 {
700         Dl_info info;
701
702         if (!dladdr((void *)main, &info))
703                 return 1;       /* failure */
704         return 0;               /* assume success */
705 }
706 ], ac_cv_dladdr_finds_executable_path=yes, ac_cv_dladdr_finds_executable_path=no,
707    [echo $ac_n "cross compiling; assumed OK... $ac_c"
708     ac_cv_dladdr_finds_executable_path=yes])
709         CFLAGS="$ac_save_CFLAGS"
710         LIBS="$ac_save_LIBS"
711         if test x$ac_cv_dladdr_finds_executable_path = xyes
712         then
713                 AC_DEFINE(DLADDR_FINDS_EXECUTABLE_PATH, 1, [Define if dladdr can be used to find the path of the executable])
714         fi
715         AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
716 fi
717
718 dnl IGE Mac integration check
719 AC_MSG_CHECKING(whether to use IGE Mac integration functions)
720
721 AC_ARG_WITH(ige-mac-integration,
722   AC_HELP_STRING( [--with-ige-mac-integration],
723                   [use IGE Mac integration. (@<:@default=yes, if available@:>@]),
724 [
725     if test $withval = no
726     then
727         want_ige_mac_integration=no
728     else
729         want_ige_mac_integration=yes
730     fi
731 ],[
732     want_ige_mac_integration=yes
733 ])
734 if test "x$want_ige_mac_integration" = "xno" -o "x$no_gtk" = "xyes" ; then
735     AC_MSG_RESULT(no)
736 else
737     AC_MSG_RESULT(yes)
738     AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
739 fi
740
741
742 AC_SUBST(wireshark_bin)
743 AC_SUBST(wireshark_man)
744
745
746 # Enable/disable tshark
747
748 AC_ARG_ENABLE(tshark,
749   AC_HELP_STRING( [--enable-tshark],
750                   [build tshark.  @<:@default=yes@:>@]),
751     tshark=$enableval,enable_tshark=yes)
752
753 if test "x$enable_tshark" = "xyes" ; then
754         tshark_bin="tshark\$(EXEEXT)"
755         tshark_man="tshark.1"
756         wiresharkfilter_man="wireshark-filter.4"
757 else
758         tshark_bin=""
759         tshark_man=""
760 fi
761 AC_SUBST(tshark_bin)
762 AC_SUBST(tshark_man)
763 AC_SUBST(wiresharkfilter_man)
764
765
766
767 # Enable/disable editcap
768
769 AC_ARG_ENABLE(editcap,
770   AC_HELP_STRING( [--enable-editcap],
771                   [build editcap.  @<:@default=yes@:>@]),
772     enable_editcap=$enableval,enable_editcap=yes)
773
774 if test "x$enable_editcap" = "xyes" ; then
775         editcap_bin="editcap\$(EXEEXT)"
776         editcap_man="editcap.1"
777 else
778         editcap_bin=""
779         editcap_man=""
780 fi
781 AC_SUBST(editcap_bin)
782 AC_SUBST(editcap_man)
783
784 # Enabling/disabling of dumpcap is done later (after we know if we have PCAP
785 # or not)
786
787 # Enable/disable capinfos
788
789 AC_ARG_ENABLE(capinfos,
790   AC_HELP_STRING( [--enable-capinfos],
791                   [build capinfos.  @<:@default=yes@:>@]),
792     enable_capinfos=$enableval,enable_capinfos=yes)
793
794 if test "x$enable_capinfos" = "xyes" ; then
795         capinfos_bin="capinfos\$(EXEEXT)"
796         capinfos_man="capinfos.1"
797 else
798         capinfos_bin=""
799         capinfos_man=""
800 fi
801 AC_SUBST(capinfos_bin)
802 AC_SUBST(capinfos_man)
803
804
805 # Enable/disable mergecap
806
807 AC_ARG_ENABLE(mergecap,
808   AC_HELP_STRING( [--enable-mergecap],
809                   [build mergecap.  @<:@default=yes@:>@]),
810     enable_mergecap=$enableval,enable_mergecap=yes)
811
812 if test "x$enable_mergecap" = "xyes" ; then
813         mergecap_bin="mergecap\$(EXEEXT)"
814         mergecap_man="mergecap.1"
815 else
816         mergecap_bin=""
817         mergecap_man=""
818 fi
819 AC_SUBST(mergecap_bin)
820 AC_SUBST(mergecap_man)
821
822
823 # Enable/disable text2pcap
824
825 AC_ARG_ENABLE(text2pcap,
826   AC_HELP_STRING( [--enable-text2pcap],
827                   [build text2pcap.  @<:@default=yes@:>@]),
828     text2pcap=$enableval,enable_text2pcap=yes)
829
830 if test "x$enable_text2pcap" = "xyes" ; then
831         text2pcap_bin="text2pcap\$(EXEEXT)"
832         text2pcap_man="text2pcap.1"
833 else
834         text2pcap_bin=""
835         text2pcap_man=""
836 fi
837 AC_SUBST(text2pcap_bin)
838 AC_SUBST(text2pcap_man)
839
840 # Enable/disable idl2wrs
841
842 AC_ARG_ENABLE(idl2wrs,
843   AC_HELP_STRING( [--enable-idl2wrs],
844                   [build idl2wrs.  @<:@default=yes@:>@]),
845     enable_idl2wrs=$enableval,enable_idl2wrs=yes)
846
847 if test "x$enable_idl2wrs" = "xyes" ; then
848         idl2wrs_bin="idl2wrs"
849         idl2wrs_man="idl2wrs.1"
850 else
851         idl2wrs_bin=""
852         idl2wrs_man=""
853 fi
854 AC_SUBST(idl2wrs_bin)
855 AC_SUBST(idl2wrs_man)
856
857
858 # Enable/disable dftest
859
860 AC_ARG_ENABLE(dftest,
861   AC_HELP_STRING( [--enable-dftest],
862                   [build dftest.  @<:@default=yes@:>@]),
863     enable_dftest=$enableval,enable_dftest=yes)
864
865 if test "x$enable_dftest" = "xyes" ; then
866         dftest_bin="dftest\$(EXEEXT)"
867 else
868         dftest_bin=""
869 fi
870 AC_SUBST(dftest_bin)
871
872
873 # Enable/disable randpkt
874
875 AC_ARG_ENABLE(randpkt,
876   AC_HELP_STRING( [--enable-randpkt],
877                   [build randpkt.  @<:@default=yes@:>@]),
878     enable_randpkt=$enableval,enable_randpkt=yes)
879
880 if test "x$enable_randpkt" = "xyes" ; then
881         randpkt_bin="randpkt\$(EXEEXT)"
882 else
883         randpkt_bin=""
884 fi
885 AC_SUBST(randpkt_bin)
886
887
888
889 dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
890 dnl "gethostbyname()".
891 AC_WIRESHARK_GETHOSTBY_LIB_CHECK
892
893 dnl Checks for "connect()", used as a proxy for "socket()" - and
894 dnl "-lsocket", if we need it to get "connect()".
895 AC_WIRESHARK_SOCKET_LIB_CHECK
896
897 dnl pcap check
898 AC_MSG_CHECKING(whether to use libpcap for packet capture)
899
900 AC_ARG_WITH(pcap,
901   AC_HELP_STRING( [--with-pcap@<:@=DIR@:>@],
902                   [use libpcap for packet capturing.  @<:@default=yes@:>@]),
903 [
904         if test $withval = no
905         then
906                 want_pcap=no
907         elif test $withval = yes
908         then
909                 want_pcap=yes
910         else
911                 want_pcap=yes
912                 pcap_dir=$withval
913         fi
914 ],[
915         want_pcap=yes
916         pcap_dir=
917 ])
918 if test "x$want_pcap" = "xno" ; then
919         AC_MSG_RESULT(no)
920 else
921         AC_MSG_RESULT(yes)
922         AC_WIRESHARK_PCAP_CHECK
923 fi
924
925 # Enable/disable dumpcap
926
927 dnl dumpcap check
928 AC_MSG_CHECKING(whether to build dumpcap)
929
930 AC_ARG_ENABLE(dumpcap,
931   AC_HELP_STRING( [--enable-dumpcap],
932                   [build dumpcap.  @<:@default=yes@:>@]),
933     enable_dumpcap=$enableval,enable_dumpcap=yes)
934
935 if test "x$enable_dumpcap" = "xyes" ; then
936         if test "x$want_pcap" = "xno" ; then
937                 enable_dumpcap=no
938                 AC_MSG_RESULT(pcap not available - disabling dumpcap)
939         else
940                 AC_MSG_RESULT(yes)
941         fi
942 else
943         AC_MSG_RESULT(no)
944 fi
945
946 if test "x$enable_dumpcap" = "xyes" ; then
947         dumpcap_bin="dumpcap\$(EXEEXT)"
948         dumpcap_man="dumpcap.1"
949 else
950         dumpcap_bin=""
951         dumpcap_man=""
952 fi
953 AC_SUBST(dumpcap_bin)
954 AC_SUBST(dumpcap_man)
955
956 # Enable/disable rawshark
957
958 dnl rawshark check
959 AC_MSG_CHECKING(whether to build rawshark)
960
961 AC_ARG_ENABLE(rawshark,
962   AC_HELP_STRING( [--enable-rawshark],
963                   [build rawshark.  @<:@default=yes@:>@]),
964     rawshark=$enableval,enable_rawshark=yes)
965
966 if test "x$enable_rawshark" = "xyes" ; then
967         if test "x$want_pcap" = "xno" ; then
968                 enable_rawshark=no
969                 AC_MSG_RESULT(pcap not available - disabling rawshark)
970         else
971                 AC_MSG_RESULT(yes)
972         fi
973 else
974         AC_MSG_RESULT(no)
975 fi
976
977 if test "x$enable_rawshark" = "xyes" ; then
978         rawshark_bin="rawshark\$(EXEEXT)"
979         rawshark_man="rawshark.1"
980 else
981         rawshark_bin=""
982         rawshark_man=""
983 fi
984 AC_SUBST(rawshark_bin)
985 AC_SUBST(rawshark_man)
986
987
988 dnl pcap remote check
989 AC_MSG_CHECKING(whether to use libpcap remote capturing feature)
990
991 AC_ARG_WITH(pcap-remote,
992 [  --with-pcap-remote        use libpcap remote capturing (requires libpcap)],
993 [
994     if test $withval = no
995     then
996         want_pcap_remote=no
997     else
998         want_pcap_remote=yes
999     fi
1000 ],[
1001     want_pcap_remote=no
1002 ])
1003 if test "x$want_pcap_remote" = "xno" -o "x$want_pcap" = "xno" ; then
1004     AC_MSG_RESULT(no)
1005 else
1006     AC_MSG_RESULT(yes)
1007     AC_WIRESHARK_PCAP_REMOTE_CHECK
1008 fi
1009
1010 dnl zlib check
1011 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
1012
1013 AC_ARG_WITH(zlib,
1014   AC_HELP_STRING( [--with-zlib@<:@=DIR@:>@],
1015                   [use zlib (located in directory DIR, if supplied) to read compressed data.  @<:@default=yes, if available@:>@]),
1016 [
1017         if test $withval = no
1018         then
1019                 want_zlib=no
1020         elif test $withval = yes
1021         then
1022                 want_zlib=yes
1023         else
1024                 want_zlib=yes
1025                 zlib_dir=$withval
1026         fi
1027 ],[
1028         #
1029         # Use zlib if it's present, otherwise don't.
1030         #
1031         want_zlib=ifavailable
1032         zlib_dir=
1033 ])
1034 if test "x$want_zlib" = "xno" ; then
1035         AC_MSG_RESULT(no)
1036 else
1037         AC_MSG_RESULT(yes)
1038         AC_WIRESHARK_ZLIB_CHECK
1039         if test "x$want_zlib" = "xno" ; then
1040                 AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
1041         fi
1042 fi
1043
1044
1045 dnl pcre check
1046 AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
1047
1048 AC_ARG_WITH(pcre,
1049   AC_HELP_STRING( [--with-pcre@<:@=DIR@:>@],
1050                   [use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions.  @<:@default=yes, if available@:>@]),
1051 [
1052         if test $withval = no
1053         then
1054                 want_pcre=no
1055         elif test $withval = yes
1056         then
1057                 want_pcre=yes
1058         else
1059                 want_pcre=yes
1060                 pcre_dir=$withval
1061         fi
1062 ],[
1063         #
1064         # Use libpcre if it's present, otherwise don't.
1065         #
1066         want_pcre=ifavailable
1067         pcre_dir=
1068 ])
1069 if test "x$want_pcre" = "xno" ; then
1070         AC_MSG_RESULT(no)
1071 else
1072         AC_MSG_RESULT(yes)
1073         AC_WIRESHARK_LIBPCRE_CHECK
1074         if test "x$want_pcre" = "xno" ; then
1075                 AC_MSG_RESULT(libpcre not found - disabling support for perl compatible regular expressions in dfilters)
1076         fi
1077 fi
1078
1079
1080 dnl lua check
1081 AC_MSG_CHECKING(whether to use liblua for the lua scripting plugin)
1082
1083 AC_ARG_WITH(lua,
1084   AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
1085                   [use liblua (located in directory DIR, if supplied) for the lua scripting plugin.  @<:@default=yes, if available@:>@]),
1086 [
1087         if test $withval = no
1088         then
1089                 want_lua=no
1090         elif test $withval = yes
1091         then
1092                 want_lua=yes
1093         else
1094                 want_lua=yes
1095                 lua_dir=$withval
1096         fi
1097 ],[
1098         #
1099         # Use liblua by default
1100         #
1101         want_lua=ifavailable
1102         lua_dir=
1103 ])
1104 if test "x$want_lua" = "xno" ; then
1105         AC_MSG_RESULT(no)
1106 else
1107         AC_MSG_RESULT(yes)
1108         AC_WIRESHARK_LIBLUA_CHECK
1109         if test "x$want_lua" = "xno" ; then
1110                 AC_MSG_RESULT(liblua not found - disabling support for the lua scripting plugin)
1111         fi
1112 fi
1113 AM_CONDITIONAL(HAVE_LIBLUA, test x$want_lua = xyes)
1114
1115
1116 dnl portaudio check
1117 AC_MSG_CHECKING(whether to use libportaudio for the rtp_player)
1118
1119 AC_ARG_WITH(portaudio,
1120   AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@],
1121                   [use libportaudio (located in directory DIR, if supplied) for the rtp_player.  @<:@default=yes, if available@:>@]),
1122 [
1123         if test $withval = no
1124         then
1125                 want_portaudio=no
1126         elif test $withval = yes
1127         then
1128                 want_portaudio=yes
1129         else
1130                 want_portaudio=yes
1131                 portaudio_dir=$withval
1132         fi
1133 ],[
1134         #
1135         # Use libportaudio by default
1136         #
1137         want_portaudio=ifavailable
1138         portaudio_dir=
1139 ])
1140 if test "x$want_portaudio" = "xno" ; then
1141         AC_MSG_RESULT(no)
1142 else
1143         AC_MSG_RESULT(yes)
1144         AC_WIRESHARK_LIBPORTAUDIO_CHECK
1145         if test "x$want_portaudio" = "xno" ; then
1146                 AC_MSG_RESULT(libportaudio not found - disabling support for the rtp_player)
1147         fi
1148 fi
1149 AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
1150
1151
1152 dnl ipv6 check
1153 AC_ARG_ENABLE(ipv6,
1154   AC_HELP_STRING( [--enable-ipv6],
1155                   [use ipv6 name resolution, if available.  @<:@default=yes@:>@]),
1156     enable_ipv6=$enableval,enable_ipv6=yes)
1157
1158 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
1159 if test "x$enable_ipv6" = "xno" ; then
1160         AC_MSG_RESULT(no)
1161 else
1162         AC_MSG_RESULT(yes)
1163         AC_WIRESHARK_IPV6_STACK
1164 fi
1165
1166
1167 dnl Check if dumpcap should be installed setuid
1168 AC_ARG_ENABLE(setuid-install,
1169   AC_HELP_STRING( [--enable-setuid-install],
1170                   [install dumpcap as setuid @<:@default=no@:>@]),
1171     enable_setuid_install=$enableval,enable_setuid_install=no)
1172
1173 AC_MSG_CHECKING(whether to install dumpcap setuid)
1174 if test "x$enable_setuid_install" = "xno" ; then
1175         AC_MSG_RESULT(no)
1176 else
1177         if test "x$enable_dumpcap" = "xno" ; then
1178                 AC_MSG_ERROR(Setuid install works only with dumpcap but dumpcap is disabled)
1179         else
1180                 AC_MSG_RESULT(yes)
1181         fi
1182 fi
1183
1184 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
1185 AC_CHECK_FUNCS(setresuid setresgid)
1186
1187 dnl libcap (not libpcap) check
1188 LIBCAP_LIBS=''
1189 AC_MSG_CHECKING(whether to use the libcap capabilities library)
1190
1191 AC_ARG_WITH(libcap,
1192   AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@],
1193                   [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management.   @<:@default=yes, if present@:>@]),
1194 [
1195 if   test "x$withval" = "xno";  then
1196         want_libcap=no
1197 elif test "x$withval" = "xyes"; then
1198         want_libcap=yes
1199 elif test -d "$withval"; then
1200         want_libcap=yes
1201         AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1202 fi
1203 ])
1204 if test "x$with_libcap" = "xno" ; then
1205         AC_MSG_RESULT(no)
1206 else
1207         AC_MSG_RESULT(yes)
1208         AC_WIRESHARK_LIBCAP_CHECK
1209 fi
1210 AC_SUBST(LIBCAP_LIBS)
1211
1212 dnl Checks for header files.
1213 AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
1214 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)
1215 AC_CHECK_HEADERS(netinet/in.h)
1216 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
1217
1218 dnl SSL Check
1219 SSL_LIBS=''
1220 AC_MSG_CHECKING(whether to use SSL library)
1221
1222 AC_ARG_WITH(ssl,
1223   AC_HELP_STRING( [--with-ssl@<:@=DIR@:>@],
1224                   [use SSL crypto library (located in directory DIR, if supplied).   @<:@default=no@:>@]),
1225 [
1226 if test "x$withval" = "xno";  then
1227         want_ssl=no
1228 elif test "x$withval" = "xyes"; then
1229         want_ssl=yes
1230 elif test -d "$withval"; then
1231         want_ssl=yes
1232         AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1233 fi
1234 ],[
1235         want_ssl=no
1236 ])
1237 if test "x$want_ssl" = "xyes"; then
1238         AC_MSG_RESULT(yes)
1239         AC_CHECK_LIB(crypto,EVP_md5,
1240             [
1241                 SSL_LIBS=-lcrypto
1242             ],
1243             [
1244                 AC_MSG_ERROR([SSL crypto library was requested, but is not available])
1245             ])
1246 else
1247         AC_MSG_RESULT(no)
1248 fi
1249 AC_SUBST(SSL_LIBS)
1250
1251 dnl kerberos check
1252 AC_MSG_CHECKING(whether to use kerberos)
1253
1254 AC_ARG_WITH(krb5,
1255   AC_HELP_STRING( [--with-krb5@<:@=DIR@:>@],
1256                   [use kerberos (located in directory DIR, if supplied) to use in kerberos dissection  @<:@default=yes@:>@]),
1257 [
1258         if test $withval = no
1259         then
1260                 want_krb5=no
1261         elif test $withval = yes
1262         then
1263                 want_krb5=yes
1264         else
1265                 want_krb5=yes
1266                 krb5_dir=$withval
1267         fi
1268 ],[
1269         #
1270         # Use kerberos if specified, otherwise don't.
1271         #
1272         want_krb5=ifavailable
1273         krb5_dir=
1274 ])
1275 if test "x$want_krb5" = "xno" ; then
1276         AC_MSG_RESULT(no)
1277 else
1278         AC_MSG_RESULT(yes)
1279         AC_WIRESHARK_KRB5_CHECK
1280 fi
1281
1282
1283 dnl c-ares Check
1284 C_ARES_LIBS=''
1285 AC_MSG_CHECKING(whether to use the c-ares library if available)
1286
1287 AC_ARG_WITH(c-ares,
1288   AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@],
1289                   [use c-ares (located in directory DIR, if supplied). Supersedes --with-adns.   @<:@default=yes, if present@:>@]),
1290 [
1291 if   test "x$withval" = "xno";  then
1292         want_c_ares=no
1293 elif test "x$withval" = "xyes"; then
1294         want_c_ares=yes
1295 elif test -d "$withval"; then
1296         want_c_ares=yes
1297         AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1298 fi
1299 ])
1300 if test "x$want_c_ares" = "xno" ; then
1301         AC_MSG_RESULT(no)
1302 else
1303         AC_MSG_RESULT(yes)
1304         AC_WIRESHARK_C_ARES_CHECK
1305 fi
1306 AC_SUBST(C_ARES_LIBS)
1307
1308 dnl ADNS Check
1309 ADNS_LIBS=''
1310 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
1311
1312 AC_ARG_WITH(adns,
1313   AC_HELP_STRING( [--with-adns@<:@=DIR@:>@],
1314                   [use GNU ADNS (located in directory DIR, if supplied).   @<:@default=yes, if present@:>@]),
1315 [
1316 if   test "x$withval" = "xno";  then
1317         want_adns=no
1318 elif test "x$withval" = "xyes"; then
1319         want_adns=yes
1320 elif test -d "$withval"; then
1321         want_adns=yes
1322         AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1323 fi
1324 ])
1325 if test "x$want_adns" = "xno" -o "x$have_good_c_ares" = "xyes" ; then
1326         AC_MSG_RESULT(no)
1327 else
1328         AC_MSG_RESULT(yes)
1329         AC_WIRESHARK_ADNS_CHECK
1330 fi
1331 AC_SUBST(ADNS_LIBS)
1332
1333 dnl GEOIP Check
1334 GEOIP_LIBS=''
1335 AC_MSG_CHECKING(whether to use the GeoIP IP address mapping library if available)
1336
1337 AC_ARG_WITH(geoip,
1338   AC_HELP_STRING( [--with-geoip@<:@=DIR@:>@],
1339                   [use GeoIP (located in directory DIR, if supplied).   @<:@default=yes, if present@:>@]),
1340 [
1341 if   test "x$withval" = "xno";  then
1342         want_geoip=no
1343 elif test "x$withval" = "xyes"; then
1344         want_geoip=yes
1345 elif test -d "$withval"; then
1346         want_geoip=yes
1347         AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
1348 fi
1349 ])
1350 if test "x$want_geoip" = "xno"; then
1351         AC_MSG_RESULT(no)
1352 else
1353         AC_MSG_RESULT(yes)
1354         AC_WIRESHARK_GEOIP_CHECK
1355 fi
1356 AC_SUBST(GEOIP_LIBS)
1357
1358 dnl Python devel Check
1359 AC_ARG_WITH(python,
1360     AC_HELP_STRING( [--with-python@<:@=DIR@:>@],
1361                     [use python interpretor (installed in DIR, if supplied). @<:@default=no@:>@ (EXPERIMENTAL)]),
1362 [
1363 pythondir='${libdir}/wireshark/python/${VERSION}'
1364 if test "x$withval" = "xno"; then
1365   want_python=no
1366 elif test "x$withval" != "xyes"; then
1367   pythondir="$withval"
1368   want_python=yes
1369   AC_WIRESHARK_PYTHON_CHECK
1370 else
1371   want_python=yes
1372   AC_WIRESHARK_PYTHON_CHECK
1373 fi
1374 ])
1375 AM_CONDITIONAL(HAVE_LIBPY, test x$want_python = xyes)
1376 AC_SUBST(pythondir)
1377
1378 #
1379 # Define WS_VAR_IMPORT appropriately for declarations of external
1380 # variables exported from dynamically-linked libraries.
1381 #
1382 AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
1383
1384 AC_ARG_ENABLE(airpcap,
1385   AC_HELP_STRING( [--enable-airpcap],
1386                   [use airpcap in wireshark.  @<:@default=no@:>@]),
1387   enable_airpcap=$enableval
1388   if test x$enable_airpcap != xno; then
1389         AC_DEFINE(HAVE_AIRPCAP, 1, [Enable AirPcap])
1390   fi
1391 )
1392 #
1393 # Define HAVE_AIRPDCAP
1394 # We'll want to remove this eventually.
1395 #
1396 AC_DEFINE(HAVE_AIRPDCAP, 1, [Enable AirPDcap (WPA/WPA2 decryption)])
1397
1398 dnl Checks for typedefs, structures, and compiler characteristics.
1399 # AC_C_CONST
1400
1401 # We need to know whether "struct sockaddr" has an "sa_len" member
1402 # for get_interface_list().
1403
1404 AC_WIRESHARK_STRUCT_SA_LEN
1405
1406 # We must know our byte order
1407 AC_C_BIGENDIAN
1408
1409 # Checks whether "-traditional" is needed when using "ioctl".
1410 # XXX - do we need this?
1411 AC_PROG_GCC_TRADITIONAL
1412
1413 GETOPT_C=""
1414 GETOPT_O=""
1415 AC_CHECK_FUNC(getopt, GETOPT_O="",
1416   [GETOPT_O="getopt.o"
1417    AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
1418 ])
1419 if test "$ac_cv_func_getopt" = no ; then
1420   GETOPT_C="getopt.c"
1421   GETOPT_O="getopt.o"
1422 fi
1423 AC_SUBST(GETOPT_C)
1424 AC_SUBST(GETOPT_O)
1425
1426 AC_CHECK_FUNC(strerror, STRERROR_O="",
1427   [STRERROR_O="strerror.o"
1428    AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
1429 ])
1430 if test "$ac_cv_func_strerror" = no ; then
1431   STRERROR_C="strerror.c"
1432   STRERROR_O="strerror.o"
1433 fi
1434 AC_SUBST(STRERROR_C)
1435 AC_SUBST(STRERROR_O)
1436
1437 AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
1438   STRCASECMP_O="strcasecmp.o")
1439 if test "$ac_cv_func_strcasecmp" = no ; then
1440   STRCASECMP_C="strcasecmp.c"
1441   STRCASECMP_O="strcasecmp.o"
1442 fi
1443 AC_SUBST(STRCASECMP_C)
1444 AC_SUBST(STRCASECMP_O)
1445
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"
1451 fi
1452 AC_SUBST(STRNCASECMP_C)
1453 AC_SUBST(STRNCASECMP_O)
1454
1455 AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
1456   MKSTEMP_O="mkstemp.o")
1457 if test "$ac_cv_func_mkstemp" = no ; then
1458   MKSTEMP_C="mkstemp.c"
1459   MKSTEMP_O="mkstemp.o"
1460 fi
1461 AC_SUBST(MKSTEMP_C)
1462 AC_SUBST(MKSTEMP_O)
1463
1464 #
1465 # XXX - if inet_aton isn't found, the build fails, with a complaint from
1466 # libtool about inet_aton.lo not being a valid libtool object.  We
1467 # probably have to handle it - and all the other replacement functions that
1468 # get built into libwireshark - differently.
1469 #
1470 AC_SEARCH_LIBS(inet_aton, [socket nsl], have_inet_aton=yes,
1471     have_inet_aton=no)
1472 if test "$have_inet_aton" = no; then
1473   INET_ATON_C="inet_aton.c"
1474   INET_ATON_O="inet_aton.o"
1475   INET_ATON_LO="inet_aton.lo"
1476   AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
1477 else
1478   INET_ATON_C=""
1479   INET_ATON_O=""
1480   INET_ATON_LO=""
1481 fi
1482 AC_SUBST(INET_ATON_C)
1483 AC_SUBST(INET_ATON_O)
1484 AC_SUBST(INET_ATON_LO)
1485
1486 AC_SEARCH_LIBS(inet_pton, [socket nsl], [
1487   dnl check for pre-BIND82 inet_pton() bug.
1488   AC_MSG_CHECKING(for broken inet_pton)
1489   AC_TRY_RUN([#include <sys/types.h>
1490 #include <sys/socket.h>
1491 #include <netinet/in.h>
1492 #include <arpa/inet.h>
1493 int main()
1494 {
1495 #ifdef AF_INET6
1496   char buf[16];
1497   /* this should return 0 (error) */
1498   return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
1499 #else
1500   return 1;
1501 #endif
1502 }], [AC_MSG_RESULT(ok);
1503 have_inet_pton=yes], [AC_MSG_RESULT(broken);
1504 have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
1505 have_inet_pton=no])],
1506 have_inet_pton=no)
1507 if test "$have_inet_pton" = no; then
1508   INET_PTON_C="inet_pton.c"
1509   INET_PTON_O="inet_pton.o"
1510   INET_PTON_LO="inet_pton.lo"
1511 else
1512   INET_PTON_C=""
1513   INET_PTON_O=""
1514   INET_PTON_LO=""
1515 fi
1516 AC_SUBST(INET_PTON_C)
1517 AC_SUBST(INET_PTON_O)
1518 AC_SUBST(INET_PTON_LO)
1519
1520 AC_SEARCH_LIBS(inet_ntop, [socket nsl], [
1521   AC_MSG_CHECKING([for inet_ntop prototype])
1522   AC_TRY_COMPILE([#include <stdio.h>
1523 #include <sys/types.h>
1524 #include <sys/socket.h>
1525 #include <netinet/in.h>
1526 #include <arpa/inet.h>
1527
1528 extern const char *inet_ntop(int, const void *, char *, size_t);],, [
1529     AC_MSG_RESULT(yes)
1530     AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1531     [Define if inet_ntop() prototype exists])], [
1532     AC_TRY_COMPILE([#include <stdio.h>
1533 #include <sys/types.h>
1534 #include <sys/socket.h>
1535 #include <netinet/in.h>
1536 #include <arpa/inet.h>
1537
1538 extern const char *inet_ntop(int, const void *, char *, socklen_t);],, [
1539       AC_MSG_RESULT(yes)
1540       AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1541       [Define if inet_ntop() prototype exists])], [
1542       AC_MSG_RESULT(no)])])
1543   INET_NTOP_O=""
1544   INET_NTOP_LO=""], [
1545   INET_NTOP_C="inet_ntop.c"
1546   INET_NTOP_O="inet_ntop.o"
1547   INET_NTOP_LO="inet_ntop.lo"
1548   AC_DEFINE(NEED_INET_V6DEFS_H, 1,
1549   [Define if inet/v6defs.h needs to be included])])
1550 AC_SUBST(INET_NTOP_C)
1551 AC_SUBST(INET_NTOP_O)
1552 AC_SUBST(INET_NTOP_LO)
1553
1554 AC_CHECK_FUNC(strptime, STRPTIME_O="",
1555   [STRPTIME_O="strptime.o"
1556    AC_DEFINE(NEED_STRPTIME_H, 1, [Define if strptime.h needs to be included])
1557 ])
1558 if test "$ac_cv_func_strptime" = no ; then
1559   STRPTIME_C="strptime.c"
1560   STRPTIME_O="strptime.o"
1561 fi
1562 AC_SUBST(STRPTIME_C)
1563 AC_SUBST(STRPTIME_O)
1564
1565 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
1566 AC_CHECK_FUNCS(issetugid)
1567 AC_CHECK_FUNCS(mmap mprotect sysconf)
1568
1569 dnl blank for now, but will be used in future
1570 AC_SUBST(wireshark_SUBDIRS)
1571
1572 dnl
1573 dnl check whether plugins should be enabled and, if they should be,
1574 dnl check for plugins directory - stolen from Amanda's configure.in
1575 dnl
1576 dnl we don't wish to expand ${libdir} yet
1577 plugindir='${libdir}/wireshark/plugins/${VERSION}'
1578 AC_ARG_WITH(plugins,
1579   AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@],
1580                   [support plugins (installed in DIR, if supplied).   @<:@default=yes, if possible@:>@]),
1581 [
1582   if test "x$withval" = "xno"; then
1583     have_plugins=no
1584   elif test "x$have_plugins" = "xno"; then
1585       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1586   elif test "x$withval" != "xyes"; then
1587       plugindir="$withval"
1588   fi
1589 ])
1590 AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes")
1591 if test x$have_plugins = xyes
1592 then
1593   AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
1594 fi
1595 AC_SUBST(plugindir)
1596 CPPFLAGS="$CPPFLAGS '-DPLUGIN_DIR=\"\$(plugindir)\"'"
1597
1598 #
1599 # The plugin dissectors reside in ./plugins/PROTO/
1600 #
1601 PLUGIN_LIBS=""
1602 AC_SUBST(PLUGIN_LIBS)
1603
1604 dnl libtool defs
1605 #
1606 # Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
1607 # (autoconf?  automake?  libtool?) - with the newer version(s), it's
1608 # just an alias for AC_PROG_LIBTOOL, which is called earlier.
1609 #
1610 # With older version(s) of those tool(s), however, it's not just an
1611 # alias, and the configure scripts don't work without it.
1612 #
1613 AM_PROG_LIBTOOL
1614 AC_SUBST(LIBTOOL_DEPS)
1615
1616 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
1617 if test x$enable_static = xyes -a x$have_plugins = xyes
1618 then
1619   AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Wireshark])
1620 fi
1621 AC_SUBST(ENABLE_STATIC)
1622
1623 dnl Save the cacheable configure results to config.cache before recursing
1624 AC_CACHE_SAVE
1625
1626 sinclude(plugins/Custom.m4) dnl
1627 ifdef(_CUSTOM_AC_OUTPUT_,, define(_CUSTOM_AC_OUTPUT_, )) dnl
1628
1629 AM_CONFIG_HEADER(config.h)
1630 AC_OUTPUT(
1631   Makefile
1632   doxygen.cfg
1633   asn1/Makefile
1634   asn1/acp133/Makefile
1635   asn1/acse/Makefile
1636   asn1/ansi_map/Makefile
1637   asn1/ansi-tcap/Makefile
1638   asn1/camel/Makefile
1639   asn1/cdt/Makefile
1640   asn1/charging_ase/Makefile
1641   asn1/cmip/Makefile
1642   asn1/cms/Makefile
1643   asn1/dap/Makefile
1644   asn1/disp/Makefile
1645   asn1/dop/Makefile
1646   asn1/dsp/Makefile
1647   asn1/ess/Makefile
1648   asn1/ftam/Makefile
1649   asn1/gnm/Makefile
1650   asn1/goose/Makefile
1651   asn1/gsmmap/Makefile
1652   asn1/h225/Makefile
1653   asn1/h235/Makefile
1654   asn1/h245/Makefile
1655   asn1/h248/Makefile
1656   asn1/h282/Makefile
1657   asn1/h283/Makefile
1658   asn1/h323/Makefile
1659   asn1/h450/Makefile
1660   asn1/h450-ros/Makefile
1661   asn1/h460/Makefile
1662   asn1/h501/Makefile
1663   asn1/inap/Makefile
1664   asn1/ldap/Makefile
1665   asn1/logotype-cert-extn/Makefile
1666   asn1/lte-rrc/Makefile
1667   asn1/mms/Makefile
1668   asn1/mpeg-audio/Makefile
1669   asn1/mpeg-pes/Makefile
1670   asn1/nbap/Makefile
1671   asn1/ns-cert-exts/Makefile
1672   asn1/ocsp/Makefile
1673   asn1/p7/Makefile
1674   asn1/pcap/Makefile
1675   asn1/pkcs1/Makefile
1676   asn1/pkcs12/Makefile
1677   asn1/pkinit/Makefile
1678   asn1/pkix1explicit/Makefile
1679   asn1/pkix1implicit/Makefile
1680   asn1/pkixcmp/Makefile
1681   asn1/pkixcrmf/Makefile
1682   asn1/pkixproxy/Makefile
1683   asn1/pkixqualified/Makefile
1684   asn1/pkixtsp/Makefile
1685   asn1/pres/Makefile
1686   asn1/q932/Makefile
1687   asn1/q932-ros/Makefile
1688   asn1/qsig/Makefile
1689   asn1/ranap/Makefile
1690   asn1/rnsap/Makefile
1691   asn1/ros/Makefile
1692   asn1/rrc/Makefile
1693   asn1/rrlp/Makefile
1694   asn1/rtse/Makefile
1695   asn1/s1ap/Makefile
1696   asn1/s4406/Makefile
1697   asn1/sabp/Makefile
1698   asn1/smrse/Makefile
1699   asn1/snmp/Makefile
1700   asn1/spnego/Makefile
1701   asn1/t125/Makefile
1702   asn1/t38/Makefile
1703   asn1/tcap/Makefile
1704   asn1/ulp/Makefile
1705   asn1/wlancertextn/Makefile
1706   asn1/x2ap/Makefile
1707   asn1/x411/Makefile
1708   asn1/x420/Makefile
1709   asn1/x509af/Makefile
1710   asn1/x509ce/Makefile
1711   asn1/x509if/Makefile
1712   asn1/x509sat/Makefile
1713   asn1/x721/Makefile
1714   doc/Makefile
1715   epan/Makefile
1716   epan/crc/Makefile
1717   epan/crypt/Makefile
1718   epan/doxygen.cfg
1719   epan/dfilter/Makefile
1720   epan/dissectors/Makefile
1721   epan/ftypes/Makefile
1722   epan/wslua/Makefile
1723   epan/wspython/Makefile
1724   codecs/Makefile
1725   gtk/Makefile
1726   gtk/doxygen.cfg
1727   help/Makefile
1728   packaging/Makefile
1729   packaging/macosx/Info.plist
1730   packaging/macosx/Makefile
1731   packaging/nsis/Makefile
1732   packaging/rpm/Makefile
1733   packaging/rpm/SPECS/Makefile
1734   packaging/rpm/SPECS/wireshark.spec
1735   packaging/svr4/Makefile
1736   packaging/svr4/checkinstall
1737   packaging/svr4/pkginfo
1738   plugins/Makefile
1739   plugins/asn1/Makefile
1740   plugins/docsis/Makefile
1741   plugins/ethercat/Makefile
1742   plugins/giop/Makefile
1743   plugins/gryphon/Makefile
1744   plugins/irda/Makefile
1745   plugins/m2m/Makefile
1746   plugins/mate/Makefile
1747   plugins/opcua/Makefile
1748   plugins/profinet/Makefile
1749   plugins/sercosiii/Makefile
1750   plugins/stats_tree/Makefile
1751   plugins/unistim/Makefile
1752   plugins/wimax/Makefile
1753   plugins/wimaxasncp/Makefile
1754   tools/Makefile
1755   tools/idl2wrs.sh
1756   tools/lemon/Makefile
1757   wiretap/Makefile
1758   wsutil/Makefile
1759   _CUSTOM_AC_OUTPUT_
1760   ,)
1761 dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
1762
1763
1764 # Pretty messages
1765
1766 if test "x$enable_setuid_install" = "xyes" ; then
1767         setuid_message="yes"
1768 else
1769         setuid_message="no"
1770 fi
1771
1772 if test "x$want_zlib" = "xno" ; then
1773         zlib_message="no"
1774 else
1775         zlib_message="yes"
1776 fi
1777
1778 if test "x$want_pcre" = "xno" ; then
1779         pcre_message="no"
1780 else
1781         pcre_message="yes"
1782 fi
1783
1784 if test "x$want_lua" = "xyes" ; then
1785         lua_message="yes"
1786 else
1787         lua_message="no"
1788 fi
1789
1790 if test "x$want_python" = "xyes"; then
1791         python_message="yes"
1792 else
1793         python_message="no"
1794 fi
1795
1796 if test "x$want_portaudio" = "xyes" ; then
1797         portaudio_message="yes"
1798 else
1799         portaudio_message="no"
1800 fi
1801
1802 if test "x$want_ssl" = "xno" ; then
1803         ssl_message="no"
1804 else
1805         ssl_message="yes"
1806 fi
1807
1808 if test "x$want_krb5" = "xno" ; then
1809         krb5_message="no"
1810 else
1811         krb5_message="yes ($ac_krb5_version)"
1812 fi
1813
1814 if test "x$have_good_c_ares" = "xyes" ; then
1815         c_ares_message="yes"
1816 else
1817         c_ares_message="no"
1818 fi
1819
1820 if test "x$have_good_adns" = "xyes" ; then
1821         adns_message="yes"
1822 else
1823         adns_message="no"
1824 fi
1825
1826 if test "x$have_good_libcap" = "xyes" ; then
1827         libcap_message="yes"
1828 else
1829         libcap_message="no"
1830 fi
1831
1832 if test "x$have_good_geoip" = "xyes" ; then
1833         geoip_message="yes"
1834 else
1835         geoip_message="no"
1836 fi
1837
1838 echo ""
1839 echo "The Wireshark package has been configured with the following options."
1840 echo "                    Build wireshark : $enable_wireshark"
1841 echo "                       Build tshark : $enable_tshark"
1842 echo "                     Build capinfos : $enable_capinfos"
1843 echo "                      Build editcap : $enable_editcap"
1844 echo "                      Build dumpcap : $enable_dumpcap"
1845 echo "                     Build mergecap : $enable_mergecap"
1846 echo "                    Build text2pcap : $enable_text2pcap"
1847 echo "                      Build idl2wrs : $enable_idl2wrs"
1848 echo "                      Build randpkt : $enable_randpkt"
1849 echo "                       Build dftest : $enable_dftest"
1850 echo "                     Build rawshark : $enable_rawshark"
1851 echo ""
1852 echo "             Install dumpcap setuid : $setuid_message"
1853 echo "                        Use plugins : $have_plugins"
1854 echo "                    Use lua library : $lua_message"
1855 echo "                 Use python binding : $python_message"
1856 echo "                   Build rtp_player : $portaudio_message"
1857 echo "                        Use threads : $enable_threads"
1858 echo "             Build profile binaries : $enable_profile_build"
1859 echo "                   Use pcap library : $want_pcap"
1860 echo "                   Use zlib library : $zlib_message"
1861 echo "                   Use pcre library : $pcre_message"
1862 echo "               Use kerberos library : $krb5_message"
1863 echo "                 Use c-ares library : $c_ares_message"
1864 echo "               Use GNU ADNS library : $adns_message"
1865 echo "                Use SMI MIB library : $libsmi_message"
1866 echo "             Use GNU crypto library : $gcrypt_message"
1867 echo "             Use SSL crypto library : $ssl_message"
1868 echo "           Use IPv6 name resolution : $enable_ipv6"
1869 echo "                 Use gnutls library : $tls_message"
1870 echo "     Use POSIX capabilities library : $libcap_message"
1871 echo "                  Use GeoIP library : $geoip_message"