99 lines
2.2 KiB
Plaintext
99 lines
2.2 KiB
Plaintext
# $Id: configure.in,v 1.25 2000/10/17 07:30:35 guy Exp $
|
|
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
|
|
AC_INIT(wtap.c)
|
|
|
|
AC_PREREQ(2.13)
|
|
|
|
AM_INIT_AUTOMAKE(libwtap.a, 0.0.0)
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
dnl Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
AC_PROG_YACC
|
|
AM_PROG_LEX
|
|
AC_PROG_RANLIB
|
|
AC_PATH_PROG(LEX, flex)
|
|
|
|
AC_SUBST(FLEX_PATH)
|
|
|
|
# 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
|
|
|
|
#
|
|
# 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.
|
|
# "-Ae" for ANSI C plus extensions such as "long long".
|
|
# "+O2", for optimization. XXX - works with "-g"?
|
|
#
|
|
CFLAGS="-Ae +O2 $CFLAGS"
|
|
AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
|
|
;;
|
|
*)
|
|
AC_MSG_RESULT(none needed)
|
|
;;
|
|
esac
|
|
else
|
|
AC_MSG_RESULT(none needed)
|
|
fi
|
|
|
|
# Checks for glib first, or gtk+ if not present
|
|
AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS")
|
|
|
|
dnl Checks for header files
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(sys/time.h netinet/in.h unistd.h fcntl.h sys/stat.h sys/types.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
# We must know our byte order
|
|
AC_C_BIGENDIAN
|
|
|
|
#
|
|
# Look for libpcap, so we can include <pcap.h> in libpcap.c if it's
|
|
# found.
|
|
#
|
|
AC_WIRETAP_PCAP_CHECK
|
|
|
|
dnl zlib check
|
|
AC_ARG_ENABLE(zlib,
|
|
[ --enable-zlib use zlib to read compressed data. [default=yes]],,enable_zlib=yes)
|
|
|
|
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_WIRETAP_ZLIB_CHECK
|
|
if test "x$enable_zlib" = "xno" ; then
|
|
AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
|
|
fi
|
|
fi
|
|
|
|
AC_OUTPUT(Makefile)
|