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