* Modified Makefile.am and configure.in so that wiretap isn't built unless
[obnox/wireshark/wip.git] / wiretap / configure.in
index 7df642bf809a640d9052c73756744c3cba5bc4c3..b0acfdcfd35d7b963d81daf615253a5099f7fc38 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.5 1998/11/21 03:26:54 guy 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)
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(wtap.c)
 AM_INIT_AUTOMAKE(libwtap.a, 0.0.0)
@@ -21,6 +21,25 @@ fi
 AM_PATH_GTK(1.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",
                    AC_MSG_ERROR(GTK+ distribution not found.))
 
 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
 AC_CHECK_HEADERS(unistd.h)
 dnl Checks for header files
 AC_HEADER_STDC
 AC_CHECK_HEADERS(unistd.h)