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