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
|
|
|
# $Id: configure.in,v 1.13 1998/11/17 02:02:46 guy Exp $
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(etypes.h)
|
|
|
|
|
1998-10-13 02:10:57 +00:00
|
|
|
AM_INIT_AUTOMAKE(ethereal, 0.4.1)
|
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
|
1998-09-16 02:39:15 +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
|
|
|
|
|
|
|
# GTK checks
|
|
|
|
AM_PATH_GTK(1.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",
|
|
|
|
AC_MSG_ERROR(GTK+ distribution not found.))
|
|
|
|
|
|
|
|
# Pcap checks
|
|
|
|
AC_CHECK_HEADER(net/bpf.h,, AC_MSG_ERROR(Header file net/bpf.h not found.))
|
1998-10-28 21:52:48 +00:00
|
|
|
AC_CHECK_HEADER(pcap.h,, AC_MSG_ERROR(Header file pcap.h not found.))
|
1998-09-16 02:39:15 +00:00
|
|
|
AC_CHECK_LIB(pcap, pcap_open_offline,, AC_MSG_ERROR(Library libpcap not found.))
|
|
|
|
|
1998-10-28 21:52:48 +00:00
|
|
|
# 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"
|
|
|
|
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
|
|
|
|
|
1998-11-12 00:06:47 +00:00
|
|
|
# Wiretap check
|
|
|
|
AC_MSG_CHECKING(whether to include wiretap library)
|
|
|
|
AC_ARG_WITH(wiretap,
|
|
|
|
[ --with-wiretap Include wiretap library.
|
|
|
|
--without-wiretap Don't include wiretap library (default)],
|
|
|
|
[ case "$withval" in
|
|
|
|
yes)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(WITH_WIRETAP)
|
|
|
|
CFLAGS="$CFLAGS -Iwiretap"
|
|
|
|
LIBWIRETAP_A="wiretap/libwiretap.a"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
LIBWIRETAP_A=""
|
|
|
|
;;
|
|
|
|
esac ],
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
AC_SUBST(LIBWIRETAP_A)
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
dnl Checks for header files.
|
1998-10-12 01:40:57 +00:00
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(fcntl.h strings.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)
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
# AC_C_CONST
|
|
|
|
|
1998-11-15 05:40:23 +00:00
|
|
|
# We need libpcap's AC_LBL_SOCKADDR_SA_LEN test for get_interface_list().
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1998-11-15 05:40:23 +00:00
|
|
|
AC_LBL_SOCKADDR_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)
|
|
|
|
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
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_CONFIG_SUBDIRS(wiretap)
|
|
|
|
AC_OUTPUT(Makefile)
|