aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/configure.in
blob: 2d4334c0546b2bdc8d9980dc2072fdffaa5955a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# $Id: configure.in,v 1.22 2000/08/11 13:32:35 deniel 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

# Checks for glib first, or gtk+ if not present
AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS")

if test "x$GLIB_CFLAGS" = x ; then
 AM_PATH_GTK(1.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",
                    AC_MSG_ERROR(GTK+ library not found.))
 AC_DEFINE(HAVE_GLIB10)
fi

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

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)