the buildbot has a problem not knowing sa_family_t, define eth_sa_family_t and use...
[obnox/wireshark/wip.git] / configure.in
1 # $Id$
2 #
3 AC_INIT(cfile.h)
4
5 AC_PREREQ(2.52)
6
7 dnl Check for CPU / vendor / OS
8 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("%" PRIX64 "\n", (guint64)1);
467               printf("%" PRIu64 "\n", (guint64)1);
468             }
469           ]])
470       ],
471       [
472         AC_MSG_RESULT(yes)
473         ac_ethereal_inttypes_h_defines_formats=yes
474       ],
475       [
476         AC_MSG_RESULT(no)
477         ac_ethereal_inttypes_h_defines_formats=no
478       ])
479   ],
480   [
481     #
482     # We don't have inttypes.h, so it obviously can't define those
483     # macros.
484     #
485     ac_ethereal_inttypes_h_defines_formats=no
486   ])
487 if test "$ac_ethereal_inttypes_h_defines_formats" = yes; then
488   AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if <inttypes.h> defines PRI[doxu]64 macros])
489 else
490   AC_ETHEREAL_CHECK_64BIT_FORMAT(ll,
491     [
492       AC_ETHEREAL_CHECK_64BIT_FORMAT(L,
493         [
494           AC_ETHEREAL_CHECK_64BIT_FORMAT(q,
495             [
496               AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
497             ])
498         ])
499     ])
500 fi
501
502 AC_SUBST(ethereal_bin)
503 AC_SUBST(ethereal_man)
504
505 rdps_bin="rdps\$(EXEEXT)"
506 AC_SUBST(rdps_bin)
507
508
509 # Enable/disable tethereal
510
511 AC_ARG_ENABLE(tethereal,
512 [  --enable-tethereal      build tethereal.  [default=yes]],tethereal=$enableval,enable_tethereal=yes)
513
514 if test "x$enable_tethereal" = "xyes" ; then
515         tethereal_bin="tethereal\$(EXEEXT)"
516         tethereal_man="tethereal.1"
517         etherealfilter_man="ethereal-filter.4"
518 else
519         tethereal_bin=""
520         tethereal_man=""
521 fi
522 AC_SUBST(tethereal_bin)
523 AC_SUBST(tethereal_man)
524 AC_SUBST(etherealfilter_man)
525
526
527
528 # Enable/disable editcap
529
530 AC_ARG_ENABLE(editcap,
531 [  --enable-editcap        build editcap.  [default=yes]],enable_editcap=$enableval,enable_editcap=yes)
532
533 if test "x$enable_editcap" = "xyes" ; then
534         editcap_bin="editcap\$(EXEEXT)"
535         editcap_man="editcap.1"
536 else
537         editcap_bin=""
538         editcap_man=""
539 fi
540 AC_SUBST(editcap_bin)
541 AC_SUBST(editcap_man)
542
543
544 # Enable/disable capinfos
545
546 AC_ARG_ENABLE(capinfos,
547 [  --enable-capinfos       build capinfos.  [default=yes]],enable_capinfos=$enableval,enable_capinfos=yes)
548
549 if test "x$enable_capinfos" = "xyes" ; then
550         capinfos_bin="capinfos\$(EXEEXT)"
551         capinfos_man="capinfos.1"
552 else
553         capinfos_bin=""
554         capinfos_man=""
555 fi
556 AC_SUBST(capinfos_bin)
557 AC_SUBST(capinfos_man)
558
559
560 # Enable/disable mergecap
561
562 AC_ARG_ENABLE(mergecap,
563 [  --enable-mergecap       build mergecap.  [default=yes]],enable_mergecap=$enableval,enable_mergecap=yes)
564
565 if test "x$enable_mergecap" = "xyes" ; then
566         mergecap_bin="mergecap\$(EXEEXT)"
567         mergecap_man="mergecap.1"
568 else
569         mergecap_bin=""
570         mergecap_man=""
571 fi
572 AC_SUBST(mergecap_bin)
573 AC_SUBST(mergecap_man)
574
575
576 # Enable/disable text2pcap
577
578 AC_ARG_ENABLE(text2pcap,
579 [  --enable-text2pcap      build text2pcap.  [default=yes]],text2pcap=$enableval,enable_text2pcap=yes)
580
581 if test "x$enable_text2pcap" = "xyes" ; then
582         text2pcap_bin="text2pcap\$(EXEEXT)"
583         text2pcap_man="text2pcap.1"
584 else
585         text2pcap_bin=""
586         text2pcap_man=""
587 fi
588 AC_SUBST(text2pcap_bin)
589 AC_SUBST(text2pcap_man)
590
591 # Enable/disable idl2eth
592
593 AC_ARG_ENABLE(idl2eth,
594 [  --enable-idl2eth        build idl2eth.  [default=yes]],enable_idl2eth=$enableval,enable_idl2eth=yes)
595
596 if test "x$enable_idl2eth" = "xyes" ; then
597         idl2eth_bin="idl2eth"
598         idl2eth_man="idl2eth.1"
599 else
600         idl2eth_bin=""
601         idl2eth_man=""
602 fi
603 AC_SUBST(idl2eth_bin)
604 AC_SUBST(idl2eth_man)
605
606
607 # Enable/disable dftest
608
609 AC_ARG_ENABLE(dftest,
610 [  --enable-dftest         build dftest.  [default=yes]],enable_dftest=$enableval,enable_dftest=yes)
611
612 if test "x$enable_dftest" = "xyes" ; then
613         dftest_bin="dftest\$(EXEEXT)"
614 else
615         dftest_bin=""
616 fi
617 AC_SUBST(dftest_bin)
618
619
620 # Enable/disable randpkt
621
622 AC_ARG_ENABLE(randpkt,
623 [  --enable-randpkt        build randpkt.  [default=yes]],enable_randpkt=$enableval,enable_randpkt=yes)
624
625 if test "x$enable_randpkt" = "xyes" ; then
626         randpkt_bin="randpkt\$(EXEEXT)"
627 else
628         randpkt_bin=""
629 fi
630 AC_SUBST(randpkt_bin)
631
632
633 dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
634 dnl "gethostbyname()".
635 AC_ETHEREAL_GETHOSTBY_LIB_CHECK
636
637 dnl Checks for "connect()", used as a proxy for "socket()" - and
638 dnl "-lsocket", if we need it to get "connect()".
639 AC_ETHEREAL_SOCKET_LIB_CHECK
640
641 dnl pcap check
642 AC_MSG_CHECKING(whether to use libpcap for packet capture)
643
644 AC_ARG_WITH(pcap,
645 [  --with-pcap[[=DIR]]       use libpcap for packet capturing.  [[default=yes]]],
646 [
647         if test $withval = no
648         then
649                 want_pcap=no
650         elif test $withval = yes
651         then
652                 want_pcap=yes
653         else
654                 want_pcap=yes
655                 pcap_dir=$withval
656         fi
657 ],[
658         want_pcap=yes
659         pcap_dir=
660 ])
661 if test "x$want_pcap" = "xno" ; then
662         AC_MSG_RESULT(no)
663 else
664         AC_MSG_RESULT(yes)
665         AC_ETHEREAL_PCAP_CHECK
666 fi
667
668 dnl zlib check
669 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
670
671 AC_ARG_WITH(zlib,
672 [  --with-zlib[[=DIR]]       use zlib (located in directory DIR, if supplied) to read compressed data.  [[default=yes, if available]]],
673 [
674         if test $withval = no
675         then
676                 want_zlib=no
677         elif test $withval = yes
678         then
679                 want_zlib=yes
680         else
681                 want_zlib=yes
682                 zlib_dir=$withval
683         fi
684 ],[
685         #
686         # Use zlib if it's present, otherwise don't.
687         #
688         want_zlib=ifavailable
689         zlib_dir=
690 ])
691 if test "x$want_zlib" = "xno" ; then
692         AC_MSG_RESULT(no)
693 else
694         AC_MSG_RESULT(yes)
695         AC_ETHEREAL_ZLIB_CHECK
696         if test "x$want_zlib" = "xno" ; then
697                 AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
698         fi
699 fi
700
701
702 dnl pcre check
703 AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
704
705 AC_ARG_WITH(pcre,
706 [  --with-pcre[[=DIR]]       use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions.  [[default=yes, if available]]],
707 [
708         if test $withval = no
709         then
710                 want_pcre=no
711         elif test $withval = yes
712         then
713                 want_pcre=yes
714         else
715                 want_pcre=yes
716                 pcre_dir=$withval
717         fi
718 ],[
719         #
720         # Use libpcre if it's present, otherwise don't.
721         #
722         want_pcre=ifavailable
723         pcre_dir=
724 ])
725 if test "x$want_pcre" = "xno" ; then
726         AC_MSG_RESULT(no)
727 else
728         AC_MSG_RESULT(yes)
729         AC_ETHEREAL_LIBPCRE_CHECK
730         if test "x$want_pcre" = "xno" ; then
731                 AC_MSG_RESULT(libpcre not found - disabling support for perl compatible regular expressions in dfilters)
732         fi
733 fi
734
735
736 dnl ipv6 check
737 AC_ARG_ENABLE(ipv6,
738 [  --enable-ipv6           use ipv6 name resolution, if available.  [default=yes]],enable_ipv6=$enableval,enable_ipv6=yes)
739
740 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
741 if test "x$enable_ipv6" = "xno" ; then
742         AC_MSG_RESULT(no)
743 else
744         AC_MSG_RESULT(yes)
745         AC_ETHEREAL_IPV6_STACK
746 fi
747
748
749 dnl Check if ethereal should be installed setuid
750 AC_ARG_ENABLE(setuid-install,
751 [  --enable-setuid-install install ethereal as setuid. DANGEROUS!!! [default=no]],enable_setuid_install=$enableval,enable_setuid_install=no)
752
753 AC_MSG_CHECKING(whether to install ethereal setuid)
754 if test "x$enable_setuid_install" = "xno" ; then
755         AC_MSG_RESULT(no)
756 else
757         AC_MSG_RESULT(yes)
758 fi
759
760 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
761
762 dnl Checks for header files.
763 AC_HEADER_STDC
764 AC_CHECK_HEADERS(direct.h dirent.h fcntl.h netdb.h stdarg.h stddef.h unistd.h)
765 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)
766 AC_CHECK_HEADERS(netinet/in.h)
767 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
768 AC_CHECK_HEADERS(iconv.h)
769
770 dnl SSL Check
771 SSL_LIBS=''
772 AC_MSG_CHECKING(whether to use SSL library)
773
774 AC_ARG_WITH(ssl,
775 [  --with-ssl[[=DIR]]        use SSL crypto library (located in directory DIR, if supplied).   [[default=no]]],
776 [
777 if test "x$withval" = "xno";  then
778         want_ssl=no
779 elif test "x$withval" = "xyes"; then
780         want_ssl=yes
781 elif test -d "$withval"; then
782         want_ssl=yes
783         AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
784 fi
785 ],[
786         want_ssl=no
787 ])
788 if test "x$want_ssl" = "xyes"; then
789         AC_MSG_RESULT(yes)
790         AC_CHECK_LIB(crypto,EVP_md5,
791             [
792                 SSL_LIBS=-lcrypto
793             ],
794             [
795                 AC_MSG_ERROR([SSL crypto library was requested, but is not available])
796             ])
797 else
798         AC_MSG_RESULT(no)
799 fi
800 AC_SUBST(SSL_LIBS)
801
802 dnl UCD SNMP/Net-SNMP Check
803 SNMP_LIBS=''
804
805 AC_ARG_WITH(net-snmp,
806 [  --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]]],
807 [
808         if test $withval = no
809         then
810                 want_netsnmp=no
811         elif test $withval = yes
812         then
813                 want_netsnmp=yes
814         else
815                 want_netsnmp=yes
816                 netsnmpconfig="$withval"
817         fi
818 ],[
819         #
820         # Set "want_netsnmp" to "ifavailable" to make the default "use it
821         # if you find it, otherwise don't".
822         #
823         want_netsnmp=ifavailable
824 ])
825
826 AC_ARG_WITH(ucd-snmp,
827 [  --with-ucd-snmp[[=DIR]]   use UCD SNMP client library (located in directory DIR, if supplied).  [[default=yes, if available]]],
828 [
829         if test $withval = no
830         then
831                 want_ucdsnmp=no
832         elif test $withval = yes
833         then
834                 want_ucdsnmp=yes
835         else
836                 want_ucdsnmp=yes
837                 ucdsnmp_dir=$withval
838         fi
839 ],[
840         #
841         # Set "want_ucdsnmp" to "ifavailable" to make the default "use it
842         # if you find it, otherwise don't".
843         #
844         want_ucdsnmp=ifavailable
845         ucdsnmp_dir=
846 ])
847
848 #
849 # Try Net-SNMP first.
850 #
851 AC_MSG_CHECKING(whether to use Net-SNMP library)
852 if test "x$want_netsnmp" = "xno" ; then
853         AC_MSG_RESULT(no)
854 else
855         if test "x$want_netsnmp" = "xifavailable" ; then
856                 AC_MSG_RESULT([yes, if available])
857         else
858                 AC_MSG_RESULT(yes)
859         fi
860         AC_ETHEREAL_NETSNMP_CHECK
861 fi
862
863 #
864 # If that didn't find Net-SNMP, try UCD SNMP.
865 #
866 if test "x$have_net_snmp" != "xyes" ; then
867         AC_MSG_CHECKING(whether to use UCD SNMP library)
868         if test "x$want_ucdsnmp" = "xno" ; then
869                 AC_MSG_RESULT(no)
870         else
871                 if test "x$want_ucdsnmp" = "xifavailable" ; then
872                         AC_MSG_RESULT([yes, if available])
873                 else
874                         AC_MSG_RESULT(yes)
875                 fi
876                 AC_ETHEREAL_UCDSNMP_CHECK
877         fi
878 fi
879
880 if test "x$have_net_snmp" = "xyes" || test "x$have_ucd_snmp" = "xyes"; then
881         AC_DEFINE(HAVE_SOME_SNMP, 1, [Define to 1 if some SNMP support is to be used])
882 fi
883
884 AC_SUBST(SNMP_LIBS)
885
886
887 dnl kerberos check
888 AC_MSG_CHECKING(whether to use kerberos)
889
890 AC_ARG_WITH(krb5,
891 [  --with-krb5[[=DIR]]       use kerberos (located in directory DIR, if supplied) to use in kerberos dissection  [[default=yes]]],
892 [
893         if test $withval = no
894         then
895                 want_krb5=no
896         elif test $withval = yes
897         then
898                 want_krb5=yes
899         else
900                 want_krb5=yes
901                 krb5_dir=$withval
902         fi
903 ],[
904         #
905         # Use kerberos if specified, otherwise don't.
906         #
907         want_krb5=ifavailable
908         krb5_dir=
909 ])
910 if test "x$want_krb5" = "xno" ; then
911         AC_MSG_RESULT(no)
912 else
913         AC_MSG_RESULT(yes)
914         AC_ETHEREAL_KRB5_CHECK
915 fi
916
917
918 dnl ADNS Check
919 ADNS_LIBS=''
920 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
921
922 AC_ARG_WITH(adns,
923 [  --with-adns[[=DIR]]       use GNU ADNS (located in directory DIR, if supplied).   [[default=yes, if present]]],
924 [
925 if   test "x$withval" = "xno";  then
926         want_adns=no
927 elif test "x$withval" = "xyes"; then
928         want_adns=yes
929 elif test -d "$withval"; then
930         want_adns=yes
931         AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
932 fi
933 ])
934 if test "x$with_adns" = "xno" ; then
935         AC_MSG_RESULT(no)
936 else
937         AC_MSG_RESULT(yes)
938         AC_ETHEREAL_ADNS_CHECK
939 fi
940 AC_SUBST(ADNS_LIBS)
941
942 #
943 # Define ETH_VAR_IMPORT appropriately for declarations of external
944 # variables exported from dynamically-linked libraries.
945 #
946 AC_DEFINE(ETH_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
947
948 dnl Checks for typedefs, structures, and compiler characteristics.
949 # AC_C_CONST
950
951 # We need to know whether "struct sockaddr" has an "sa_len" member
952 # for get_interface_list().
953
954 AC_ETHEREAL_STRUCT_SA_LEN
955
956 # We must know our byte order
957 AC_C_BIGENDIAN
958
959 # Checks whether "-traditional" is needed when using "ioctl".
960 # XXX - do we need this?
961 AC_PROG_GCC_TRADITIONAL
962
963 # If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
964 # then this won't work.
965 SNPRINTF_C=""
966 SNPRINTF_O=""
967 AC_CHECK_FUNC(snprintf, SNPRINTF_O="",
968   [SNPRINTF_O="snprintf.o"
969    AC_DEFINE(NEED_SNPRINTF_H, 1, [Define if sprintf.h needs to be included])
970 ])
971 if test "$ac_cv_func_snprintf" = no ; then
972   SNPRINTF_C="snprintf.c"
973   SNPRINTF_O="snprintf.o"
974 fi
975 AC_SUBST(SNPRINTF_C)
976 AC_SUBST(SNPRINTF_O)
977
978 AC_CHECK_FUNC(strerror, STRERROR_O="",
979   [STRERROR_O="strerror.o"
980    AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
981 ])
982 if test "$ac_cv_func_strerror" = no ; then
983   STRERROR_C="strerror.c"
984   STRERROR_O="strerror.o"
985 fi
986 AC_SUBST(STRERROR_C)
987 AC_SUBST(STRERROR_O)
988
989 AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
990   STRCASECMP_O="strcasecmp.o")
991 if test "$ac_cv_func_strcasecmp" = no ; then
992   STRCASECMP_C="strcasecmp.c"
993   STRCASECMP_O="strcasecmp.o"
994 fi
995 AC_SUBST(STRCASECMP_C)
996 AC_SUBST(STRCASECMP_O)
997
998 AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
999   STRNCASECMP_O="strncasecmp.o")
1000 if test "$ac_cv_func_strncasecmp" = no ; then
1001   STRNCASECMP_C="strncasecmp.c"
1002   STRNCASECMP_O="strncasecmp.o"
1003 fi
1004 AC_SUBST(STRNCASECMP_C)
1005 AC_SUBST(STRNCASECMP_O)
1006
1007 AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
1008   MKSTEMP_O="mkstemp.o")
1009 if test "$ac_cv_func_mkstemp" = no ; then
1010   MKSTEMP_C="mkstemp.c"
1011   MKSTEMP_O="mkstemp.o"
1012 fi
1013 AC_SUBST(MKSTEMP_C)
1014 AC_SUBST(MKSTEMP_O)
1015
1016 ac_save_LIBS="$LIBS"
1017 LIBS="$GLIB_LIBS $LIBS"
1018 G_ASCII_STRTOULL_C=""
1019 G_ASCII_STRTOULL_O=""
1020 G_ASCII_STRTOULL_LO=""
1021 AC_CHECK_FUNC(g_ascii_strtoull,
1022   [G_ASCII_STRTOULL_O=""
1023    G_ASCII_STRTOULL_LO=""],
1024   [G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
1025    G_ASCII_STRTOULL_LO="g_ascii_strtoull.lo"
1026    AC_DEFINE(NEED_G_ASCII_STRTOULL_H, 1, [Define if g_ascii_strtoull.h needs to be included])
1027 ])
1028 LIBS="$ac_save_LIBS"
1029 if test "$ac_cv_func_g_ascii_strtoull" = no ; then
1030   G_ASCII_STRTOULL_C="g_ascii_strtoull.c"
1031   G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
1032   G_ASCII_STRTOULL_LO="g_ascii_strtoull.lo"
1033 fi
1034 AC_SUBST(G_ASCII_STRTOULL_C)
1035 AC_SUBST(G_ASCII_STRTOULL_O)
1036 AC_SUBST(G_ASCII_STRTOULL_LO)
1037
1038 AC_CHECK_FUNC(inet_aton,
1039   [INET_ATON_O=""
1040    INET_ATON_LO=""],
1041   [INET_ATON_O="inet_aton.o"
1042    INET_ATON_LO="inet_aton.lo"
1043 ])
1044 if test "$ac_cv_func_inet_aton" = no ; then
1045   INET_ATON_C="inet_aton.c"
1046   INET_ATON_O="inet_aton.o"
1047   INET_ATON_LO="inet_aton.lo"
1048   AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
1049 fi
1050 AC_SUBST(INET_ATON_C)
1051 AC_SUBST(INET_ATON_O)
1052 AC_SUBST(INET_ATON_LO)
1053
1054 AC_SEARCH_LIBS(inet_pton, [socket nsl], [
1055   dnl check for pre-BIND82 inet_pton() bug.
1056   AC_MSG_CHECKING(for broken inet_pton)
1057   AC_TRY_RUN([#include <sys/types.h>
1058 #include <sys/socket.h>
1059 #include <netinet/in.h>
1060 #include <arpa/inet.h>
1061 int main()
1062 {
1063 #ifdef AF_INET6
1064   char buf[16];
1065   /* this should return 0 (error) */
1066   return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
1067 #else
1068   return 1;
1069 #endif
1070 }], [AC_MSG_RESULT(ok);
1071 have_inet_pton=yes], [AC_MSG_RESULT(broken);
1072 have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
1073 have_inet_pton=no])],
1074 have_inet_pton=no)
1075 if test "$have_inet_pton" = no; then
1076   INET_PTON_C="inet_pton.c"
1077   INET_PTON_O="inet_pton.o"
1078   INET_PTON_LO="inet_pton.lo"
1079 else
1080   INET_PTON_C=""
1081   INET_PTON_O=""
1082   INET_PTON_LO=""
1083 fi
1084 AC_SUBST(INET_PTON_C)
1085 AC_SUBST(INET_PTON_O)
1086 AC_SUBST(INET_PTON_LO)
1087
1088 AC_SEARCH_LIBS(inet_ntop, [socket nsl], [
1089   AC_MSG_CHECKING([for inet_ntop prototype])
1090   AC_TRY_COMPILE([#include <stdio.h>
1091 #include <sys/types.h>
1092 #include <sys/socket.h>
1093 #include <netinet/in.h>
1094 #include <arpa/inet.h>
1095
1096 extern const char *inet_ntop(int, const void *, char *, size_t);],, [
1097     AC_MSG_RESULT(yes)
1098     AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1099     [Define if inet_ntop() prototype exists])], [
1100     AC_TRY_COMPILE([#include <stdio.h>
1101 #include <sys/types.h>
1102 #include <sys/socket.h>
1103 #include <netinet/in.h>
1104 #include <arpa/inet.h>
1105
1106 extern const char *inet_ntop(int, const void *, char *, socklen_t);],, [
1107       AC_MSG_RESULT(yes)
1108       AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
1109       [Define if inet_ntop() prototype exists])], [
1110       AC_MSG_RESULT(no)])])
1111   INET_NTOP_O=""
1112   INET_NTOP_LO=""], [
1113   INET_NTOP_C="inet_ntop.c"
1114   INET_NTOP_O="inet_ntop.o"
1115   INET_NTOP_LO="inet_ntop.lo"
1116   AC_DEFINE(NEED_INET_V6DEFS_H, 1,
1117   [Define if inet/v6defs.h needs to be included])])
1118 AC_SUBST(INET_NTOP_C)
1119 AC_SUBST(INET_NTOP_O)
1120 AC_SUBST(INET_NTOP_LO)
1121
1122 AC_CHECK_FUNC(strptime, STRPTIME_O="",
1123   [STRPTIME_O="strptime.o"
1124    AC_DEFINE(NEED_STRPTIME_H, 1, [Define if strptime.h needs to be included])
1125 ])
1126 if test "$ac_cv_func_strptime" = no ; then
1127   STRPTIME_C="strptime.c"
1128   STRPTIME_O="strptime.o"
1129 fi
1130 AC_SUBST(STRPTIME_C)
1131 AC_SUBST(STRPTIME_O)
1132
1133 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
1134
1135 dnl blank for now, but will be used in future
1136 AC_SUBST(ethereal_SUBDIRS)
1137
1138 dnl
1139 dnl check whether plugins should be enabled and, if they should be,
1140 dnl check for plugins directory - stolen from Amanda's configure.in
1141 dnl
1142 plugindir="$libdir/ethereal/plugins/$VERSION"
1143 AC_ARG_WITH(plugins,
1144 [  --with-plugins[[=DIR]]    support plugins (installed in DIR, if supplied).],
1145 [
1146   case "$withval" in
1147   "" | y | ye | yes )
1148     if test x$have_plugins = xno
1149     then
1150       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1151     fi
1152     ;;
1153   n | no)
1154     have_plugins=no
1155     ;;
1156   *)
1157     if test x$have_plugins = xno
1158     then
1159       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
1160     fi
1161     plugindir="$withval"
1162     ;;
1163   esac
1164 ])
1165
1166 AM_CONDITIONAL(HAVE_PLUGINS, test x$have_plugins = xyes)
1167 if test x$have_plugins = xyes
1168 then
1169   AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
1170   plugindir=`(
1171     test "x$prefix" = xNONE && prefix=$ac_default_prefix
1172     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1173     eval echo "$plugindir"
1174   )`
1175   AC_DEFINE_UNQUOTED(PLUGIN_DIR, "$plugindir", [Plugin installation directory])
1176 else
1177   AC_DEFINE(PLUGIN_DIR, NULL, [Plugin installation directory])
1178 fi
1179 AC_SUBST(plugindir)
1180
1181 #
1182 # The plugin dissectors reside in ./plugins/PROTO/
1183 #
1184 PLUGIN_LIBS="-L../../epan -lethereal $GLIB_LIBS"
1185 AC_SUBST(PLUGIN_LIBS)
1186
1187 dnl libtool defs
1188 #
1189 # Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
1190 # (autoconf?  automake?  libtool?) - with the newer version(s), it's
1191 # just an alias for AC_PROG_LIBTOOL, which is called earlier.
1192 #
1193 # With older version(s) of those tool(s), however, it's not just an
1194 # alias, and the configure scripts don't work without it.
1195 #
1196 AM_PROG_LIBTOOL
1197 AC_SUBST(LIBTOOL_DEPS)
1198
1199 AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
1200 if test x$enable_static = xyes -a x$have_plugins = xyes
1201 then
1202   AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Ethereal])
1203 fi
1204 AC_SUBST(ENABLE_STATIC)
1205
1206 dnl Save the cacheable configure results to config.cache before recursing
1207 AC_CACHE_SAVE
1208
1209 AM_CONFIG_HEADER(config.h)
1210 AC_CONFIG_SUBDIRS(wiretap)
1211 AC_OUTPUT(
1212   Makefile
1213   doxygen.cfg
1214   doc/Makefile
1215   epan/Makefile
1216   epan/doxygen.cfg
1217   epan/dfilter/Makefile
1218   epan/dissectors/Makefile
1219   epan/ftypes/Makefile
1220   gtk/Makefile
1221   gtk/doxygen.cfg
1222   help/Makefile
1223   packaging/Makefile
1224   packaging/nsis/Makefile
1225   packaging/rpm/Makefile
1226   packaging/rpm/SPECS/Makefile
1227   packaging/rpm/SPECS/ethereal.spec
1228   packaging/svr4/Makefile
1229   packaging/svr4/checkinstall
1230   packaging/svr4/pkginfo
1231   plugins/Makefile
1232   plugins/acn/Makefile
1233   plugins/agentx/Makefile
1234   plugins/artnet/Makefile
1235   plugins/asn1/Makefile
1236   plugins/ciscosm/Makefile
1237   plugins/docsis/Makefile
1238   plugins/enttec/Makefile
1239   plugins/giop/Makefile
1240   plugins/gryphon/Makefile
1241   plugins/irda/Makefile
1242   plugins/lwres/Makefile
1243   plugins/mate/Makefile
1244   plugins/megaco/Makefile
1245   plugins/mgcp/Makefile
1246   plugins/opsi/Makefile
1247   plugins/pcli/Makefile
1248   plugins/profinet/Makefile
1249   plugins/rdm/Makefile
1250   plugins/rlm/Makefile
1251   plugins/rtnet/Makefile
1252   plugins/rudp/Makefile
1253   plugins/stats_tree/Makefile
1254   plugins/v5ua/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"