1 dnl Macros that test for specific features.
2 dnl This file is part of the Autoconf packaging for Ethereal.
3 dnl Copyright (C) 1998-2000 by Gerald Combs.
5 dnl $Id: acinclude.m4,v 1.68 2004/02/26 09:39:43 guy Exp $
7 dnl This program is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU General Public License as published by
9 dnl the Free Software Foundation; either version 2, or (at your option)
10 dnl any later version.
12 dnl This program is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 dnl GNU General Public License for more details.
17 dnl You should have received a copy of the GNU General Public License
18 dnl along with this program; if not, write to the Free Software
19 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 dnl As a special exception, the Free Software Foundation gives unlimited
23 dnl permission to copy, distribute and modify the configure scripts that
24 dnl are the output of Autoconf. You need not follow the terms of the GNU
25 dnl General Public License when using or distributing such scripts, even
26 dnl though portions of the text of Autoconf appear in them. The GNU
27 dnl General Public License (GPL) does govern all other use of the material
28 dnl that constitutes the Autoconf program.
30 dnl Certain portions of the Autoconf source text are designed to be copied
31 dnl (in certain cases, depending on the input) into the output of
32 dnl Autoconf. We call these the "data" portions. The rest of the Autoconf
33 dnl source text consists of comments plus executable code that decides which
34 dnl of the data portions to output in any given case. We call these
35 dnl comments and executable code the "non-data" portions. Autoconf never
36 dnl copies any of the non-data portions into its output.
38 dnl This special exception to the GPL applies to versions of Autoconf
39 dnl released by the Free Software Foundation. When you make and
40 dnl distribute a modified version of Autoconf, you may extend this special
41 dnl exception to the GPL to apply to your modified version as well, *unless*
42 dnl your modified version has the potential to copy into its output some
43 dnl of the text that was the non-data portion of the version that you started
44 dnl with. (In other words, unless your change moves or copies text from
45 dnl the non-data portions to the data portions.) If your modification has
46 dnl such potential, you must delete any notice of this special exception
47 dnl to the GPL from your modified version.
49 dnl Written by David MacKenzie, with help from
50 dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
51 dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
54 # AC_ETHEREAL_ADD_DASH_L
56 # Add to the variable specified as the first argument a "-L" flag for the
57 # directory specified as the second argument, and, on Solaris, add a
58 # "-R" flag for it as well.
60 # XXX - IRIX, and other OSes, may require some flag equivalent to
63 AC_DEFUN(AC_ETHEREAL_ADD_DASH_L,
74 # AC_ETHEREAL_STRUCT_SA_LEN
76 dnl AC_STRUCT_ST_BLKSIZE extracted from the file in question,
77 dnl "acspecific.m4" in GNU Autoconf 2.12, and turned into
78 dnl AC_ETHEREAL_STRUCT_SA_LEN, which checks if "struct sockaddr"
79 dnl has the 4.4BSD "sa_len" member, and defines HAVE_SA_LEN; that's
80 dnl what's in this file.
81 dnl Done by Guy Harris <guy@alum.mit.edu> on 1998-11-14.
83 dnl ### Checks for structure members
85 AC_DEFUN(AC_ETHEREAL_STRUCT_SA_LEN,
86 [AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_ethereal_struct_sa_len,
87 [AC_TRY_COMPILE([#include <sys/types.h>
88 #include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
89 ac_cv_ethereal_struct_sa_len=yes, ac_cv_ethereal_struct_sa_len=no)])
90 if test $ac_cv_ethereal_struct_sa_len = yes; then
91 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
96 # AC_ETHEREAL_IPV6_STACK
98 # By Jun-ichiro "itojun" Hagino, <itojun@iijlab.net>
100 AC_DEFUN(AC_ETHEREAL_IPV6_STACK,
105 AC_MSG_CHECKING([ipv6 stack type])
106 for i in v6d toshiba kame inria zeta linux linux-glibc solaris8; do
110 #include </usr/local/v6/include/sys/types.h>
114 [v6type=$i; v6lib=v6;
115 v6libdir=/usr/local/v6/lib;
116 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
120 #include <sys/param.h>
121 #ifdef _TOSHIBA_INET6
124 [v6type=$i; v6lib=inet6;
125 v6libdir=/usr/local/v6/lib;
126 CFLAGS="-DINET6 $CFLAGS"])
130 #include <netinet/in.h>
134 [v6type=$i; v6lib=inet6;
135 v6libdir=/usr/local/v6/lib;
136 CFLAGS="-DINET6 $CFLAGS"])
140 #include <netinet/in.h>
141 #ifdef IPV6_INRIA_VERSION
144 [v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
148 #include <sys/param.h>
149 #ifdef _ZETA_MINAMI_INET6
152 [v6type=$i; v6lib=inet6;
153 v6libdir=/usr/local/v6/lib;
154 CFLAGS="-DINET6 $CFLAGS"])
157 if test -d /usr/inet6; then
161 CFLAGS="-DINET6 $CFLAGS"
166 #include <features.h>
167 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
168 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2
172 [v6type=$i; v6lib=inet6; CFLAGS="-DINET6 $CFLAGS"])
175 if test "`uname -s`" = "SunOS" && test "`uname -r`" = "5.8"; then
178 [CFLAGS="-DINET6 -DSOLARIS8_INET6 $CFLAGS"]
182 if test "$v6type" != "unknown"; then
187 if test "$v6lib" != "none"; then
188 for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
189 if test -d $dir -a -f $dir/lib$v6lib.a; then
190 LIBS="-L$dir $LIBS -l$v6lib"
198 AC_MSG_RESULT(["$v6type, $v6lib"])
202 # AC_ETHEREAL_GETHOSTBY_LIB_CHECK
204 # Checks whether we need "-lnsl" to get "gethostby*()", which we use
207 # Adapted from stuff in the AC_PATH_XTRA macro in "acspecific.m4" in
208 # GNU Autoconf 2.13; the comment came from there.
209 # Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14.
211 AC_DEFUN(AC_ETHEREAL_GETHOSTBY_LIB_CHECK,
213 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
214 # to get the SysV transport functions.
215 # chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4)
217 # The nsl library prevents programs from opening the X display
218 # on Irix 5.2, according to dickey@clark.net.
219 AC_CHECK_FUNC(gethostbyname, ,
220 AC_CHECK_LIB(nsl, gethostbyname, NSL_LIBS="-lnsl"))
225 # AC_ETHEREAL_SOCKET_LIB_CHECK
227 # Checks whether we need "-lsocket" to get "socket()", which is used
228 # by libpcap on some platforms - and, in effect, "gethostby*()" on
229 # most if not all platforms (so that it can use NIS or DNS or...
230 # to look up host names).
232 # Adapted from stuff in the AC_PATH_XTRA macro in "acspecific.m4" in
233 # GNU Autoconf 2.13; the comment came from there.
234 # Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14.
236 # We use "connect" because that's what AC_PATH_XTRA did.
238 AC_DEFUN(AC_ETHEREAL_SOCKET_LIB_CHECK,
240 # lieder@skyler.mavd.honeywell.com says without -lsocket,
241 # socket/setsockopt and other routines are undefined under SCO ODT
242 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
243 # on later versions), says simon@lia.di.epfl.ch: it contains
244 # gethostby* variants that don't use the nameserver (or something).
245 # -lsocket must be given before -lnsl if both are needed.
246 # We assume that if connect needs -lnsl, so does gethostbyname.
247 AC_CHECK_FUNC(connect, ,
248 AC_CHECK_LIB(socket, connect, SOCKET_LIBS="-lsocket",
249 AC_MSG_ERROR(Function 'socket' not found.), $NSL_LIBS))
250 AC_SUBST(SOCKET_LIBS)
254 # AC_ETHEREAL_PCAP_CHECK
256 AC_DEFUN(AC_ETHEREAL_PCAP_CHECK,
258 if test -z "$pcap_dir"
261 # XXX need to set a var AC_CHECK_HEADER(pcap.h,,)
264 # The user didn't specify a directory in which libpcap resides;
265 # we assume that the current library search path will work,
266 # but we may have to look for the header in a "pcap"
267 # subdirectory of "/usr/include" or "/usr/local/include",
268 # as some systems apparently put "pcap.h" in a "pcap"
269 # subdirectory, and we also check "$prefix/include" - and
270 # "$prefix/include/pcap", in case $prefix is set to
271 # "/usr/include" or "/usr/local/include".
273 # XXX - should we just add "$prefix/include" to the include
274 # search path and "$prefix/lib" to the library search path?
276 AC_MSG_CHECKING(for extraneous pcap header directories)
278 for pcap_dir in /usr/include/pcap $prefix/include/pcap $prefix/include /usr/local/include/pcap
280 if test -d $pcap_dir ; then
281 if test x$pcap_dir != x/usr/include -a x$pcap_dir != x/usr/local/include ; then
282 CFLAGS="$CFLAGS -I$pcap_dir"
283 CPPFLAGS="$CPPFLAGS -I$pcap_dir"
285 found_pcap_dir=" $found_pcap_dir -I$pcap_dir"
290 if test "$found_pcap_dir" != "" ; then
291 AC_MSG_RESULT(found --$found_pcap_dir added to CFLAGS)
293 AC_MSG_RESULT(not found)
297 # The user specified a directory in which libpcap resides,
298 # so add the "include" subdirectory of that directory to
299 # the include file search path and the "lib" subdirectory
300 # of that directory to the library search path.
302 # XXX - if there's also a libpcap in a directory that's
303 # already in CFLAGS, CPPFLAGS, or LDFLAGS, this won't
304 # make us find the version in the specified directory,
305 # as the compiler and/or linker will search that other
306 # directory before it searches the specified directory.
308 CFLAGS="$CFLAGS -I$pcap_dir/include"
309 CPPFLAGS="$CPPFLAGS -I$pcap_dir/include"
310 AC_ETHEREAL_ADD_DASH_L(LDFLAGS, $pcap_dir/lib)
314 AC_CHECK_HEADER(pcap.h,,
315 AC_MSG_ERROR([[Header file pcap.h not found; if you installed libpcap
316 from source, did you also do \"make install-incl\", and if you installed a
317 binary package of libpcap, is there also a developer's package of libpcap,
318 and did you also install that package?]]))
321 # Check to see if we find "pcap_open_live" in "-lpcap".
323 AC_CHECK_LIB(pcap, pcap_open_live,
326 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to use libpcap library])
328 AC_MSG_CHECKING([for pcap_open_live in -lpcap -lcfg -lodm])
330 LIBS="-lpcap -lcfg -lodm"
336 pcap_open_live(NULL, 0, 0, 0, NULL);
340 PCAP_LIBS="-lpcap -lcfg -lodm"
341 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to use libpcap library])
345 AC_MSG_ERROR([Library libpcap not found.])
348 ], $SOCKET_LIBS $NSL_LIBS)
352 # Check whether various variables and functions are defined by
356 AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
357 LIBS="$PCAP_LIBS $SOCKET_LIBS $NSL_LIBS $LIBS"
361 extern char *pcap_version;
364 printf ("%s\n", pcap_version);
366 ac_cv_pcap_version_defined=yes,
367 ac_cv_pcap_version_defined=no,
368 [echo $ac_n "cross compiling; assumed OK... $ac_c"])
369 if test "$ac_cv_pcap_version_defined" = yes ; then
371 AC_DEFINE(HAVE_PCAP_VERSION, 1, [Define if libpcap version is known])
375 AC_CHECK_FUNCS(pcap_findalldevs pcap_lib_version pcap_open_dead)
376 AC_CHECK_FUNCS(pcap_datalink_val_to_name pcap_datalink_name_to_val)
377 AC_CHECK_FUNCS(pcap_list_datalinks pcap_set_datalink)
382 # AC_ETHEREAL_ZLIB_CHECK
384 AC_DEFUN(AC_ETHEREAL_ZLIB_CHECK,
386 if test "x$zlib_dir" != "x"
389 # The user specified a directory in which zlib resides,
390 # so add the "include" subdirectory of that directory to
391 # the include file search path and the "lib" subdirectory
392 # of that directory to the library search path.
394 # XXX - if there's also a zlib in a directory that's
395 # already in CFLAGS, CPPFLAGS, or LDFLAGS, this won't
396 # make us find the version in the specified directory,
397 # as the compiler and/or linker will search that other
398 # directory before it searches the specified directory.
400 ethereal_save_CFLAGS="$CFLAGS"
401 CFLAGS="$CFLAGS -I$zlib_dir/include"
402 ethereal_save_CPPFLAGS="$CPPFLAGS"
403 CPPFLAGS="$CPPFLAGS -I$zlib_dir/include"
404 ethereal_save_LIBS="$LIBS"
405 AC_ETHEREAL_ADD_DASH_L(LIBS, $zlib_dir/lib)
409 # Make sure we have "zlib.h". If we don't, it means we probably
410 # don't have zlib, so don't use it.
412 AC_CHECK_HEADER(zlib.h,,
414 if test "x$zlib_dir" != "x"
417 # The user used "--with-zlib=" to specify a directory
418 # containing zlib, but we didn't find the header file
419 # there; that either means they didn't specify the
420 # right directory or are confused about whether zlib
421 # is, in fact, installed. Report the error and give up.
423 AC_MSG_ERROR([zlib header not found in directory specified in --with-zlib])
425 if test "x$want_zlib" = "xyes"
428 # The user tried to force us to use the library, but we
429 # couldn't find the header file; report an error.
431 AC_MSG_ERROR(Header file zlib.h not found.)
434 # We couldn't find the header file; don't use the
435 # library, as it's probably not present.
442 if test "x$want_zlib" != "xno"
445 # Well, we at least have the zlib header file.
447 # Check for "gzgets()" in zlib, because we need it, but
448 # some older versions of zlib don't have it. It appears
449 # from the zlib ChangeLog that any released version of zlib
450 # with "gzgets()" should have the other routines we
451 # depend on, such as "gzseek()", "gztell()", and "zError()".
453 # Another reason why we require "gzgets()" is that
454 # some versions of zlib that didn't have it, such
455 # as 1.0.8, had a bug in "gzseek()" that meant that it
456 # doesn't work correctly on uncompressed files; this
457 # means we cannot use version 1.0.8. (Unfortunately,
458 # that's the version that comes with recent X11 source,
459 # and many people who install XFree86 on their Slackware
460 # boxes don't realize that they should configure it to
461 # use the native zlib rather than building and installing
462 # the crappy old version that comes with XFree86.)
464 # I.e., we can't just avoid using "gzgets()", as
465 # versions of zlib without "gzgets()" are likely to have
466 # a broken "gzseek()".
468 AC_CHECK_LIB(z, gzgets,
470 if test "x$zlib_dir" != "x"
473 # Put the "-I" and "-L" flags for zlib at
474 # the beginning of CFLAGS, CPPFLAGS, and
478 AC_ETHEREAL_ADD_DASH_L(LIBS, $zlib_dir/lib)
479 LIBS="$LIBS -lz $ethereal_save_LIBS"
483 AC_DEFINE(HAVE_LIBZ, 1, [Define to use libz library])
485 if test "x$zlib_dir" != "x"
488 # Restore the versions of CFLAGS, CPPFLAGS,
489 # and LIBS before we added the "-with-zlib="
490 # directory, as we didn't actually find
491 # zlib there, or didn't find a zlib that
492 # contains gzgets there.
494 CFLAGS="$ethereal_save_CFLAGS"
495 CPPFLAGS="$ethereal_save_CPPFLAGS"
496 LIBS="$ethereal_save_LIBS"
502 if test "x$want_zlib" != "xno"
505 # Well, we at least have the zlib header file and a zlib
508 # Now check for "gzgets()" in zlib when linking with the
509 # linker flags for GTK+ applications; people often grab
510 # XFree86 source and build and install it on their systems,
511 # and they appear sometimes to misconfigure XFree86 so that,
512 # even on systems with zlib, it assumes there is no zlib,
513 # so the XFree86 build process builds and installs its
514 # own zlib in the X11 library directory.
516 # The XFree86 zlib is an older version that lacks
517 # "gzgets()", and that's the zlib with which Ethereal
518 # gets linked, so the build of Ethereal fails.
520 ac_save_CFLAGS="$CFLAGS"
522 CFLAGS="$CFLAGS $GTK_CFLAGS"
523 LIBS="$GTK_LIBS -lz $LIBS"
524 AC_MSG_CHECKING([for gzgets missing when linking with X11])
525 AC_TRY_LINK_FUNC(gzgets, AC_MSG_RESULT(no),
528 AC_MSG_ERROR(old zlib found when linking with X11 - get rid of old zlib.)
530 CFLAGS="$ac_save_CFLAGS"
536 # AC_ETHEREAL_LIBPCRE_CHECK
538 AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
540 if test "x$pcre_dir" != "x"
543 # The user specified a directory in which libpcre resides,
544 # so add the "include" subdirectory of that directory to
545 # the include file search path and the "lib" subdirectory
546 # of that directory to the library search path.
548 # XXX - if there's also a libpcre in a directory that's
549 # already in CFLAGS, CPPFLAGS, or LDFLAGS, this won't
550 # make us find the version in the specified directory,
551 # as the compiler and/or linker will search that other
552 # directory before it searches the specified directory.
554 ethereal_save_CFLAGS="$CFLAGS"
555 CFLAGS="$CFLAGS -I$pcre_dir/include"
556 ethereal_save_CPPFLAGS="$CPPFLAGS"
557 CPPFLAGS="$CPPFLAGS -I$pcre_dir/include"
558 ethereal_save_LIBS="$LIBS"
560 ethereal_save_LDFLAGS="$LDFLAGS"
561 LDFLAGS="$LDFLAGS -L$pcre_dir/lib"
565 # Make sure we have "pcre.h". If we don't, it means we probably
566 # don't have libpcre, so don't use it.
568 AC_CHECK_HEADER(pcre.h,,
570 if test "x$pcre_dir" != "x"
573 # The user used "--with-pcre=" to specify a directory
574 # containing libpcre, but we didn't find the header file
575 # there; that either means they didn't specify the
576 # right directory or are confused about whether libpcre
577 # is, in fact, installed. Report the error and give up.
579 AC_MSG_ERROR([libpcre header not found in directory specified in --with-pcre])
581 if test "x$want_pcre" = "xyes"
584 # The user tried to force us to use the library, but we
585 # couldn't find the header file; report an error.
587 AC_MSG_ERROR(Header file pcre.h not found.)
590 # We couldn't find the header file; don't use the
591 # library, as it's probably not present.
598 if test "x$want_pcre" != "xno"
601 # Well, we at least have the pcre header file.
603 # We're only using standard functions from libpcre,
604 # so we don't need to perform extra checks.
606 AC_CHECK_LIB(pcre, pcre_compile,
608 if test "x$pcre_dir" != "x"
611 # Put the "-I" and "-L" flags for pcre at
612 # the beginning of CFLAGS, CPPFLAGS,
615 PCRE_LIBS="-L$pcre_dir/lib -lpcre $ethereal_save_LIBS"
619 AC_DEFINE(HAVE_LIBPCRE, 1, [Define to use libpcre library])
621 if test "x$pcre_dir" != "x"
624 # Restore the versions of CFLAGS, CPPFLAGS,
625 # LDFLAGS, and LIBS before we added the
626 # "--with-pcre=" directory, as we didn't
627 # actually find pcre there.
629 CFLAGS="$ethereal_save_CFLAGS"
630 CPPFLAGS="$ethereal_save_CPPFLAGS"
631 LDFLAGS="$ethereal_save_LDFLAGS"
632 LIBS="$ethereal_save_LIBS"
642 # AC_ETHEREAL_UCDSNMP_CHECK
644 AC_DEFUN(AC_ETHEREAL_UCDSNMP_CHECK,
646 if test "x$ucdsnmp_dir" != "x"
649 # The user specified a directory in which UCD SNMP resides,
650 # so add the "include" subdirectory of that directory to
651 # the include file search path and the "lib" subdirectory
652 # of that directory to the library search path.
654 # XXX - if there's also a libpcap in a directory that's
655 # already in CFLAGS, CPPFLAGS, or LDFLAGS, this won't
656 # make us find the version in the specified directory,
657 # as the compiler and/or linker will search that other
658 # directory before it searches the specified directory.
660 CFLAGS="$CFLAGS -I$ucdsnmp_dir/include"
661 CPPFLAGS="$CPPFLAGS -I$ucdsnmp_dir/include"
662 AC_ETHEREAL_ADD_DASH_L(LDFLAGS, $ucdsnmp_dir/lib)
666 # Check for one of the UCD SNMP header files we include,
667 # to see whether we have UCD SNMP installed.
669 AC_CHECK_HEADER(ucd-snmp/ucd-snmp-config.h,
672 # UCD SNMP or Net-SNMP might require various helper
673 # libraries on various platforms, such as "-ldes425"
674 # in "/usr/kerberos/lib" on some versions of Red
675 # Hat Linux, or "-lkstat" on Solaris.
676 # XXX - it may also require "-lcrypto" on some platforms;
677 # we should check for that as well, rather than requiring
678 # users to explicitly indicate whether it's required.
680 # XXX - autoconf really needs a way to test for
681 # a given routine in a given library *and* to test
682 # whether additional "-L"/"-R"/whatever flags are
683 # needed *before* the "-l" flag for the library
684 # and to test whether additional libraries are
685 # needed after the library *and* to cache all that
688 for extras in "" "-L/usr/kerberos/lib -ldes425" "-lkstat"
690 AC_CHECK_LIB(snmp, sprint_realloc_objid,
692 SNMP_LIBS="-lsnmp $extras"; break
696 # Throw away the cached "we didn't find it"
697 # answer, so that if we rerun "configure",
698 # we still do all these checks and don't
699 # just blithely assume we don't need
700 # the extra libraries.
702 unset ac_cv_lib_snmp_sprint_realloc_objid
703 ], $SOCKET_LIBS $NSL_LIBS $SSL_LIBS $extras)
707 # If we didn't find "sprint_realloc_objid()", fail.
708 # Either the user needs a newer version of UCD SNMP
709 # with "sprint_realloc_objid()", or they may need to
710 # specify "--with-ssl".
712 if test "$ac_cv_lib_snmp_sprint_realloc_objid" = no; then
713 AC_MSG_ERROR([UCD SNMP header files found, but sprint_realloc_objid not found in SNMP library.])
717 # We found it, so we have UCD SNMP.
719 AC_DEFINE(HAVE_UCD_SNMP, 1, [Define to enable support for UCD-SNMP])
723 # No, we don't have it.
724 # If the user explicitly asked for UCD SNMP, fail,
725 # otherwise just don't use the UCD SNMP library.
727 if test "x$want_ucdsnmp" = "xyes" ; then
728 AC_MSG_ERROR(Header file ucd-snmp/snmp.h not found.)
734 # AC_ETHEREAL_SSL_CHECK
736 AC_DEFUN(AC_ETHEREAL_SSL_CHECK,
741 changequote(<<, >>)dnl
742 << --with-ssl[=DIR] use SSL crypto library (located in directory DIR, if supplied). [default=yes, if present]>>,
745 if test "x$withval" = "xno"; then
747 elif test "x$withval" = "xyes"; then
749 elif test -d "$withval"; then
751 AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
755 if test "x$want_ssl" = "xdefaultyes"; then
757 withval=/usr/local/ssl
758 if test -d "$withval"; then
759 AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
763 if test "x$want_ssl" = "xyes"; then
764 AC_CHECK_LIB(crypto, EVP_md5,
770 AC_MSG_RESULT(not required)
775 # AC_ETHEREAL_RPM_CHECK
776 # Looks for the rpm program, and checks to see if we can redefine "_topdir".
778 AC_DEFUN(AC_ETHEREAL_RPM_CHECK,
780 AC_CHECK_PROG(ac_cv_ethereal_have_rpm, rpm, "yes", "no")
781 if test "x$ac_cv_ethereal_have_rpm" = "xyes"; then
782 rpm --define '_topdir /tmp' > /dev/null 2>&1
783 AC_MSG_CHECKING(to see if we can redefine _topdir)
784 if test $? -eq 0 ; then
788 AC_MSG_RESULT(no. You'll have to build packages manually.)
795 # AC_ETHEREAL_GNU_SED_CHECK
796 # Checks if GNU sed is the first sed in PATH.
798 AC_DEFUN([AC_ETHEREAL_GNU_SED_CHECK],
800 AC_MSG_CHECKING(for GNU sed as first sed in PATH)
801 if ( sh -c "sed --version" </dev/null 2> /dev/null | grep "GNU sed" 2>&1 > /dev/null ) ; then
811 # AC_ETHEREAL_ADNS_CHECK
813 AC_DEFUN(AC_ETHEREAL_ADNS_CHECK,
818 changequote(<<, >>)dnl
819 << --with-adns[=DIR] use GNU ADNS (located in directory DIR, if supplied). [default=yes, if present]>>,
822 if test "x$withval" = "xno"; then
824 elif test "x$withval" = "xyes"; then
826 elif test -d "$withval"; then
828 AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
832 if test "x$want_adns" = "xdefaultyes"; then
835 if test -d "$withval"; then
836 AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
840 if test "x$want_adns" = "xyes"; then
841 AC_CHECK_LIB(adns, adns_init,
844 AC_DEFINE(HAVE_GNU_ADNS, 1, [Define to use GNU ADNS library])
846 ],, $SOCKET_LIBS $NSL_LIBS
849 AC_MSG_RESULT(not required)