Apparently, on systems with glibc 2.2, "inet_aton()" is declared in
<arpa/inet.h>, but is, in some fashion, declared differently from the
way we declare it in "inet_v6defs.h", but "inet_ntop()" isn't defined,
so we include "inet_v6defs.h" in "inet_pton.c", which causes
"inet_pton.c" not to compile as we get a collision between the two
declarations.
Move the declaration of "inet_aton()" to "inet_aton.h", define
"NEED_INET_ATON_H" iff we didn't find "inet_aton()" in the system
libraries, and include "inet_aton.h" in the callers of "inet_aton()" iff
"NEED_INET_ATON_H" is defined, so that it doesn't get declared by us if
"inet_aton()" is defined by a system library (which hopefully means it's
declared in <arpa/inet.h> instead).
svn path=/trunk/; revision=2137
2000-07-14 07:11:53 +00:00
|
|
|
# $Id: configure.in,v 1.95 2000/07/14 07:11:52 guy Exp $
|
1999-12-03 07:04:54 +00:00
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf 2.13 or later to produce a
|
|
|
|
dnl configure script; 2.12 doesn't generate a "configure" script that
|
|
|
|
dnl defines SHELL, and "Makefile.in" has
|
|
|
|
dnl
|
|
|
|
dnl SHELL = @SHELL@
|
|
|
|
dnl
|
|
|
|
dnl which requires it to be defined - and there may be other problems
|
|
|
|
dnl with pre-2.13 "autoconf" as well.
|
|
|
|
dnl
|
1998-09-16 02:39:15 +00:00
|
|
|
AC_INIT(etypes.h)
|
|
|
|
|
1999-12-03 07:04:54 +00:00
|
|
|
AC_PREREQ(2.13)
|
|
|
|
|
2000-07-04 12:10:06 +00:00
|
|
|
AM_INIT_AUTOMAKE(ethereal, 0.8.10)
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2000-02-11 03:17:58 +00:00
|
|
|
AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
|
|
|
|
|
1998-09-20 00:21:56 +00:00
|
|
|
dnl Check for CPU / vendor / OS
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
1999-07-13 02:53:26 +00:00
|
|
|
AC_PROG_CPP
|
1998-11-12 00:06:47 +00:00
|
|
|
AC_PROG_RANLIB
|
1999-07-07 22:52:57 +00:00
|
|
|
AC_PROG_YACC
|
1999-07-31 23:06:13 +00:00
|
|
|
AM_PROG_LEX
|
1999-08-11 16:05:19 +00:00
|
|
|
AC_PATH_PROG(PERL_PATH, perl)
|
1999-08-11 16:25:07 +00:00
|
|
|
AC_PATH_PROG(LEX, flex)
|
1999-08-11 16:05:19 +00:00
|
|
|
|
|
|
|
AC_SUBST(PERL_PATH)
|
1999-08-11 16:25:07 +00:00
|
|
|
AC_SUBST(FLEX_PATH)
|
1999-08-11 16:05:19 +00:00
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1998-11-18 01:40:09 +00:00
|
|
|
# If we're running gcc, add '-Wall' to CFLAGS.
|
|
|
|
AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS)
|
|
|
|
if test x$GCC != x ; then
|
|
|
|
CFLAGS="-Wall $CFLAGS"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
2000-01-21 08:44:40 +00:00
|
|
|
#
|
|
|
|
# Add any platform-specific compiler flags needed.
|
|
|
|
#
|
|
|
|
AC_MSG_CHECKING(for platform-specific compiler flags)
|
|
|
|
if test "x$GCC" = x
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Not GCC - assume it's the vendor's compiler.
|
|
|
|
#
|
|
|
|
case "$host_os" in
|
|
|
|
hpux*)
|
|
|
|
#
|
|
|
|
# HP's ANSI C compiler; flags suggested by Jost Martin.
|
2000-03-31 20:45:29 +00:00
|
|
|
# "-Ae" for ANSI C plus extensions such as "long long".
|
2000-01-21 08:44:40 +00:00
|
|
|
# "+O2", for optimization. XXX - works with "-g"?
|
|
|
|
#
|
2000-03-31 20:45:29 +00:00
|
|
|
CFLAGS="-Ae +O2 $CFLAGS"
|
|
|
|
AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
|
2000-01-21 08:44:40 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(none needed)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(none needed)
|
|
|
|
fi
|
|
|
|
|
Forcibly insert "-I/usr/local/include" in CFLAGS and "-L/usr/local/lib"
in LIBS, because there's a bunch of stuff we might use that might have
been installed in "/usr/local" ("libpcap", "zlib", an SNMP library), and
we want to make sure all the stuff that looks for libraries and header
files checks there.
Also, add all the "-I" stuff to CPPFLAGS as well, as that's what's used
in many header-file searches.
And, while we're at it, add "-R/usr/local/lib" on SunOS 5.x, as its
linker doesn't automatically set the run-time library search path to
include all directories specified in "-L".
Hopefully, this will make sure we find in "/usr/local/include" and
"/usr/local/lib" everything we might want to find (e.g., SNMP headers -
on FreeBSD, we weren't adding "/usr/local/include" because we found the
"libpcap" header in "/usr/include", and thus weren't searching
"/usr/local/include" for "ucd-snmp/snmp.h" or "snmp/snmp.h", and thus
weren't finding them even if we'd installed the UCD SNMP package!).
Also, hopefully it won't cause problems on some other platform with some
other configuration of installed packages....
svn path=/trunk/; revision=940
1999-10-28 03:33:19 +00:00
|
|
|
#
|
|
|
|
# Arrange that we search for header files in the source directory
|
|
|
|
# and in its "wiretap" subdirectory, as well as in "/usr/local/include",
|
|
|
|
# as various packages we use ("libpcap", "zlib", an SNMP library)
|
|
|
|
# may have been installed under "/usr/local/include".
|
|
|
|
#
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I/usr/local/include"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I/usr/local/include"
|
|
|
|
|
|
|
|
#
|
2000-01-15 09:46:28 +00:00
|
|
|
# Arrange that we search for libraries in "/usr/local/lib".
|
Forcibly insert "-I/usr/local/include" in CFLAGS and "-L/usr/local/lib"
in LIBS, because there's a bunch of stuff we might use that might have
been installed in "/usr/local" ("libpcap", "zlib", an SNMP library), and
we want to make sure all the stuff that looks for libraries and header
files checks there.
Also, add all the "-I" stuff to CPPFLAGS as well, as that's what's used
in many header-file searches.
And, while we're at it, add "-R/usr/local/lib" on SunOS 5.x, as its
linker doesn't automatically set the run-time library search path to
include all directories specified in "-L".
Hopefully, this will make sure we find in "/usr/local/include" and
"/usr/local/lib" everything we might want to find (e.g., SNMP headers -
on FreeBSD, we weren't adding "/usr/local/include" because we found the
"libpcap" header in "/usr/include", and thus weren't searching
"/usr/local/include" for "ucd-snmp/snmp.h" or "snmp/snmp.h", and thus
weren't finding them even if we'd installed the UCD SNMP package!).
Also, hopefully it won't cause problems on some other platform with some
other configuration of installed packages....
svn path=/trunk/; revision=940
1999-10-28 03:33:19 +00:00
|
|
|
#
|
Add "-L" flags to LDFLAGS, not LIBS, and get rid of all the exotic
searching that tries to figure out in what directory libpcap lives - we
should treat "-L" just like "-I", rather than adding a ton of
complication to do it the way the autoconf maintainers think, for some
reason, it should be done (by adding "-L" flags to LIBS - "-L" flags
don't specify libraries, so I have no clue why they think they belong in
LIBS; they specify a search path for libraries, just as "-I" flags
specify a search path for header files, so they strike me as "flags to
the linker" rather than "libraries", and LDFLAGS, unlike LIBS, appears
before *all* "-l" flags, including those specified by PCAP_LIBS and so
on).
svn path=/trunk/; revision=1516
2000-01-21 06:18:16 +00:00
|
|
|
AC_ETHEREAL_ADD_DASH_L(LDFLAGS, /usr/local/lib)
|
1999-07-07 22:52:57 +00:00
|
|
|
|
1998-09-25 23:24:07 +00:00
|
|
|
# Create DATAFILE_DIR #define for config.h
|
|
|
|
DATAFILE_DIR=$sysconfdir
|
|
|
|
DATAFILE_DIR=`(
|
|
|
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
|
|
|
test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
|
|
|
|
eval echo "$DATAFILE_DIR"
|
|
|
|
)`
|
|
|
|
AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$DATAFILE_DIR")
|
|
|
|
AC_SUBST(DATAFILE_DIR)
|
|
|
|
|
1998-09-20 00:21:56 +00:00
|
|
|
# If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
|
|
|
|
# link directory.
|
|
|
|
case "$host_os" in
|
|
|
|
solaris*)
|
1998-09-25 23:24:07 +00:00
|
|
|
AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
|
|
|
|
if test x$LD_LIBRARY_PATH != x ; then
|
1998-09-20 00:21:56 +00:00
|
|
|
LIBS="$LIBS -R$LD_LIBRARY_PATH"
|
1998-09-25 23:24:07 +00:00
|
|
|
AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
|
1998-09-20 00:21:56 +00:00
|
|
|
else
|
1998-09-25 23:24:07 +00:00
|
|
|
AC_MSG_RESULT(no -- this may be a problem in a few seconds)
|
1998-09-20 00:21:56 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2000-01-09 20:05:37 +00:00
|
|
|
# GLib checks
|
|
|
|
# This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
|
|
|
|
# GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
|
|
|
|
# However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
|
|
|
|
# set when generating the Makefile, so we can make programs that require
|
|
|
|
# only GLib link with @GLIB_LIBS@ and make programs that require GTK+
|
|
|
|
# link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
|
|
|
|
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
|
|
|
|
# programs to be built with GLib.
|
|
|
|
#
|
2000-01-15 05:30:52 +00:00
|
|
|
AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule)
|
2000-01-09 20:05:37 +00:00
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
# GTK checks
|
2000-01-09 20:05:37 +00:00
|
|
|
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
|
|
|
|
# programs to be built with GTK+.
|
|
|
|
#
|
|
|
|
AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS",
|
1998-09-16 02:39:15 +00:00
|
|
|
AC_MSG_ERROR(GTK+ distribution not found.))
|
|
|
|
|
2000-01-15 08:08:20 +00:00
|
|
|
dnl Checks for "gethostbyname()" - and "-lnsl", if we need it to get
|
|
|
|
dnl "gethostbyname()".
|
|
|
|
AC_ETHEREAL_GETHOSTBY_LIB_CHECK
|
|
|
|
|
|
|
|
dnl Checks for "connect()", used as a proxy for "socket()" - and
|
|
|
|
dnl "-lsocket", if we need it to get "connect()".
|
|
|
|
AC_ETHEREAL_SOCKET_LIB_CHECK
|
|
|
|
|
1999-07-09 04:18:36 +00:00
|
|
|
dnl pcap check
|
|
|
|
AC_ARG_ENABLE(pcap,
|
|
|
|
[ --enable-pcap use libpcap for packet capturing. [default=yes]],,enable_pcap=yes)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to use libpcap for packet capture)
|
|
|
|
if test "x$enable_pcap" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
1998-10-28 21:52:48 +00:00
|
|
|
else
|
1999-07-09 04:18:36 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
1999-07-13 02:53:26 +00:00
|
|
|
AC_ETHEREAL_PCAP_CHECK
|
1998-10-28 21:52:48 +00:00
|
|
|
fi
|
|
|
|
|
1999-09-22 01:26:50 +00:00
|
|
|
dnl zlib check
|
|
|
|
AC_ARG_ENABLE(zlib,
|
2000-01-16 00:13:24 +00:00
|
|
|
[ --enable-zlib use zlib to read compressed data. [default=yes]],,enable_zlib=yes)
|
1999-09-22 01:26:50 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
|
|
|
|
if test "x$enable_zlib" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_ETHEREAL_ZLIB_CHECK
|
|
|
|
if test "x$enable_zlib" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-03-28 18:32:03 +00:00
|
|
|
dnl ipv6 check
|
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
[ --enable-ipv6 use ipv6 name resolution, if available. [default=yes]],,enable_ipv6=yes)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
|
|
|
|
if test "x$enable_ipv6" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_ETHEREAL_IPV6_STACK
|
|
|
|
fi
|
|
|
|
|
1998-11-12 00:06:47 +00:00
|
|
|
|
2000-02-11 03:17:58 +00:00
|
|
|
dnl Check if ethereal should be installed setuid
|
|
|
|
AC_ARG_ENABLE(setuid-install,
|
|
|
|
[ --enable-setuid-install install ethereal as setuid. DANGEROUS!!! [default=no]],,enable_setuid_install=no)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to install ethereal setuid)
|
|
|
|
if test "x$enable_setuid_install" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
fi
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Checks for header files.
|
1998-10-12 01:40:57 +00:00
|
|
|
AC_HEADER_STDC
|
2000-01-15 00:23:13 +00:00
|
|
|
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h dirent.h)
|
2000-01-10 17:33:17 +00:00
|
|
|
AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h sys/socket.h)
|
|
|
|
AC_CHECK_HEADERS(sys/wait.h sys/param.h)
|
|
|
|
AC_CHECK_HEADERS(netinet/in.h net/if.h)
|
1999-10-27 05:34:39 +00:00
|
|
|
AC_CHECK_HEADERS(stddef.h)
|
1999-12-09 20:43:38 +00:00
|
|
|
AC_CHECK_HEADERS(dlfcn.h)
|
2000-01-10 17:33:17 +00:00
|
|
|
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
|
1999-05-12 05:56:42 +00:00
|
|
|
|
|
|
|
dnl SNMP Check
|
|
|
|
AC_ARG_ENABLE(snmp,
|
|
|
|
[ --enable-snmp use SNMP library, if available. [default=yes]],,enable_snmp=yes)
|
|
|
|
|
2000-01-15 09:46:28 +00:00
|
|
|
SNMP_LIBS=''
|
1999-05-12 05:56:42 +00:00
|
|
|
AC_MSG_CHECKING(whether to use SNMP library if available)
|
|
|
|
if test "x$enable_snmp" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
1999-09-01 22:59:48 +00:00
|
|
|
AC_ETHEREAL_UCDSNMP_CHECK
|
1999-11-29 04:31:05 +00:00
|
|
|
AC_CHECK_HEADERS(ucd-snmp/snmp.h ucd-snmp/version.h snmp/snmp.h snmp/version.h)
|
2000-01-15 09:46:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# This may require "-lkstat" on Solaris, sigh.
|
|
|
|
#
|
1999-12-11 05:30:31 +00:00
|
|
|
AC_CHECK_LIB(snmp, sprint_objid,
|
2000-01-15 09:46:28 +00:00
|
|
|
SNMP_LIBS=-lsnmp,
|
|
|
|
[
|
|
|
|
#
|
|
|
|
# Throw away the cached "we didn't find it" answer.
|
|
|
|
#
|
|
|
|
unset ac_cv_lib_snmp_sprint_objid
|
|
|
|
AC_CHECK_LIB(snmp, sprint_objid,
|
|
|
|
[
|
|
|
|
#
|
|
|
|
# Throw away the cached "we found it" answer, so that if
|
|
|
|
# we rerun "configure", we don't just blow off this check
|
|
|
|
# and blithely assume that we don't need "-lkstat".
|
|
|
|
#
|
|
|
|
# XXX - autoconf really needs a way to test for a given
|
|
|
|
# routine in a given library *and* to test whether additional
|
|
|
|
# "-L"/"-R"/whatever flags are needed *before* the "-l"
|
|
|
|
# flag for the library and to test whether additional libraries
|
|
|
|
# are needed after the library *and* to cache all that
|
|
|
|
# information.
|
|
|
|
#
|
|
|
|
unset ac_cv_lib_snmp_sprint_objid
|
|
|
|
SNMP_LIBS="-lsnmp -lkstat"
|
|
|
|
],,$SOCKET_LIBS $NSL_LIBS -lkstat
|
|
|
|
)
|
|
|
|
], $SOCKET_LIBS $NSL_LIBS
|
|
|
|
)
|
|
|
|
|
1999-05-12 05:56:42 +00:00
|
|
|
fi
|
2000-01-15 09:46:28 +00:00
|
|
|
AC_SUBST(SNMP_LIBS)
|
1999-05-12 05:56:42 +00:00
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
# AC_C_CONST
|
|
|
|
|
1998-11-17 02:17:27 +00:00
|
|
|
# We need to know whether "struct sockaddr" has an "sa_len" member
|
|
|
|
# for get_interface_list().
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1998-11-17 02:17:27 +00:00
|
|
|
AC_ETHEREAL_STRUCT_SA_LEN
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
# We must know our byte order
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
2000-01-15 08:08:20 +00:00
|
|
|
# Checks whether "-traditional" is needed when using "ioctl".
|
|
|
|
# XXX - do we need this?
|
1998-09-16 02:39:15 +00:00
|
|
|
AC_PROG_GCC_TRADITIONAL
|
1998-10-10 03:32:20 +00:00
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
# If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
|
|
|
|
# then this won't work.
|
1998-10-12 01:40:57 +00:00
|
|
|
SNPRINTF_C=""
|
|
|
|
SNPRINTF_O=""
|
|
|
|
AC_CHECK_FUNC(snprintf, SNPRINTF_O="",
|
|
|
|
SNPRINTF_O="snprintf.o" [AC_DEFINE(NEED_SNPRINTF_H)])
|
|
|
|
if test "$ac_cv_func_snprintf" = no ; then
|
|
|
|
SNPRINTF_C="snprintf.c"
|
|
|
|
SNPRINTF_O="snprintf.o"
|
|
|
|
fi
|
1998-09-16 02:39:15 +00:00
|
|
|
AC_SUBST(SNPRINTF_C)
|
|
|
|
AC_SUBST(SNPRINTF_O)
|
|
|
|
|
1999-06-14 21:46:36 +00:00
|
|
|
AC_CHECK_FUNC(strerror, STRERROR_O="",
|
|
|
|
STRERROR_O="strerror.o" [AC_DEFINE(NEED_STRERROR_H)])
|
|
|
|
if test "$ac_cv_func_strerror" = no ; then
|
|
|
|
STRERROR_C="strerror.c"
|
|
|
|
STRERROR_O="strerror.o"
|
|
|
|
fi
|
|
|
|
AC_SUBST(STRERROR_C)
|
|
|
|
AC_SUBST(STRERROR_O)
|
|
|
|
|
2000-07-06 10:03:44 +00:00
|
|
|
AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
|
|
|
|
STRCASECMP_O="strcasecmp.o")
|
|
|
|
if test "$ac_cv_func_strcasecmp" = no ; then
|
|
|
|
STRCASECMP_C="strcasecmp.c"
|
|
|
|
STRCASECMP_O="strcasecmp.o"
|
|
|
|
fi
|
|
|
|
AC_SUBST(STRCASECMP_C)
|
|
|
|
AC_SUBST(STRCASECMP_O)
|
|
|
|
|
1999-10-01 21:41:38 +00:00
|
|
|
AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
|
|
|
|
STRNCASECMP_O="strncasecmp.o")
|
|
|
|
if test "$ac_cv_func_strncasecmp" = no ; then
|
|
|
|
STRNCASECMP_C="strncasecmp.c"
|
|
|
|
STRNCASECMP_O="strncasecmp.o"
|
|
|
|
fi
|
|
|
|
AC_SUBST(STRNCASECMP_C)
|
|
|
|
AC_SUBST(STRNCASECMP_O)
|
|
|
|
|
|
|
|
AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
|
|
|
|
MKSTEMP_O="mkstemp.o")
|
|
|
|
if test "$ac_cv_func_mkstemp" = no ; then
|
|
|
|
MKSTEMP_C="mkstemp.c"
|
|
|
|
MKSTEMP_O="mkstemp.o"
|
2000-01-15 00:23:13 +00:00
|
|
|
AC_DEFINE(NEED_MKSTEMP)
|
1999-10-01 21:41:38 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(MKSTEMP_C)
|
|
|
|
AC_SUBST(MKSTEMP_O)
|
|
|
|
|
1999-10-14 05:41:33 +00:00
|
|
|
AC_CHECK_FUNC(inet_aton, INET_ATON_O="",
|
1999-10-11 07:38:21 +00:00
|
|
|
INET_ATON_O="inet_aton.o")
|
|
|
|
if test "$ac_cv_func_inet_aton" = no ; then
|
|
|
|
INET_ATON_C="inet_aton.c"
|
|
|
|
INET_ATON_O="inet_aton.o"
|
Apparently, on systems with glibc 2.2, "inet_aton()" is declared in
<arpa/inet.h>, but is, in some fashion, declared differently from the
way we declare it in "inet_v6defs.h", but "inet_ntop()" isn't defined,
so we include "inet_v6defs.h" in "inet_pton.c", which causes
"inet_pton.c" not to compile as we get a collision between the two
declarations.
Move the declaration of "inet_aton()" to "inet_aton.h", define
"NEED_INET_ATON_H" iff we didn't find "inet_aton()" in the system
libraries, and include "inet_aton.h" in the callers of "inet_aton()" iff
"NEED_INET_ATON_H" is defined, so that it doesn't get declared by us if
"inet_aton()" is defined by a system library (which hopefully means it's
declared in <arpa/inet.h> instead).
svn path=/trunk/; revision=2137
2000-07-14 07:11:53 +00:00
|
|
|
AC_DEFINE(NEED_INET_ATON_H)
|
1999-10-11 07:38:21 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(INET_ATON_C)
|
|
|
|
AC_SUBST(INET_ATON_O)
|
|
|
|
|
1999-10-14 05:41:33 +00:00
|
|
|
AC_CHECK_FUNC(inet_pton, [
|
|
|
|
dnl check for pre-BIND82 inet_pton() bug.
|
|
|
|
AC_MSG_CHECKING(for broken inet_pton)
|
|
|
|
AC_TRY_RUN([#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
#ifdef AF_INET6
|
|
|
|
char buf[16];
|
|
|
|
/* this should return 0 (error) */
|
|
|
|
return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
|
|
|
|
#else
|
|
|
|
return 1;
|
|
|
|
#endif
|
|
|
|
}], [AC_MSG_RESULT(ok);
|
|
|
|
have_inet_pton=yes], [AC_MSG_RESULT(broken);
|
|
|
|
have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
|
|
|
|
have_inet_pton=no])],
|
|
|
|
have_inet_pton=no)
|
|
|
|
if test "$have_inet_pton" = no; then
|
|
|
|
INET_PTON_C="inet_pton.c"
|
|
|
|
INET_PTON_O="inet_pton.o"
|
|
|
|
else
|
|
|
|
INET_PTON_C=""
|
|
|
|
INET_PTON_O=""
|
|
|
|
fi
|
|
|
|
AC_SUBST(INET_PTON_C)
|
|
|
|
AC_SUBST(INET_PTON_O)
|
|
|
|
|
|
|
|
AC_CHECK_FUNC(inet_ntop, INET_NTOP_O="",
|
1999-10-14 06:55:11 +00:00
|
|
|
INET_NTOP_O="inet_ntop.o")
|
1999-10-14 05:41:33 +00:00
|
|
|
if test "$ac_cv_func_inet_ntop" = no ; then
|
1999-10-14 06:55:11 +00:00
|
|
|
INET_NTOP_C="inet_ntop.c"
|
|
|
|
INET_NTOP_O="inet_ntop.o"
|
|
|
|
AC_DEFINE(NEED_INET_V6DEFS_H)
|
1999-10-14 05:41:33 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(INET_NTOP_C)
|
|
|
|
AC_SUBST(INET_NTOP_O)
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
|
1999-10-14 03:50:51 +00:00
|
|
|
|
1999-07-09 04:18:36 +00:00
|
|
|
dnl blank for now, but will be used in future
|
1999-09-24 04:59:52 +00:00
|
|
|
AC_SUBST(ethereal_SUBDIRS)
|
1999-07-09 04:18:36 +00:00
|
|
|
|
1999-12-28 04:40:24 +00:00
|
|
|
dnl check for plugins directory - stolen from Amanda's configure.in
|
|
|
|
AC_ARG_WITH(plugindir,
|
|
|
|
[ --with-plugindir=DIR install plugins in DIR],
|
|
|
|
[
|
|
|
|
case "$withval" in
|
|
|
|
"" | y | ye | yes | n | no)
|
|
|
|
AC_MSG_ERROR([*** You must supply an argument to the --with-plugindir option.])
|
|
|
|
;;
|
|
|
|
*) PLUGIN_DIR="$withval"
|
|
|
|
esac
|
|
|
|
],
|
2000-07-04 12:10:06 +00:00
|
|
|
: ${PLUGIN_DIR=$libdir/ethereal/plugins/0.8.10}
|
1999-12-28 04:40:24 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
PLUGIN_DIR=`(
|
|
|
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
|
|
|
test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
|
|
|
|
eval echo "$PLUGIN_DIR"
|
|
|
|
)`
|
|
|
|
AC_DEFINE_UNQUOTED(PLUGIN_DIR,"$PLUGIN_DIR", [Plugin installation directory])
|
|
|
|
AC_SUBST(PLUGIN_DIR)
|
|
|
|
|
1999-12-26 22:38:07 +00:00
|
|
|
dnl libtool defs
|
|
|
|
AC_LIBTOOL_DLOPEN
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2000-01-15 13:25:22 +00:00
|
|
|
AC_CONFIG_SUBDIRS(wiretap)
|
1999-12-26 22:38:07 +00:00
|
|
|
AC_OUTPUT(
|
|
|
|
Makefile
|
|
|
|
ethereal.spec
|
|
|
|
doc/Makefile
|
|
|
|
doc/dfilter2pod
|
|
|
|
gtk/Makefile
|
|
|
|
plugins/Makefile
|
|
|
|
plugins/gryphon/Makefile,
|
1999-08-11 16:05:19 +00:00
|
|
|
[chmod +x doc/dfilter2pod])
|