propset svn:keywords and svn:eol-style
[obnox/wireshark/wip.git] / configure.in
1 # $Id$
2 #
3 AC_INIT(etypes.h)
4
5 AC_PREREQ(2.52)
6
7 dnl Check for CPU / vendor / OS
8 AC_CANONICAL_HOST
9 AC_CANONICAL_TARGET
10
11 AM_INIT_AUTOMAKE(ethereal, 0.10.12)
12
13 AM_DISABLE_STATIC
14
15 dnl Checks for programs.
16 AC_PROG_CC
17 AC_PROG_CPP
18 dnl Work around libtool bug (fixed in the version 1.5a?)
19 AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
20 AC_LIBTOOL_DLOPEN
21 AC_PROG_LIBTOOL
22 AC_PROG_YACC
23 AM_PROG_LEX
24 AC_PATH_PROG(PERL, perl)
25 AC_PATH_PROG(POD2MAN, pod2man)
26 if test "x$POD2MAN" = x
27 then
28         #
29         # The alternative is not to build the man pages....
30         #
31         AC_MSG_ERROR(I couldn't find pod2man; make sure it's installed and in your path)
32 fi
33 AC_PATH_PROG(POD2HTML, pod2html)
34 if test "x$POD2HTML" = x
35 then
36         #
37         # The alternative is not to build the HTML man pages....
38         #
39         AC_MSG_ERROR(I couldn't find pod2html; make sure it's installed and in your path)
40 fi
41 AC_PATH_PROG(HTML_VIEWER, htmlview)
42 if test "x$HTML_VIEWER" = x
43 then
44         AC_DEFINE_UNQUOTED(HTML_VIEWER, "mozilla", [HTML viewer, e.g. mozilla])
45 else
46         AC_DEFINE_UNQUOTED(HTML_VIEWER, "htmlview", [HTML viewer, e.g. mozilla])
47 fi
48
49 AC_PATH_PROG(LEX, flex)
50 AC_PATH_PROG(PYTHON, python)
51
52 AC_SUBST(PERL)
53 AC_SUBST(POD2MAN)
54 AC_SUBST(POD2HTML)
55 AC_SUBST(LEX)
56 AC_SUBST(FLEX_PATH)
57 AC_SUBST(PYTHON)
58 AC_SUBST(XSLTPROC)
59 AC_SUBST(XMLLINT)
60
61 # Check for doxygen
62 AC_PATH_PROG(DOXYGEN, doxygen)
63 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no")
64 AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
65
66 # Check for xsltproc
67 AC_PATH_PROG(XSLTPROC, xsltproc)
68 AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
69 AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
70
71 # Check for xmllint
72 AC_PATH_PROG(XMLLINT, xmllint)
73 AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
74 AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
75
76 # Check for fop (translate .fo to e.g. pdf)
77 AC_PATH_PROG(FOP, fop)
78 AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
79 AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
80
81 # Check for hhc (html help compiler)
82 AC_PATH_PROG(HHC, hhc.exe)
83 AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
84 AM_CONDITIONAL(HAVE_HHC, test x$HAVE_HHC = xyes)
85
86 # Check for packaging utilities
87 # For now, we check to see if the various packaging utilites are in our
88 # path.  I'm too lazy to write code to go hunt for them.  -  Gerald
89 AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no")
90 AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no")
91 AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no")
92
93 if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \
94      -a x$HAVE_PKGTRANS = xyes ; then
95   HAVE_SVR4_PACKAGING=yes
96 else
97   HAVE_SVR4_PACKAGING=no
98 fi
99 AC_SUBST(HAVE_SVR4_PACKAGING)
100
101 AC_ETHEREAL_RPM_CHECK
102 AC_SUBST(HAVE_RPM)
103
104 #
105 # If we're running gcc, add '-Wall -W' to CFLAGS, and add
106 # '-D_U_="__attribute__((unused))"' as well, so we can use _U_ to
107 # flag unused function arguments and not get warnings about them.
108 # If "--with-extra-gcc-checks" was specified, add "-Wcast-qual
109 # -Wcast-align" as well.  (Add more checks here in the future?)
110 #
111 # Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
112 # argument will compile with non-GCC compilers.
113 #
114 AC_ARG_WITH(extra-gcc-checks,
115 [  --with-extra-gcc-checks Do additional -W checks in GCC.  [default=no]],
116 [
117         if test $withval != no
118         then
119                 ethereal_extra_gcc_flags=" -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings"
120         fi
121 ],)
122 AC_MSG_CHECKING(to see if we can add '-Wall -W $ethereal_extra_gcc_flags' to CFLAGS)
123 if test x$GCC != x ; then
124   CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W $ethereal_extra_gcc_flags $CFLAGS"
125   AC_MSG_RESULT(yes)
126 else
127   CFLAGS="-D_U_=\"\" $CFLAGS"
128   AC_MSG_RESULT(no)
129 fi
130
131 #
132 # Add any platform-specific compiler flags needed.
133 #
134 AC_MSG_CHECKING(for platform-specific compiler flags)
135 if test "x$GCC" = x
136 then
137         #
138         # Not GCC - assume it's the vendor's compiler.
139         #
140         case "$host_os" in
141         hpux*)
142                 #
143                 # HP's ANSI C compiler; flags suggested by Jost Martin.
144                 # "-Ae" for ANSI C plus extensions such as "long long".
145                 # "+O2", for optimization.  XXX - works with "-g"?
146                 #
147                 CFLAGS="-Ae +O2 $CFLAGS"
148                 AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
149                 ;;
150         darwin*)
151                 #
152                 # It may be called "cc", but it's really a GCC derivative
153                 # with a problematic special precompiler and precompiled
154                 # headers; turn off the special precompiler, as some
155                 # apparently-legal code won't compile with its precompiled
156                 # headers.
157                 #
158                 CFLAGS="-no-cpp-precomp $CFLAGS"
159                 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
160                 ;;
161         *)
162                 AC_MSG_RESULT(none needed)
163                 ;;
164         esac
165 else
166         case "$host_os" in
167         solaris*)
168                 # the X11 headers don't automatically include prototype info
169                 # and a lot don't include the return type
170                 CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15"
171                 AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
172                 ;;
173         darwin*)
174                 #
175                 # See comments above about Apple's lovely C compiler.
176                 #
177                 CFLAGS="-no-cpp-precomp $CFLAGS"
178                 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
179                 ;;
180         cygwin*)
181                 #
182                 # Shared libraries in cygwin/Win32 must never contain
183                 # undefined symbols.
184                 #
185                 LDFLAGS="$LDFLAGS -no-undefined"
186                 AC_MSG_RESULT(CygWin GCC - added -no-undefined to LDFLAGS)
187                 ;;
188         *)
189                 AC_MSG_RESULT(none needed)
190                 ;;
191         esac
192 fi
193
194 #
195 # On OS X, if we find the headers for Core Foundation and Launch Services,
196 # add -framework options to link with Application Services (of which
197 # Launch Services is a subframework) and Core Foundation (required by
198 # the Launch Services APIs), so we can use that to launch a Web browser
199 # from the Help menu.
200 #
201 # (Do those headers exist on pure Darwin?  If so, does the CoreFoundation
202 # *and* Launch Services code exist there, or are those headers just stubs?
203 # If the frameworks aren't present on Darwin, how *should* we check for
204 # their existence?)
205 #
206 case "$host_os" in
207
208 darwin*)
209         AC_MSG_CHECKING(whether we can build with Core Foundation and Launch Services)
210         ac_save_LIBS="$LIBS"
211         ac_frameworks="-framework ApplicationServices -framework CoreFoundation"
212         LIBS="$LIBS $ac_frameworks"
213         AC_TRY_LINK(
214            [
215 #       include <CoreFoundation/CFBase.h>
216 #       include <CoreFoundation/CFString.h>
217 #       include <CoreFoundation/CFURL.h>
218 #       include <ApplicationServices/ApplicationServices.h>
219            ],
220            [
221         CFStringRef url_CFString;
222         CFURLRef url_CFURL;
223         OSStatus status;
224
225         url_CFString = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII);
226         url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL);
227         status = LSOpenCFURLRef(url_CFURL, NULL);
228            ],
229            ac_cv_can_use_cf_and_ls=yes,
230            ac_cv_can_use_cf_and_ls=no,
231            [echo $ac_n "cross compiling; assumed OK... $ac_c"])
232         if test "$ac_cv_can_use_cf_and_ls" = yes ; then
233                 AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
234                 FRAMEWORKS="$ac_frameworks"
235                 AC_MSG_RESULT(yes)
236         else
237                 AC_MSG_RESULT(no)
238         fi
239         LIBS="$ac_save_LIBS"
240         ;;
241 esac
242 AC_SUBST(FRAMEWORKS)
243
244 dnl Look in /usr/local for header files and libraries ?
245 dnl XXX FIXME don't include /usr/local if it is already in the system
246 dnl search path as this causes gcc 3.2 on Linux to complain about a change
247 dnl of the system search order for includes
248 AC_ARG_ENABLE(usr-local,
249 [  --enable-usr-local      look for headers and libs in /usr/local tree.  [default=yes]],ac_cv_enable_usr_local=$enableval,ac_cv_enable_usr_local=yes)
250
251 AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
252 if test "x$ac_cv_enable_usr_local" = "xyes" ; then
253         AC_MSG_RESULT(yes)
254         #
255         # Arrange that we search for header files in the source directory
256         # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
257         # as various packages we use ("libpcap", "zlib", an SNMP library)
258         # may have been installed under "/usr/local/include".
259         #
260         CFLAGS="$CFLAGS -I/usr/local/include"
261         CPPFLAGS="$CPPFLAGS -I/usr/local/include"
262
263         #
264         # Arrange that we search for libraries in "/usr/local/lib".
265         #
266         AC_ETHEREAL_ADD_DASH_L(LDFLAGS, /usr/local/lib)
267 else
268         AC_MSG_RESULT(no)
269 fi
270
271 #
272 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
273 # link directory.
274 #
275 case "$host_os" in
276   solaris*)
277     AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
278     if test x$LD_LIBRARY_PATH != x ; then
279       LIBS="$LIBS -R$LD_LIBRARY_PATH"
280       AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
281     else
282       AC_MSG_RESULT(no -- this may be a problem in a few seconds)
283     fi
284   ;;
285 esac
286
287 #
288 # Check for versions of "sed" inadequate to handle, in libtool, a list
289 # of object files as large as the list in Ethereal.
290 #
291 # On Solaris, we check for "/bin/sed", "/usr/bin/sed", and "/usr/ucb/sed",
292 # as both "/usr/bin/sed" (which is also "/bin/sed", as "/bin" is just a
293 # symlink to "/usr/bin", but people may have "/bin" before "/usr/bin" in
294 # their search path) and "/usr/ucb/sed" are inadequate; "/usr/xpg4/bin/sed"
295 # is the only "sed" that comes with Solaris that can handle Ethereal.
296 #
297 # Add any checks here that are necessary for other OSes.
298 #
299 AC_ETHEREAL_GNU_SED_CHECK
300 if test "$HAVE_GNU_SED" = no ; then
301         case "$host_os" in
302         solaris*)
303                 AC_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
304                 case `which sed` in
305                         /bin/sed|/usr/bin/sed|/usr/ucb/sed)
306                         AC_MSG_RESULT(yes)              
307                         AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
308                         ;;
309
310                         *)
311                         AC_MSG_RESULT(no)
312                         ;;
313                 esac
314                 ;;
315
316         *)
317                 :
318                 ;;
319         esac
320 fi
321
322 # Enable/disable tethereal
323
324 AC_ARG_ENABLE(ethereal,
325 [  --enable-ethereal       build GTK+-based ethereal.  [default=yes]],enable_ethereal=$enableval,enable_ethereal=yes)
326
327 AC_ARG_ENABLE(gtk2,
328 [  --disable-gtk2          build Glib1/Gtk1+-based (t)ethereal.  [default=no]],enable_gtk2=$enableval,enable_gtk2=yes)
329 AM_CONDITIONAL(USE_GTK2, test x$enable_gtk2 = xyes)
330
331 AC_ARG_ENABLE(threads,
332 [  --enable-threads        use threads in ethereal.  [default=no]],enable_threads=$enableval,enable_threads=no)
333 AM_CONDITIONAL(USE_THREADS, test x$enable_threads = xyes)
334
335 AC_ARG_ENABLE(profile-build,
336 [  --enable-profile-build  build profile-ready binaries.  [default=no]],enable_profile_build=$enableval,enable_profile_build=no)
337 AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)
338 AC_MSG_CHECKING(if profile builds must be generated)
339 if test "x$enable_profile_build" = "xyes" ; then
340         if test -n "$GCC" ; then
341                 AC_MSG_RESULT(yes)
342                 CFLAGS=" -pg $CFLAGS"
343         else
344                 AC_MSG_RESULT(no)
345                 echo "Building profile binaries currently only supported for GCC."
346         fi
347 else
348         AC_MSG_RESULT(no)
349 fi
350
351 # Create DATAFILE_DIR #define for config.h
352 datafiledir=$datadir/ethereal
353 datafiledir=`(
354     test "x$prefix" = xNONE && prefix=$ac_default_prefix
355     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
356     eval echo "$datafiledir"
357 )`
358 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data])
359
360 # GTK checks
361 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
362 # programs to be built with GTK+.
363 #
364 if test "x$enable_gtk2" = "xyes" -a "x$enable_ethereal" = "xyes" ; then
365         GTK_OK=two
366         AM_PATH_GTK_2_0(2.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread)
367 elif test "x$enable_gtk2" != "xyes" -a "x$enable_ethereal" = "xyes" ; then
368         GTK_OK=one
369         AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
370 else
371         GTK_OK=no
372 fi
373
374 # GLib checks
375 # This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
376 # GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
377 # However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
378 # set when generating the Makefile, so we can make programs that require
379 # only GLib link with @GLIB_LIBS@ and make programs that require GTK+
380 # link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
381 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
382 # programs to be built with GLib.
383 #
384 if test "$GTK_OK" = "no" ; then
385         enable_ethereal="no"
386         ethereal_bin=""
387         ethereal_man=""
388         # Honor GLIB_CFLAGS
389         if test "x$enable_gtk2" = "xyes" ; then
390                 AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib2 distribution not found.), gmodule)
391         else
392                 AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
393         fi
394 else
395         ethereal_bin="ethereal\$(EXEEXT)"
396         ethereal_man="ethereal.1"
397         ethereal_SUBDIRS="gtk"
398         # Honor GLIB_CFLAGS
399         if test "$GTK_OK" = "two" ; then
400                 AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
401         else
402                 AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
403         fi
404 fi
405
406 #
407 # Check whether GLib modules are supported, to determine whether we
408 # can support plugins.
409 #
410 AC_MSG_CHECKING(whether GLib supports loadable modules)
411 ac_save_CFLAGS="$CFLAGS"
412 ac_save_LIBS="$LIBS"
413 CFLAGS="$CFLAGS $GLIB_CFLAGS"
414 LIBS="$GLIB_LIBS $LIBS"
415 AC_TRY_RUN([
416 #include <glib.h>
417 #include <gmodule.h>
418 #include <stdio.h>
419 #include <stdlib.h>
420
421 int 
422 main ()
423 {
424   if (g_module_supported())
425     return 0;   /* success */
426   else
427     return 1;   /* failure */
428 }
429 ], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
430    [echo $ac_n "cross compiling; assumed OK... $ac_c"
431     ac_cv_glib_supports_modules=yes])
432 CFLAGS="$ac_save_CFLAGS"
433 LIBS="$ac_save_LIBS"
434 if test "$ac_cv_glib_supports_modules" = yes ; then
435   AC_MSG_RESULT(yes)
436   have_plugins=yes
437 else
438   AC_MSG_RESULT(no)
439   have_plugins=no
440 fi
441
442 #
443 # We can't just check for <inttypes.h> - some systems have one that
444 # doesn't define all the PRI[doxu]64 macros.
445 #
446 AC_CHECK_HEADERS(inttypes.h,
447   [
448     #
449     # OK, we have inttypes.h, but does it define those macros?
450     #
451     AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
452     AC_COMPILE_IFELSE(
453       [
454         AC_LANG_SOURCE(
455           [[
456             #include <inttypes.h>
457             #include <glib.h>
458             #include <stdio.h>
459             #include <sys/types.h>
460
461             main()
462             {
463               printf("%" PRId64 "\n", (gint64)1);
464               printf("%" PRIo64 "\n", (guint64)1);
465               printf("%" PRIx64 "\n", (guint64)1);
466               printf("%" PRIu64 "\n", (guint64)1);
467             }
468           ]])
469       ],
470       [
471         AC_MSG_RESULT(yes)
472         ac_ethereal_inttypes_h_defines_formats=yes
473       ],
474       [
475         AC_MSG_RESULT(no)
476         ac_ethereal_inttypes_h_defines_formats=no
477       ])
478   ],
479   [
480     #
481     # We don't have inttypes.h, so it obviously can't define those
482     # macros.
483     #
484     ac_ethereal_inttypes_h_defines_formats=no
485   ])
486 if test "$ac_ethereal_inttypes_h_defines_formats" = yes; then
487   AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if <inttypes.h> defines PRI[doxu]64 macros])
488 else
489   AC_ETHEREAL_CHECK_64BIT_FORMAT(ll,
490     [
491       AC_ETHEREAL_CHECK_64BIT_FORMAT(L,
492         [
493           AC_ETHEREAL_CHECK_64BIT_FORMAT(q,
494             [
495               AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
496             ])
497         ])
498     ])
499 fi
500
501 AC_SUBST(ethereal_bin)
502 AC_SUBST(ethereal_man)
503
504 rdps_bin="rdps\$(EXEEXT)"
505 AC_SUBST(rdps_bin)
506
507
508 # Enable/disable tethereal
509
510 AC_ARG_ENABLE(tethereal,
511 [  --enable-tethereal      build tethereal.  [default=yes]],tethereal=$enableval,enable_tethereal=yes)
512
513 if test "x$enable_tethereal" = "xyes" ; then
514         tethereal_bin="tethereal\$(EXEEXT)"
515         tethereal_man="tethereal.1"
516         etherealfilter_man="ethereal-filter.4"
517 else
518         tethereal_bin=""
519         tethereal_man=""
520 fi
521 AC_SUBST(tethereal_bin)
522 AC_SUBST(tethereal_man)
523 AC_SUBST(etherealfilter_man)
524
525
526
527 # Enable/disable editcap
528
529 AC_ARG_ENABLE(editcap,
530 [  --enable-editcap        build editcap.  [default=yes]],enable_editcap=$enableval,enable_editcap=yes)
531
532 if test "x$enable_editcap" = "xyes" ; then
533         editcap_bin="editcap\$(EXEEXT)"
534         editcap_man="editcap.1"
535 else
536         editcap_bin=""
537         editcap_man=""
538 fi
539 AC_SUBST(editcap_bin)
540 AC_SUBST(editcap_man)
541
542
543 # Enable/disable capinfos
544
545 AC_ARG_ENABLE(capinfos,
546 [  --enable-capinfos       build capinfos.  [default=yes]],enable_capinfos=$enableval,enable_capinfos=yes)
547
548 if test "x$enable_capinfos" = "xyes" ; then
549         capinfos_bin="capinfos\$(EXEEXT)"
550         capinfos_man="capinfos.1"
551 else
552         capinfos_bin=""
553         capinfos_man=""
554 fi
555 AC_SUBST(capinfos_bin)
556 AC_SUBST(capinfos_man)
557
558
559 # Enable/disable mergecap
560
561 AC_ARG_ENABLE(mergecap,
562 [  --enable-mergecap       build mergecap.  [default=yes]],enable_mergecap=$enableval,enable_mergecap=yes)
563
564 if test "x$enable_mergecap" = "xyes" ; then
565         mergecap_bin="mergecap\$(EXEEXT)"
566         mergecap_man="mergecap.1"
567 else
568         mergecap_bin=""
569         mergecap_man=""
570 fi
571 AC_SUBST(mergecap_bin)
572 AC_SUBST(mergecap_man)
573
574
575 # Enable/disable text2pcap
576
577 AC_ARG_ENABLE(text2pcap,
578 [  --enable-text2pcap      build text2pcap.  [default=yes]],text2pcap=$enableval,enable_text2pcap=yes)
579
580 if test "x$enable_text2pcap" = "xyes" ; then
581         text2pcap_bin="text2pcap\$(EXEEXT)"
582         text2pcap_man="text2pcap.1"
583 else
584         text2pcap_bin=""
585         text2pcap_man=""
586 fi
587 AC_SUBST(text2pcap_bin)
588 AC_SUBST(text2pcap_man)
589
590 # Enable/disable idl2eth
591
592 AC_ARG_ENABLE(idl2eth,
593 [  --enable-idl2eth        build idl2eth.  [default=yes]],enable_idl2eth=$enableval,enable_idl2eth=yes)
594
595 if test "x$enable_idl2eth" = "xyes" ; then
596         idl2eth_bin="idl2eth"
597         idl2eth_man="idl2eth.1"
598 else
599         idl2eth_bin=""
600         idl2eth_man=""
601 fi
602 AC_SUBST(idl2eth_bin)
603 AC_SUBST(idl2eth_man)
604
605
606 # Enable/disable dftest
607
608 AC_ARG_ENABLE(dftest,
609 [  --enable-dftest         build dftest.  [default=yes]],enable_dftest=$enableval,enable_dftest=yes)
610
611 if test "x$enable_dftest" = "xyes" ; then
612         dftest_bin="dftest\$(EXEEXT)"
613 else
614         dftest_bin=""
615 fi
616 AC_SUBST(dftest_bin)
617
618
619 # Enable/disable randpkt
620
621 AC_ARG_ENABLE(randpkt,
622 [  --enable-randpkt        build randpkt.  [default=yes]],enable_randpkt=$enableval,enable_randpkt=yes)
623
624 if test "x$enable_randpkt" = "xyes" ; then
625         randpkt_bin="randpkt\$(EXEEXT)"
626 else
627         randpkt_bin=""
628 fi
629 AC_SUBST(randpkt_bin)
630
631
632 dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
633 dnl "gethostbyname()".
634 AC_ETHEREAL_GETHOSTBY_LIB_CHECK
635
636 dnl Checks for "connect()", used as a proxy for "socket()" - and
637 dnl "-lsocket", if we need it to get "connect()".
638 AC_ETHEREAL_SOCKET_LIB_CHECK
639
640 dnl pcap check
641 AC_MSG_CHECKING(whether to use libpcap for packet capture)
642
643 AC_ARG_WITH(pcap,
644 [  --with-pcap[[=DIR]]       use libpcap for packet capturing.  [[default=yes]]],
645 [
646         if test $withval = no
647         then
648                 want_pcap=no
649         elif test $withval = yes
650         then
651                 want_pcap=yes
652         else
653                 want_pcap=yes
654                 pcap_dir=$withval
655         fi
656 ],[
657         want_pcap=yes
658         pcap_dir=
659 ])
660 if test "x$want_pcap" = "xno" ; then
661         AC_MSG_RESULT(no)
662 else
663         AC_MSG_RESULT(yes)
664         AC_ETHEREAL_PCAP_CHECK
665 fi
666
667 dnl zlib check
668 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
669
670 AC_ARG_WITH(zlib,
671 [  --with-zlib[[=DIR]]       use zlib (located in directory DIR, if supplied) to read compressed data.  [[default=yes, if available]]],
672 [
673         if test $withval = no
674         then
675                 want_zlib=no
676         elif test $withval = yes
677         then
678                 want_zlib=yes
679         else
680                 want_zlib=yes
681                 zlib_dir=$withval
682         fi
683 ],[
684         #
685         # Use zlib if it's present, otherwise don't.
686         #
687         want_zlib=ifavailable
688         zlib_dir=
689 ])
690 if test "x$want_zlib" = "xno" ; then
691         AC_MSG_RESULT(no)
692 else
693         AC_MSG_RESULT(yes)
694         AC_ETHEREAL_ZLIB_CHECK
695         if test "x$want_zlib" = "xno" ; then
696                 AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
697         fi
698 fi
699
700
701 dnl pcre check
702 AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
703
704 AC_ARG_WITH(pcre,
705 [  --with-pcre[[=DIR]]       use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions.  [[default=yes, if available]]],
706 [
707         if test $withval = no
708         then
709                 want_pcre=no
710         elif test $withval = yes
711         then
712                 want_pcre=yes
713         else
714                 want_pcre=yes
715                 pcre_dir=$withval
716         fi
717 ],[
718         #
719         # Use libpcre if it's present, otherwise don't.
720         #
721         want_pcre=ifavailable
722         pcre_dir=
723 ])
724 if test "x$want_pcre" = "xno" ; then
725         AC_MSG_RESULT(no)
726 else
727         AC_MSG_RESULT(yes)
728         AC_ETHEREAL_LIBPCRE_CHECK
729         if test "x$want_pcre" = "xno" ; then
730                 AC_MSG_RESULT(libpcre not found - disabling support for perl compatible regular expressions in dfilters)
731         fi
732 fi
733
734
735 dnl ipv6 check
736 AC_ARG_ENABLE(ipv6,
737 [  --enable-ipv6           use ipv6 name resolution, if available.  [default=yes]],enable_ipv6=$enableval,enable_ipv6=yes)
738
739 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
740 if test "x$enable_ipv6" = "xno" ; then
741         AC_MSG_RESULT(no)
742 else
743         AC_MSG_RESULT(yes)
744         AC_ETHEREAL_IPV6_STACK
745 fi
746
747
748 dnl Check if ethereal should be installed setuid
749 AC_ARG_ENABLE(setuid-install,
750 [  --enable-setuid-install install ethereal as setuid. DANGEROUS!!! [default=no]],enable_setuid_install=$enableval,enable_setuid_install=no)
751
752 AC_MSG_CHECKING(whether to install ethereal setuid)
753 if test "x$enable_setuid_install" = "xno" ; then
754         AC_MSG_RESULT(no)
755 else
756         AC_MSG_RESULT(yes)
757 fi
758
759 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
760
761 dnl Checks for header files.
762 AC_HEADER_STDC
763 AC_CHECK_HEADERS(direct.h dirent.h fcntl.h netdb.h stdarg.h stddef.h unistd.h)
764 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)
765 AC_CHECK_HEADERS(netinet/in.h)
766 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
767 AC_CHECK_HEADERS(iconv.h)
768
769 dnl SSL Check
770 SSL_LIBS=''
771 AC_MSG_CHECKING(whether to use SSL library)
772
773 AC_ARG_WITH(ssl,
774 [  --with-ssl[[=DIR]]        use SSL crypto library (located in directory DIR, if supplied).   [[default=no]]],
775 [
776 if test "x$withval" = "xno";  then
777         want_ssl=no
778 elif test "x$withval" = "xyes"; then
779         want_ssl=yes
780 elif test -d "$withval"; then
781         want_ssl=yes
782         AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
783 fi
784 ],[
785         want_ssl=no
786 ])
787 if test "x$want_ssl" = "xyes"; then
788         AC_MSG_RESULT(yes)
789         AC_CHECK_LIB(crypto,EVP_md5,
790             [
791                 SSL_LIBS=-lcrypto
792             ],
793             [
794                 AC_MSG_ERROR([SSL crypto library was requested, but is not available])
795             ])
796 else
797         AC_MSG_RESULT(no)
798 fi
799 AC_SUBST(SSL_LIBS)
800
801 dnl UCD SNMP/Net-SNMP Check
802 SNMP_LIBS=''
803
804 AC_ARG_WITH(net-snmp,
805 [  --with-net-snmp[[=PATH]]  use Net-SNMP library (with PATH as the location of the net-snmp-config shell script that comes with the net-snmp package, if supplied)  [[default=yes, if available]]],
806 [
807         if test $withval = no
808         then
809                 want_netsnmp=no
810         elif test $withval = yes
811         then
812                 want_netsnmp=yes
813         else
814                 want_netsnmp=yes
815                 netsnmpconfig="$withval"
816         fi
817 ],[
818         #
819         # Set "want_netsnmp" to "ifavailable" to make the default "use it
820         # if you find it, otherwise don't".
821         #
822         want_netsnmp=ifavailable
823 ])
824
825 AC_ARG_WITH(ucd-snmp,
826 [  --with-ucd-snmp[[=DIR]]   use UCD SNMP client library (located in directory DIR, if supplied).  [[default=yes, if available]]],
827 [
828         if test $withval = no
829         then
830                 want_ucdsnmp=no
831         elif test $withval = yes
832         then
833                 want_ucdsnmp=yes
834         else
835                 want_ucdsnmp=yes
836                 ucdsnmp_dir=$withval
837         fi
838 ],[
839         #
840         # Set "want_ucdsnmp" to "ifavailable" to make the default "use it
841         # if you find it, otherwise don't".
842         #
843         want_ucdsnmp=ifavailable
844         ucdsnmp_dir=
845 ])
846
847 #
848 # Try Net-SNMP first.
849 #
850 AC_MSG_CHECKING(whether to use Net-SNMP library)
851 if test "x$want_netsnmp" = "xno" ; then
852         AC_MSG_RESULT(no)
853 else
854         if test "x$want_netsnmp" = "xifavailable" ; then
855                 AC_MSG_RESULT([yes, if available])
856         else
857                 AC_MSG_RESULT(yes)
858         fi
859         AC_ETHEREAL_NETSNMP_CHECK
860 fi
861
862 #
863 # If that didn't find Net-SNMP, try UCD SNMP.
864 #
865 if test "x$have_net_snmp" != "xyes" ; then
866         AC_MSG_CHECKING(whether to use UCD SNMP library)
867         if test "x$want_ucdsnmp" = "xno" ; then
868                 AC_MSG_RESULT(no)
869         else
870                 if test "x$want_ucdsnmp" = "xifavailable" ; then
871                         AC_MSG_RESULT([yes, if available])
872                 else
873                         AC_MSG_RESULT(yes)
874                 fi
875                 AC_ETHEREAL_UCDSNMP_CHECK
876         fi
877 fi
878
879 if test "x$have_net_snmp" = "xyes" || test "x$have_ucd_snmp" = "xyes"; then
880         AC_DEFINE(HAVE_SOME_SNMP, 1, [Define to 1 if some SNMP support is to be used])
881 fi
882
883 AC_SUBST(SNMP_LIBS)
884
885
886 dnl kerberos check
887 AC_MSG_CHECKING(whether to use kerberos)
888
889 AC_ARG_WITH(krb5,
890 [  --with-krb5[[=DIR]]       use kerberos (located in directory DIR, if supplied) to use in kerberos dissection  [[default=yes]]],
891 [
892         if test $withval = no
893         then
894                 want_krb5=no
895         elif test $withval = yes
896         then
897                 want_krb5=yes
898         else
899                 want_krb5=yes
900                 krb5_dir=$withval
901         fi
902 ],[
903         #
904         # Use kerberos if specified, otherwise don't.
905         #
906         want_krb5=ifavailable
907         krb5_dir=
908 ])
909 if test "x$want_krb5" = "xno" ; then
910         AC_MSG_RESULT(no)
911 else
912         AC_MSG_RESULT(yes)
913         AC_ETHEREAL_KRB5_CHECK
914 fi
915
916
917 dnl ADNS Check
918 ADNS_LIBS=''
919 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
920
921 AC_ARG_WITH(adns,
922 [  --with-adns[[=DIR]]       use GNU ADNS (located in directory DIR, if supplied).   [[default=yes, if present]]],
923 [
924 if   test "x$withval" = "xno";  then
925         want_adns=no
926 elif test "x$withval" = "xyes"; then
927         want_adns=yes
928 elif test -d "$withval"; then
929         want_adns=yes
930         AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
931 fi
932 ])
933 if test "x$with_adns" = "xno" ; then
934         AC_MSG_RESULT(no)
935 else
936         AC_MSG_RESULT(yes)
937         AC_ETHEREAL_ADNS_CHECK
938 fi
939 AC_SUBST(ADNS_LIBS)
940
941 #
942 # Define ETH_VAR_IMPORT appropriately for declarations of external
943 # variables exported from dynamically-linked libraries.
944 #
945 AC_DEFINE(ETH_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
946
947 dnl Checks for typedefs, structures, and compiler characteristics.
948 # AC_C_CONST
949
950 # We need to know whether "struct sockaddr" has an "sa_len" member
951 # for get_interface_list().
952
953 AC_ETHEREAL_STRUCT_SA_LEN
954
955 # We must know our byte order
956 AC_C_BIGENDIAN
957
958 # Checks whether "-traditional" is needed when using "ioctl".
959 # XXX - do we need this?
960 AC_PROG_GCC_TRADITIONAL
961
962 # If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
963 # then this won't work.
964 SNPRINTF_C=""
965 SNPRINTF_O=""
966 AC_CHECK_FUNC(snprintf, SNPRINTF_O="",
967   [SNPRINTF_O="snprintf.o"
968    AC_DEFINE(NEED_SNPRINTF_H, 1, [Define if sprintf.h needs to be included])
969 ])
970 if test "$ac_cv_func_snprintf" = no ; then
971   SNPRINTF_C="snprintf.c"
972   SNPRINTF_O="snprintf.o"
973 fi
974 AC_SUBST(SNPRINTF_C)
975 AC_SUBST(SNPRINTF_O)
976
977 AC_CHECK_FUNC(strerror, STRERROR_O="",
978   [STRERROR_O="strerror.o"
979    AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
980 ])
981 if test "$ac_cv_func_strerror" = no ; then
982   STRERROR_C="strerror.c"
983   STRERROR_O="strerror.o"
984 fi
985 AC_SUBST(STRERROR_C)
986 AC_SUBST(STRERROR_O)
987
988 AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
989   STRCASECMP_O="strcasecmp.o")
990 if test "$ac_cv_func_strcasecmp" = no ; then
991   STRCASECMP_C="strcasecmp.c"
992   STRCASECMP_O="strcasecmp.o"
993 fi
994 AC_SUBST(STRCASECMP_C)
995 AC_SUBST(STRCASECMP_O)
996
997 AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
998   STRNCASECMP_O="strncasecmp.o")
999 if test "$ac_cv_func_strncasecmp" = no ; then
1000   STRNCASECMP_C="strncasecmp.c"
1001   STRNCASECMP_O="strncasecmp.o"
1002 fi
1003 AC_SUBST(STRNCASECMP_C)
1004 AC_SUBST(STRNCASECMP_O)
1005
1006 AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
1007   MKSTEMP_O="mkstemp.o")
1008 if test "$ac_cv_func_mkstemp" = no ; then
1009   MKSTEMP_C="mkstemp.c"
1010   MKSTEMP_O="mkstemp.o"
1011 fi
1012 AC_SUBST(MKSTEMP_C)
1013 AC_SUBST(MKSTEMP_O)
1014
1015 ac_save_LIBS="$LIBS"
1016 LIBS="$GLIB_LIBS $LIBS"
1017 G_ASCII_STRTOULL_C=""
1018 G_ASCII_STRTOULL_O=""
1019 G_ASCII_STRTOULL_LO=""
1020 AC_CHECK_FUNC(g_ascii_strtoull,
1021   [G_ASCII_STRTOULL_O=""
1022    G_ASCII_STRTOULL_LO=""],
1023   [G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
1024    G_ASCII_STRTOULL_LO="g_ascii_strtoull.lo"
1025    AC_DEFINE(NEED_G_ASCII_STRTOULL_H, 1, [Define if g_ascii_strtoull.h needs to be included])
1026 ])
1027 LIBS="$ac_save_LIBS"
1028 if test "$ac_cv_func_g_ascii_strtoull" = no ; then
1029   G_ASCII_STRTOULL_C="g_ascii_strtoull.c"
1030   G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
1031   G_ASCII_STRTOULL_LO="g_ascii_strtoull.lo"
1032 fi
1033 AC_SUBST(G_ASCII_STRTOULL_C)
1034 AC_SUBST(G_ASCII_STRTOULL_O)
1035 AC_SUBST(G_ASCII_STRTOULL_LO)
1036
1037 AC_CHECK_FUNC(inet_aton,
1038   [INET_ATON_O=""
1039    INET_ATON_LO=""],
1040   [INET_ATON_O="inet_aton.o"
1041    INET_ATON_LO="inet_aton.lo"
1042 ])
1043 if test "$ac_cv_func_inet_aton" = no ; then
1044   INET_ATON_C="inet_aton.c"
1045   INET_ATON_O="inet_aton.o"
1046   INET_ATON_LO="inet_aton.lo"
1047   AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
1048 fi
1049 AC_SUBST(INET_ATON_C)
1050 AC_SUBST(INET_ATON_O)
1051 AC_SUBST(INET_ATON_LO)
1052
1053 AC_SEARCH_LIBS(inet_pton, [socket nsl], [
1054   dnl check for pre-BIND82 inet_pton() bug.
1055   AC_MSG_CHECKING(for broken inet_pton)
1056   AC_TRY_RUN([#include <sys/types.h>
1057 #include <sys/socket.h>
1058 #include <netinet/in.h>
1059 #include <arpa/inet.h>
1060 int main()
1061 {
1062 #ifdef AF_INET6
1063   char buf[16];
1064   /* this should return 0 (error) */
1065   return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
1066 #else
1067   return 1;
1068 #endif
1069 }], [AC_MSG_RESULT(ok);
1070 have_inet_pton=yes], [AC_MSG_RESULT(broken);
1071 have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
1072 have_inet_pton=no])],
1073 have_inet_pton=no)
1074 if test "$have_inet_pton" = no; then
1075   INET_PTON_C="inet_pton.c"
1076   INET_PTON_O="inet_pton.o"
1077   INET_PTON_LO="inet_pton.lo"
1078 else
1079   INET_PTON_C=""
1080   INET_PTON_O=""
1081   INET_PTON_LO=""
1082 fi
1083 AC_SUBST(INET_PTON_C)
1084 AC_SUBST(INET_PTON_O)
1085 AC_SUBST(INET_PTON_LO)
1086
1087 AC_SEARCH_LIBS(inet_ntop, [socket nsl], [
1088   AC_MSG_CHECKING([for inet_ntop prototype])
1089   AC_TRY_COMPILE([#include <stdio.h>
1090 #include <sys/types.h>
1091 #include <sys/socket.h>
1092 #include <netinet/in.h>
1093 #include <arpa/inet.h>
1094
1095 extern const char *inet_ntop(int, const void *, char *, size_t);],, [
1096     AC_MSG_RESULT(yes)
1097     AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1098     [Define if inet_ntop() prototype exists])], [
1099     AC_TRY_COMPILE([#include <stdio.h>
1100 #include <sys/types.h>
1101 #include <sys/socket.h>
1102 #include <netinet/in.h>
1103 #include <arpa/inet.h>
1104
1105 extern const char *inet_ntop(int, const void *, char *, socklen_t);],, [
1106       AC_MSG_RESULT(yes)
1107       AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1108       [Define if inet_ntop() prototype exists])], [
1109       AC_MSG_RESULT(no)])])
1110   INET_NTOP_O=""
1111   INET_NTOP_LO=""], [
1112   INET_NTOP_C="inet_ntop.c"
1113   INET_NTOP_O="inet_ntop.o"
1114   INET_NTOP_LO="inet_ntop.lo"
1115   AC_DEFINE(NEED_INET_V6DEFS_H, 1,
1116   [Define if inet/v6defs.h needs to be included])])
1117 AC_SUBST(INET_NTOP_C)
1118 AC_SUBST(INET_NTOP_O)
1119 AC_SUBST(INET_NTOP_LO)
1120
1121 AC_CHECK_FUNC(strptime, STRPTIME_O="",
1122   [STRPTIME_O="strptime.o"
1123    AC_DEFINE(NEED_STRPTIME_H, 1, [Define if strptime.h needs to be included])
1124 ])
1125 if test "$ac_cv_func_strptime" = no ; then
1126   STRPTIME_C="strptime.c"
1127   STRPTIME_O="strptime.o"
1128 fi
1129 AC_SUBST(STRPTIME_C)
1130 AC_SUBST(STRPTIME_O)
1131
1132 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
1133
1134 dnl blank for now, but will be used in future
1135 AC_SUBST(ethereal_SUBDIRS)
1136
1137 dnl
1138 dnl check whether plugins should be enabled and, if they should be,
1139 dnl check for plugins directory - stolen from Amanda's configure.in
1140 dnl
1141 plugindir="$libdir/ethereal/plugins/$VERSION"
1142 AC_ARG_WITH(plugins,
1143 [  --with-plugins[[=DIR]]    support plugins (installed in DIR, if supplied).],
1144 [
1145   case "$withval" in
1146   "" | y | ye | yes )
1147     if test x$have_plugins = xno
1148     then
1149       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1150     fi
1151     ;;
1152   n | no)
1153     have_plugins=no
1154     ;;
1155   *)
1156     if test x$have_plugins = xno
1157     then
1158       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1159     fi
1160     plugindir="$withval"
1161     ;;
1162   esac
1163 ])
1164
1165 AM_CONDITIONAL(HAVE_PLUGINS, test x$have_plugins = xyes)
1166 if test x$have_plugins = xyes
1167 then
1168   AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
1169   plugindir=`(
1170     test "x$prefix" = xNONE && prefix=$ac_default_prefix
1171     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1172     eval echo "$plugindir"
1173   )`
1174   AC_DEFINE_UNQUOTED(PLUGIN_DIR, "$plugindir", [Plugin installation directory])
1175 else
1176   AC_DEFINE(PLUGIN_DIR, NULL, [Plugin installation directory])
1177 fi
1178 AC_SUBST(plugindir)
1179
1180 #
1181 # The plugin dissectors reside in ./plugins/PROTO/
1182 #
1183 PLUGIN_LIBS="-L../../epan -lethereal $GLIB_LIBS"
1184 AC_SUBST(PLUGIN_LIBS)
1185
1186 dnl libtool defs
1187 #
1188 # Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
1189 # (autoconf?  automake?  libtool?) - with the newer version(s), it's
1190 # just an alias for AC_PROG_LIBTOOL, which is called earlier.
1191 #
1192 # With older version(s) of those tool(s), however, it's not just an
1193 # alias, and the configure scripts don't work without it.
1194 #
1195 AM_PROG_LIBTOOL
1196 AC_SUBST(LIBTOOL_DEPS)
1197
1198 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
1199 if test x$enable_static = xyes -a x$have_plugins = xyes
1200 then
1201   AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Ethereal])
1202 fi
1203 AC_SUBST(ENABLE_STATIC)
1204
1205 dnl Save the cacheable configure results to config.cache before recursing
1206 AC_CACHE_SAVE
1207
1208 AM_CONFIG_HEADER(config.h)
1209 AC_CONFIG_SUBDIRS(wiretap)
1210 AC_OUTPUT(
1211   Makefile
1212   doxygen.cfg
1213   doc/Makefile
1214   epan/Makefile
1215   epan/doxygen.cfg
1216   epan/dfilter/Makefile
1217   epan/dissectors/Makefile
1218   epan/ftypes/Makefile
1219   gtk/Makefile
1220   gtk/doxygen.cfg
1221   help/Makefile
1222   packaging/Makefile
1223   packaging/nsis/Makefile
1224   packaging/rpm/Makefile
1225   packaging/rpm/SPECS/Makefile
1226   packaging/rpm/SPECS/ethereal.spec
1227   packaging/svr4/Makefile
1228   packaging/svr4/checkinstall
1229   packaging/svr4/pkginfo
1230   plugins/Makefile
1231   plugins/acn/Makefile
1232   plugins/agentx/Makefile
1233   plugins/artnet/Makefile
1234   plugins/asn1/Makefile
1235   plugins/ciscosm/Makefile
1236   plugins/docsis/Makefile
1237   plugins/enttec/Makefile
1238   plugins/giop/Makefile
1239   plugins/gryphon/Makefile
1240   plugins/irda/Makefile
1241   plugins/lwres/Makefile
1242   plugins/mate/Makefile
1243   plugins/megaco/Makefile
1244   plugins/mgcp/Makefile
1245   plugins/opsi/Makefile
1246   plugins/pcli/Makefile
1247   plugins/profinet/Makefile
1248   plugins/rdm/Makefile
1249   plugins/rlm/Makefile
1250   plugins/rtnet/Makefile
1251   plugins/rudp/Makefile
1252   plugins/stats_tree/Makefile
1253   plugins/v5ua/Makefile
1254   plugins/xml/Makefile
1255   tools/Makefile
1256   tools/lemon/Makefile
1257   ,)
1258
1259
1260 # Pretty messages
1261
1262 if test "x$enable_setuid_install" = "xyes" ; then
1263         setuid_message="yes (DANGEROUS!!!)"
1264 else
1265         setuid_message="no"
1266 fi
1267
1268 if test "x$want_zlib" = "xno" ; then
1269         zlib_message="no"
1270 else
1271         zlib_message="yes"
1272 fi
1273
1274 if test "x$want_pcre" = "xno" ; then
1275         pcre_message="no"
1276 else
1277         pcre_message="yes"
1278 fi
1279
1280 if test "x$want_ssl" = "xno" ; then
1281         ssl_message="no"
1282 else
1283         ssl_message="yes"
1284 fi
1285
1286 if test "x$want_krb5" = "xno" ; then
1287         krb5_message="no"
1288 else
1289         krb5_message="yes ($ac_krb5_version)"
1290 fi
1291
1292 if test "x$have_good_adns" = "xyes" ; then
1293         adns_message="yes"
1294 else
1295         adns_message="no"
1296 fi
1297
1298 if test "x$have_net_snmp" = "xyes" ; then
1299         snmp_libs_message="yes (net-snmp)"
1300 elif test "x$have_ucdsnmp" = "xyes" ; then
1301         snmp_libs_message="yes (ucd-snmp)"
1302 else
1303         snmp_libs_message="no"
1304 fi
1305
1306 echo ""
1307 echo "The Ethereal package has been configured with the following options."
1308 echo "                    Build ethereal : $enable_ethereal"
1309 echo "                   Build tethereal : $enable_tethereal"
1310 echo "                    Build capinfos : $enable_capinfos"
1311 echo "                     Build editcap : $enable_editcap"
1312 echo "                    Build mergecap : $enable_mergecap"
1313 echo "                   Build text2pcap : $enable_text2pcap"
1314 echo "                     Build idl2eth : $enable_idl2eth"
1315 echo "                     Build randpkt : $enable_randpkt"
1316 echo "                      Build dftest : $enable_dftest"
1317 echo ""
1318 echo "                    Install setuid : $setuid_message"
1319 echo "                       Use plugins : $have_plugins"
1320 echo "               Use GTK+ v2 library : $enable_gtk2"
1321 if test "x$enable_gtk2" = "xyes" ; then
1322 echo "                       Use threads : $enable_threads"
1323 echo "            Build profile binaries : $enable_profile_build"
1324 fi
1325 echo "                  Use pcap library : $want_pcap"
1326 echo "                  Use zlib library : $zlib_message"
1327 echo "                  Use pcre library : $pcre_message"
1328 echo "              Use kerberos library : $krb5_message"
1329 echo "              Use GNU ADNS library : $adns_message"
1330 echo "            Use SSL crypto library : $ssl_message"
1331 echo "          Use IPv6 name resolution : $enable_ipv6"
1332 echo "     Use UCD SNMP/Net-SNMP library : $snmp_libs_message"