1999-07-09 04:18:36 +00:00
|
|
|
# $Id: configure.in,v 1.29 1999/07/09 04:18:33 gram Exp $
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(etypes.h)
|
|
|
|
|
1999-06-24 16:25:59 +00:00
|
|
|
AM_INIT_AUTOMAKE(ethereal, 0.6.3)
|
1998-09-16 02:39:15 +00:00
|
|
|
|
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
|
1998-11-12 00:06:47 +00:00
|
|
|
AC_PROG_RANLIB
|
1999-07-07 22:52:57 +00:00
|
|
|
AC_PROG_YACC
|
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
|
|
|
|
|
1999-07-07 22:52:57 +00:00
|
|
|
CFLAGS="$CFLAGS -Iwiretap"
|
|
|
|
|
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
|
|
|
|
|
|
|
# GTK checks
|
1999-07-07 22:52:57 +00:00
|
|
|
AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",
|
1998-09-16 02:39:15 +00:00
|
|
|
AC_MSG_ERROR(GTK+ distribution not found.))
|
|
|
|
|
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)
|
|
|
|
# Evidently, some systems have pcap.h, etc. in */include/pcap
|
|
|
|
AC_MSG_CHECKING(for extraneous pcap header directories)
|
|
|
|
found_pcap_dir=""
|
|
|
|
for pcap_dir in /usr/include/pcap /usr/local/include/pcap
|
|
|
|
do
|
|
|
|
if test -d $pcap_dir ; then
|
|
|
|
LIBS="$LIBS -L$pcap_dir"
|
|
|
|
CFLAGS="$CFLAGS -I$pcap_dir"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$pcap_dir"
|
|
|
|
found_pcap_dir=" $found_pcap_dir -L$pcap_dir"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if test "$found_pcap_dir" != "" ; then
|
|
|
|
AC_MSG_RESULT(found --$found_pcap_dir added to LIBS)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(not found)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Pcap checks
|
|
|
|
AC_CHECK_HEADER(net/bpf.h,, AC_MSG_ERROR(Header file net/bpf.h not found.))
|
|
|
|
AC_CHECK_HEADER(pcap.h,, AC_MSG_ERROR(Header file pcap.h not found.))
|
|
|
|
AC_CHECK_LIB(pcap, pcap_open_offline,, AC_MSG_ERROR(Library libpcap not found.))
|
1998-10-28 21:52:48 +00:00
|
|
|
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
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Checks for header files.
|
1998-10-12 01:40:57 +00:00
|
|
|
AC_HEADER_STDC
|
1999-04-05 22:51:44 +00:00
|
|
|
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h)
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADERS(sys/sockio.h sys/types.h netinet/in.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)
|
|
|
|
|
|
|
|
SNMP_A=''
|
|
|
|
SNMP_O=''
|
|
|
|
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)
|
|
|
|
AC_CHECK_HEADERS(ucd-snmp/snmp.h snmp/snmp.h)
|
|
|
|
AC_CHECK_LIB(snmp, asn_parse_header,
|
|
|
|
[
|
|
|
|
SNMP_A=-lsnmp
|
|
|
|
SNMP_O=packet-snmp.o
|
|
|
|
], )
|
|
|
|
fi
|
|
|
|
AC_SUBST(SNMP_A)
|
|
|
|
AC_SUBST(SNMP_O)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_CHECK_FUNC(socket,, AC_MSG_ERROR(Function 'socket' not found.))
|
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)
|
|
|
|
|
1999-07-09 04:18:36 +00:00
|
|
|
dnl blank for now, but will be used in future
|
|
|
|
AC_SUBST(SUBDIRS)
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
1999-07-07 22:52:57 +00:00
|
|
|
AC_CONFIG_SUBDIRS(wiretap)
|
Un-comment "AC_CONFIG_SUBDIRS()", so that it'll run "configure" in the
"wiretap" subdirectory, and thus leave a "config.status" file around so
that one of the "auto{make,configure,header}" guys doesn't complain when
rebuilding stuff that it can't open "config.status". (The
"automake"-generated Makefile will recurse into "wiretap", and, at least
if you're doing builds from a tree freshly checked out from CVS, "XXX"
files will probably have been checked out before "XXX.in", so "make"
will try to reconstruct the "XXX" files from the "XXX.in" files.)
That also obviates the need to make "wiretap/Makefile" here.
We can also re-delete "wiretap/Makefile" from CVS - the problem that
caused me to bring it back wasn't caused by its absence, it was caused
by the above. As "Makefile"s generated by "configure" scripts depend on
the particular system on which you ran "configure", there's no One True
Makefile so "Makefile" should'n't be under CVS.
svn path=/trunk/; revision=95
1998-11-17 02:02:46 +00:00
|
|
|
AC_OUTPUT(Makefile)
|