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