Bump the version to 0.9.3. Update NEWS to be current to
[obnox/wireshark/wip.git] / configure.in
1 # $Id: configure.in,v 1.161 2002/03/29 03:33:57 gerald Exp $
2 dnl
3 dnl Process this file with autoconf 2.13 or later to produce a
4 dnl configure script; 2.12 doesn't generate a "configure" script that
5 dnl defines SHELL, and "Makefile.in" has
6 dnl
7 dnl     SHELL = @SHELL@
8 dnl
9 dnl which requires it to be defined - and there may be other problems
10 dnl with pre-2.13 "autoconf" as well.
11 dnl
12 AC_INIT(etypes.h)
13
14 AC_PREREQ(2.13)
15
16 AM_INIT_AUTOMAKE(ethereal, 0.9.3)
17
18 dnl Check for CPU / vendor / OS
19 AC_CANONICAL_HOST
20
21 dnl Checks for programs.
22 AC_PROG_CC
23 AC_PROG_CPP
24 AC_PROG_RANLIB
25 AC_PROG_YACC
26 AM_PROG_LEX
27 AC_PATH_PROG(PERL, perl)
28 AC_PATH_PROG(POD2MAN, pod2man)
29 AC_PATH_PROG(LEX, flex)
30 AC_PATH_PROG(PYTHON, python)
31
32 AC_SUBST(PERL)
33 AC_SUBST(LEX)
34 AC_SUBST(PYTHON)
35
36 # Check for packaging utilities
37 # For now, we check to see if the various packaging utilites are in our
38 # path.  I'm too lazy to write code to go hunt for them.  -  Gerald
39 AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no")
40 AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no")
41 AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no")
42
43 if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \
44      -a x$HAVE_PKGTRANS = xyes ; then
45   HAVE_SVR4_PACKAGING=yes
46 else
47   HAVE_SVR4_PACKAGING=no
48 fi
49 AC_SUBST(HAVE_SVR4_PACKAGING)
50
51 AC_ETHEREAL_RPM_CHECK
52 AC_SUBST(HAVE_RPM)
53
54 #
55 # If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add
56 # '-D_U_="__attribute__((unused))"' as well, for future use when we
57 # remove '-Wno-unused'.
58 #
59 # Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
60 # argument will compile with non-GCC compilers.
61 #
62 AC_MSG_CHECKING(to see if we can add '-Wall -W -Wno-unused' to CFLAGS)
63 if test x$GCC != x ; then
64   CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS"
65   AC_MSG_RESULT(yes)
66 else
67   CFLAGS="-D_U_=\"\" $CFLAGS"
68   AC_MSG_RESULT(no)
69 fi
70
71 #
72 # Add any platform-specific compiler flags needed.
73 #
74 AC_MSG_CHECKING(for platform-specific compiler flags)
75 if test "x$GCC" = x
76 then
77         #
78         # Not GCC - assume it's the vendor's compiler.
79         #
80         case "$host_os" in
81         hpux*)
82                 #
83                 # HP's ANSI C compiler; flags suggested by Jost Martin.
84                 # "-Ae" for ANSI C plus extensions such as "long long".
85                 # "+O2", for optimization.  XXX - works with "-g"?
86                 #
87                 CFLAGS="-Ae +O2 $CFLAGS"
88                 AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
89                 ;;
90         darwin*)
91                 #
92                 # It may be called "cc", but it's really a GCC derivative
93                 # with a problematic special precompiler and precompiled
94                 # headers; turn off the special precompiler, as some
95                 # apparently-legal code won't compile with its precompiled
96                 # headers.
97                 #
98                 CFLAGS="-no-cpp-precomp $CFLAGS"
99                 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
100                 ;;
101         *)
102                 AC_MSG_RESULT(none needed)
103                 ;;
104         esac
105 else
106         case "$host_os" in
107         solaris*)
108                 # the X11 headers don't automatically include prototype info
109                 # and a lot don't include the return type
110                 CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15"
111                 AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
112                 ;;
113         darwin*)
114                 #
115                 # See comments above about Apple's lovely C compiler.
116                 #
117                 CFLAGS="-no-cpp-precomp $CFLAGS"
118                 AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
119                 ;;
120         *)
121                 AC_MSG_RESULT(none needed)
122                 ;;
123         esac
124 fi
125
126 CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap"
127 CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap"
128
129 dnl Look in /usr/local for header files and libraries ?
130 AC_ARG_ENABLE(usr-local,
131 [  --enable-usr-local      look for headers and libs in /usr/local tree.  [default=yes]],enable_usr_local=$enableval,enable_usr_local=yes)
132
133 AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
134 if test "x$enable_usr_local" = "xyes" ; then
135         AC_MSG_RESULT(yes)
136         #
137         # Arrange that we search for header files in the source directory
138         # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
139         # as various packages we use ("libpcap", "zlib", an SNMP library)
140         # may have been installed under "/usr/local/include".
141         #
142         CFLAGS="$CFLAGS -I/usr/local/include"
143         CPPFLAGS="$CPPFLAGS -I/usr/local/include"
144
145         #
146         # Arrange that we search for libraries in "/usr/local/lib".
147         #
148         AC_ETHEREAL_ADD_DASH_L(LDFLAGS, /usr/local/lib)
149 else
150         AC_MSG_RESULT(no)
151 fi
152
153 # Create DATAFILE_DIR #define for config.h
154 DATAFILE_DIR=$sysconfdir
155 DATAFILE_DIR=`(
156     test "x$prefix" = xNONE && prefix=$ac_default_prefix
157     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
158     eval echo "$DATAFILE_DIR"
159 )`
160 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$DATAFILE_DIR")
161 AC_SUBST(DATAFILE_DIR)
162
163 #
164 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
165 # link directory.
166 #
167 case "$host_os" in
168   solaris*)
169     AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
170     if test x$LD_LIBRARY_PATH != x ; then
171       LIBS="$LIBS -R$LD_LIBRARY_PATH"
172       AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
173     else
174       AC_MSG_RESULT(no -- this may be a problem in a few seconds)
175     fi
176   ;;
177 esac
178
179 #
180 # Check for versions of "sed" inadequate to handle, in libtool, a list
181 # of object files as large as the list in Ethereal.
182 #
183 # On Solaris, we check for "/bin/sed", "/usr/bin/sed", and "/usr/ucb/sed",
184 # as both "/usr/bin/sed" (which is also "/bin/sed", as "/bin" is just a
185 # symlink to "/usr/bin", but people may have "/bin" before "/usr/bin" in
186 # their search path) and "/usr/ucb/sed" are inadequate; "/usr/xpg4/bin/sed"
187 # is the only "sed" that comes with Solaris that can handle Ethereal.
188 #
189 # Add any checks here that are necessary for other OSes.
190 #
191 AC_ETHEREAL_GNU_SED_CHECK
192 if test "$HAVE_GNU_SED" = no ; then
193         case "$host_os" in
194         solaris*)
195                 AC_MSG_CHECKING(whether one of /usr/bin/sed or /bin/sed or /usr/ucb/sed will be used)
196                 case `which sed` in
197                         /bin/sed|/usr/bin/sed|/usr/ucb/sed)
198                         AC_MSG_RESULT(yes)              
199                         AC_MSG_ERROR([change your path to search /usr/xpg4/bin or directory containing GNU sed before /usr/bin (and /bin and /usr/ucb)])
200                         ;;
201
202                         *)
203                         AC_MSG_RESULT(no)
204                         ;;
205                 esac
206                 ;;
207
208         *)
209                 :
210                 ;;
211         esac
212 fi
213
214 # Enable/disable tethereal
215
216 GTK_OK=yes
217
218 AC_ARG_ENABLE(ethereal,
219 [  --enable-ethereal       build GTK+-based ethereal.  [default=yes]],,enable_ethereal=yes)
220
221 # GTK checks
222 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
223 # programs to be built with GTK+.
224 #
225 if test "x$enable_ethereal" = "xyes" ; then
226         AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no )
227 fi
228
229 # GLib checks
230 # This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
231 # GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
232 # However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
233 # set when generating the Makefile, so we can make programs that require
234 # only GLib link with @GLIB_LIBS@ and make programs that require GTK+
235 # link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
236 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
237 # programs to be built with GLib.
238 #
239 if test "$GTK_OK" = "yes" -a "x$enable_ethereal" = "xyes" ; then
240         ethereal_bin="ethereal"
241         ethereal_man="ethereal.1"
242         ethereal_SUBDIRS="gtk"
243
244         # Ignore GLIB_CFLAGS
245         AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
246 else
247         enable_ethereal="no"
248         ethereal_bin=""
249         ethereal_man=""
250         # Honor GLIB_CFLAGS
251         AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
252 fi
253
254 #
255 # Check whether GLib modules are supported, to determine whether we
256 # can support plugins.
257 #
258 AC_MSG_CHECKING(whether GLib supports loadable modules)
259 ac_save_CFLAGS="$CFLAGS"
260 ac_save_LIBS="$LIBS"
261 CFLAGS="$CFLAGS $GLIB_CFLAGS"
262 LIBS="$GLIB_LIBS $LIBS"
263 AC_TRY_RUN([
264 #include <glib.h>
265 #include <gmodule.h>
266 #include <stdio.h>
267 #include <stdlib.h>
268
269 int 
270 main ()
271 {
272   if (g_module_supported())
273     return 0;   /* success */
274   else
275     return 1;   /* failure */
276 }
277 ], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
278    [echo $ac_n "cross compiling; assumed OK... $ac_c"])
279 CFLAGS="$ac_save_CFLAGS"
280 LIBS="$ac_save_LIBS"
281 if test "$ac_cv_glib_supports_modules" = yes ; then
282   AC_MSG_RESULT(yes)
283   have_plugins=yes
284 else
285   AC_MSG_RESULT(no)
286   have_plugins=no
287 fi
288
289
290 AC_SUBST(ethereal_bin)
291 AC_SUBST(ethereal_man)
292
293
294
295 # Enable/disable tethereal
296
297 AC_ARG_ENABLE(tethereal,
298 [  --enable-tethereal      build tethereal.  [default=yes]],,enable_tethereal=yes)
299
300 if test "x$enable_tethereal" = "xyes" ; then
301         tethereal_bin="tethereal"
302         tethereal_man="tethereal.1"
303 else
304         tethereal_bin=""
305         tethereal_man=""
306 fi
307 AC_SUBST(tethereal_bin)
308 AC_SUBST(tethereal_man)
309
310
311
312 # Enable/disable editcap
313
314 AC_ARG_ENABLE(editcap,
315 [  --enable-editcap        build editcap.  [default=yes]],,enable_editcap=yes)
316
317 if test "x$enable_editcap" = "xyes" ; then
318         editcap_bin="editcap"
319         editcap_man="editcap.1"
320 else
321         editcap_bin=""
322         editcap_man=""
323 fi
324 AC_SUBST(editcap_bin)
325 AC_SUBST(editcap_man)
326
327
328 # Enable/disable mergecap
329
330 AC_ARG_ENABLE(mergecap,
331 [  --enable-mergecap       build mergecap.  [default=yes]],,enable_mergecap=yes)
332
333 if test "x$enable_mergecap" = "xyes" ; then
334         mergecap_bin="mergecap"
335         mergecap_man="mergecap.1"
336 else
337         mergecap_bin=""
338         mergecap_man=""
339 fi
340 AC_SUBST(mergecap_bin)
341 AC_SUBST(mergecap_man)
342
343
344 # Enable/disable text2pcap
345
346 AC_ARG_ENABLE(text2pcap,
347 [  --enable-text2pcap      build text2pcap.  [default=yes]],,enable_text2pcap=yes)
348
349 if test "x$enable_text2pcap" = "xyes" ; then
350         text2pcap_bin="text2pcap"
351         text2pcap_man="text2pcap.1"
352 else
353         text2pcap_bin=""
354         text2pcap_man=""
355 fi
356 AC_SUBST(text2pcap_bin)
357 AC_SUBST(text2pcap_man)
358
359 # Enable/disable idl2eth
360
361 AC_ARG_ENABLE(idl2eth,
362 [  --enable-idl2eth        build idl2eth.  [default=yes]],,enable_idl2eth=yes)
363
364 if test "x$enable_idl2eth" = "xyes" ; then
365         idl2eth_bin="idl2eth"
366         idl2eth_man="idl2eth.1"
367 else
368         idl2eth_bin=""
369         idl2eth_man=""
370 fi
371 AC_SUBST(idl2eth_bin)
372 AC_SUBST(idl2eth_man)
373
374
375 # Enable/disable dftest
376
377 AC_ARG_ENABLE(dftest,
378 [  --enable-dftest         build dftest.  [default=no]],,enable_dftest=no)
379
380 if test "x$enable_dftest" = "xyes" ; then
381         dftest_bin="dftest"
382 else
383         dftest_bin=""
384 fi
385 AC_SUBST(dftest_bin)
386
387
388 # Enable/disable randpkt
389
390 AC_ARG_ENABLE(randpkt,
391 [  --enable-randpkt        build randpkt.  [default=no]],,enable_randpkt=no)
392
393 if test "x$enable_randpkt" = "xyes" ; then
394         randpkt_bin="randpkt"
395 else
396         randpkt_bin=""
397 fi
398 AC_SUBST(randpkt_bin)
399
400
401 dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
402 dnl "gethostbyname()".
403 AC_ETHEREAL_GETHOSTBY_LIB_CHECK
404
405 dnl Checks for "connect()", used as a proxy for "socket()" - and
406 dnl "-lsocket", if we need it to get "connect()".
407 AC_ETHEREAL_SOCKET_LIB_CHECK
408
409 dnl pcap check
410 AC_MSG_CHECKING(whether to use libpcap for packet capture)
411
412 AC_ARG_WITH(pcap,
413 [  --with-pcap[=DIR]       use libpcap for packet capturing.  [default=yes]],
414 [
415         if test $withval = no
416         then
417                 want_pcap=no
418         elif test $withval = yes
419         then
420                 want_pcap=yes
421         else
422                 want_pcap=yes
423                 pcap_dir=$withval
424         fi
425 ],[
426         want_pcap=yes
427         pcap_dir=
428 ])
429 if test "x$want_pcap" = "xno" ; then
430         AC_MSG_RESULT(no)
431 else
432         AC_MSG_RESULT(yes)
433         AC_ETHEREAL_PCAP_CHECK
434         AC_ETHEREAL_PCAP_VERSION_CHECK
435 fi
436
437 dnl zlib check
438 AC_ARG_ENABLE(zlib,
439 [  --enable-zlib           use zlib to read compressed data.  [default=yes]],,enable_zlib=yes)
440
441 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
442 if test "x$enable_zlib" = "xno" ; then
443         AC_MSG_RESULT(no)
444 else
445         AC_MSG_RESULT(yes)
446         AC_ETHEREAL_ZLIB_CHECK
447         if test "x$enable_zlib" = "xno" ; then
448                 AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
449         fi
450 fi
451
452
453 dnl ipv6 check
454 AC_ARG_ENABLE(ipv6,
455 [  --enable-ipv6           use ipv6 name resolution, if available.  [default=yes]],,enable_ipv6=yes)
456
457 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
458 if test "x$enable_ipv6" = "xno" ; then
459         AC_MSG_RESULT(no)
460 else
461         AC_MSG_RESULT(yes)
462         AC_ETHEREAL_IPV6_STACK
463 fi
464
465
466 dnl Check if ethereal should be installed setuid
467 AC_ARG_ENABLE(setuid-install,
468 [  --enable-setuid-install install ethereal as setuid. DANGEROUS!!! [default=no]],,enable_setuid_install=no)
469
470 AC_MSG_CHECKING(whether to install ethereal setuid)
471 if test "x$enable_setuid_install" = "xno" ; then
472         AC_MSG_RESULT(no)
473 else
474         AC_MSG_RESULT(yes)
475 fi
476
477 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
478
479 dnl Checks for header files.
480 AC_HEADER_STDC
481 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h)
482 AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h sys/socket.h)
483 AC_CHECK_HEADERS(sys/wait.h)
484 AC_CHECK_HEADERS(netinet/in.h)
485 AC_CHECK_HEADERS(stddef.h)
486 AC_CHECK_HEADERS(arpa/inet.h)
487 AC_CHECK_HEADERS(iconv.h)
488
489 dnl SSL Check
490 SSL_LIBS=''
491 AC_MSG_CHECKING(whether to use SSL library if available)
492 if test "x$enable_ssl" = "xno" ; then
493         AC_MSG_RESULT(no)
494 else
495         AC_MSG_RESULT(yes)
496         AC_ETHEREAL_SSL_CHECK
497 fi
498 AC_SUBST(SSL_LIBS)
499
500 dnl UCD SNMP Check
501 SNMP_LIBS=''
502 AC_MSG_CHECKING(whether to use UCD SNMP/NET-SNMP library if available)
503
504 AC_ARG_WITH(ucdsnmp,
505 [  --with-ucdsnmp[=DIR]    use UCD SNMP/NET-SNMP client library (located in directory DIR, if supplied).  [default=yes, if present]],
506 [
507         if test $withval = no
508         then
509                 want_ucdsnmp=no
510         elif test $withval = yes
511         then
512                 want_ucdsnmp=yes
513         else
514                 want_ucdsnmp=yes
515                 ucdsnmp_dir=$withval
516         fi
517 ],[
518         #
519         # For now, we default to *not* using the UCD SNMP library unless
520         # the user explicitly asks for it, as the current release has
521         # buffer-overflow vulnerabilities we can't avoid.
522         #
523         # Set "want_ucdsnmp" to "ifpresent" to make the default "use it
524         # if you find it, otherwise don't".
525         #
526         want_ucdsnmp=no
527         ucdsnmp_dir=
528 ])
529
530 if test "x$want_ucdsnmp" = "xno" ; then
531         AC_MSG_RESULT(no)
532 else
533         AC_MSG_RESULT(yes)
534         AC_ETHEREAL_UCDSNMP_CHECK
535 fi
536 AC_SUBST(SNMP_LIBS)
537
538 dnl Checks for typedefs, structures, and compiler characteristics.
539 # AC_C_CONST
540
541 # We need to know whether "struct sockaddr" has an "sa_len" member
542 # for get_interface_list().
543
544 AC_ETHEREAL_STRUCT_SA_LEN
545
546 # We must know our byte order
547 AC_C_BIGENDIAN
548
549 # Checks whether "-traditional" is needed when using "ioctl".
550 # XXX - do we need this?
551 AC_PROG_GCC_TRADITIONAL
552
553 # If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
554 # then this won't work.
555 SNPRINTF_C=""
556 SNPRINTF_O=""
557 AC_CHECK_FUNC(snprintf, SNPRINTF_O="",
558   SNPRINTF_O="snprintf.o" [AC_DEFINE(NEED_SNPRINTF_H)])
559 if test "$ac_cv_func_snprintf" = no ; then
560   SNPRINTF_C="snprintf.c"
561   SNPRINTF_O="snprintf.o"
562 fi
563 AC_SUBST(SNPRINTF_C)
564 AC_SUBST(SNPRINTF_O)
565
566 AC_CHECK_FUNC(strerror, STRERROR_O="",
567   STRERROR_O="strerror.o" [AC_DEFINE(NEED_STRERROR_H)])
568 if test "$ac_cv_func_strerror" = no ; then
569   STRERROR_C="strerror.c"
570   STRERROR_O="strerror.o"
571 fi
572 AC_SUBST(STRERROR_C)
573 AC_SUBST(STRERROR_O)
574
575 AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
576   STRCASECMP_O="strcasecmp.o")
577 if test "$ac_cv_func_strcasecmp" = no ; then
578   STRCASECMP_C="strcasecmp.c"
579   STRCASECMP_O="strcasecmp.o"
580 fi
581 AC_SUBST(STRCASECMP_C)
582 AC_SUBST(STRCASECMP_O)
583
584 AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
585   STRNCASECMP_O="strncasecmp.o")
586 if test "$ac_cv_func_strncasecmp" = no ; then
587   STRNCASECMP_C="strncasecmp.c"
588   STRNCASECMP_O="strncasecmp.o"
589 fi
590 AC_SUBST(STRNCASECMP_C)
591 AC_SUBST(STRNCASECMP_O)
592
593 AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
594   MKSTEMP_O="mkstemp.o")
595 if test "$ac_cv_func_mkstemp" = no ; then
596   MKSTEMP_C="mkstemp.c"
597   MKSTEMP_O="mkstemp.o"
598 fi
599 AC_SUBST(MKSTEMP_C)
600 AC_SUBST(MKSTEMP_O)
601
602 AC_CHECK_FUNC(strptime, STRPTIME_O="",
603   STRPTIME_O="strptime.o" [AC_DEFINE(NEED_STRPTIME_H)])
604 if test "$ac_cv_func_strptime" = no ; then
605   STRPTIME_C="strptime.c"
606   STRPTIME_O="strptime.o"
607 fi
608 AC_SUBST(STRPTIME_C)
609 AC_SUBST(STRPTIME_O)
610
611 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
612
613 dnl blank for now, but will be used in future
614 AC_SUBST(ethereal_SUBDIRS)
615
616 dnl
617 dnl check whether plugins should be enabled and, if they should be,
618 dnl check for plugins directory - stolen from Amanda's configure.in
619 dnl
620 PLUGIN_DIR="$libdir/ethereal/plugins/$VERSION"
621 AC_ARG_WITH(plugins,
622   [  --with-plugins[=DIR]    support plugins (installed in DIR, if supplied).],
623   [
624   case "$withval" in
625   "" | y | ye | yes )
626     if test x$have_plugins = xno
627     then
628       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
629     fi
630     ;;
631   n | no)
632     have_plugins=no
633     ;;
634   *)
635     if test x$have_plugins = xno
636     then
637       AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
638     fi
639     PLUGIN_DIR="$withval"
640     ;;
641   esac
642   ]
643 )
644
645 AM_CONDITIONAL(HAVE_PLUGINS, test x$have_plugins = xyes)
646 if test x$have_plugins = xyes
647 then
648   AC_DEFINE(HAVE_PLUGINS)
649   PLUGIN_DIR=`(
650     test "x$prefix" = xNONE && prefix=$ac_default_prefix
651     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
652     eval echo "$PLUGIN_DIR"
653   )`
654   AC_DEFINE_UNQUOTED(PLUGIN_DIR,"$PLUGIN_DIR", [Plugin installation directory])
655 else
656   AC_DEFINE(PLUGIN_DIR,NULL)
657 fi
658 AC_SUBST(PLUGIN_DIR)
659
660 dnl libtool defs
661 AC_LIBTOOL_DLOPEN
662 AM_PROG_LIBTOOL
663 AC_SUBST(LIBTOOL_DEPS)
664
665 AM_CONFIG_HEADER(config.h)
666 AC_CONFIG_SUBDIRS(epan wiretap)
667 AC_OUTPUT(
668   Makefile
669   doc/Makefile
670   gtk/Makefile
671   packaging/Makefile
672   packaging/nsis/Makefile
673   packaging/rpm/Makefile
674   packaging/rpm/SPECS/Makefile
675   packaging/rpm/SPECS/ethereal.spec
676   packaging/svr4/Makefile
677   packaging/svr4/checkinstall
678   packaging/svr4/pkginfo
679   plugins/Makefile
680   plugins/gryphon/Makefile
681   plugins/mgcp/Makefile
682   plugins/giop/Makefile
683   tools/Makefile
684   tools/lemon/Makefile
685   ,)
686
687
688 # Pretty messages
689
690 if test "x$enable_setuid_install" = "xyes" ; then
691         setuid_message="yes (DANGEROUS!!!)"
692 else
693         setuid_message="no"
694 fi
695
696 if test "x$SNMP_LIBS" = "x" ; then
697         snmp_libs_message="no"
698 else
699         snmp_libs_message="yes"
700 fi
701
702
703
704 echo ""
705 echo "The Ethereal package has been configured with the following options."
706 echo "                    Build ethereal : $enable_ethereal"
707 echo "                   Build tethereal : $enable_tethereal"
708 echo "                     Build editcap : $enable_editcap"
709 echo "                    Build mergecap : $enable_mergecap"
710 echo "                   Build text2pcap : $enable_text2pcap"
711 echo "                     Build idl2eth : $enable_idl2eth"
712 echo "                     Build randpkt : $enable_randpkt"
713 echo "                      Build dftest : $enable_dftest"
714 echo ""
715 echo "                    Install setuid : $setuid_message"
716 echo "                       Use plugins : $have_plugins"
717 echo "                  Use pcap library : $want_pcap"
718 echo "                  Use zlib library : $enable_zlib"
719 echo "          Use IPv6 name resolution : $enable_ipv6"
720 echo "              Use UCD SNMP library : $snmp_libs_message"