* Modified Makefile.am and configure.in so that wiretap isn't built unless
[obnox/wireshark/wip.git] / wiretap / configure.in
index b52222fec2d4b800ca324b349de4738f72382649..b0acfdcfd35d7b963d81daf615253a5099f7fc38 100644 (file)
@@ -1,13 +1,44 @@
-# $Id: configure.in,v 1.1 1998/11/12 00:06:45 gram Exp $
+# $Id: configure.in,v 1.6 1999/01/13 04:14:29 gerald 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)
 
-#AC_PROG_RANLIB
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
 
-# Pcap checks (copied from ethereal)
-AC_CHECK_HEADER(pcap.h,, AC_MSG_ERROR(Header file pcap.h not found.))
+# 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
+
+# GTK checks (copied from ethereal)
+AM_PATH_GTK(1.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",
+                   AC_MSG_ERROR(GTK+ distribution not found.))
+
+# 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