summaryrefslogtreecommitdiff
path: root/wiretap/configure.in
blob: ddadbef14d238a8d82ceff8d134bc7343ed4ed53 (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
# $Id: configure.in,v 1.9 1999/03/28 18:32:02 gram Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(wtap.c)
AM_INIT_AUTOMAKE(libwtap.a, 0.0.0)
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_YACC
AM_PROG_LEX

# 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

# Wiretap check (copied and modified from ethereal)
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)
			LIBWIRETAP_A="libwiretap.a"
			;;
		*)
			AC_MSG_RESULT(no)
			LIBWIRETAP_A=""
			;;
	esac ],
	AC_MSG_RESULT(no)
)
AC_SUBST(LIBWIRETAP_A)

dnl Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)

AC_OUTPUT(Makefile)