-# $Id: configure.in,v 1.143 2001/12/23 21:11:23 gerald Exp $
+# $Id: configure.in,v 1.144 2002/01/09 23:21:54 gram 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
esac
fi
-#
-# Arrange that we search for header files in the source directory
-# and in its "wiretap" subdirectory, as well as in "/usr/local/include",
-# as various packages we use ("libpcap", "zlib", an SNMP library)
-# may have been installed under "/usr/local/include".
-#
-CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I\$(top_srcdir)/epan -I/usr/local/include"
-CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I\$(top_srcdir)/epan -I/usr/local/include"
+CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I\$(top_srcdir)/epan"
+CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I\$(top_srcdir)/epan"
-#
-# Arrange that we search for libraries in "/usr/local/lib".
-#
-AC_ETHEREAL_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+dnl Look in /usr/local for header files and libraries ?
+AC_ARG_ENABLE(usr-local,
+[ --enable-usr-local look for headers and libs in /usr/local tree. [default=yes]],enable_usr_local=$enableval,enable_usr_local=yes)
+
+AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
+if test "x$enable_usr_local" = "xyes" ; then
+ AC_MSG_RESULT(yes)
+ #
+ # Arrange that we search for header files in the source directory
+ # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
+ # as various packages we use ("libpcap", "zlib", an SNMP library)
+ # may have been installed under "/usr/local/include".
+ #
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+
+ #
+ # Arrange that we search for libraries in "/usr/local/lib".
+ #
+ AC_ETHEREAL_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+else
+ AC_MSG_RESULT(no)
+fi
# Create DATAFILE_DIR #define for config.h
DATAFILE_DIR=$sysconfdir
-# $Id: configure.in,v 1.31 2001/12/07 22:56:58 guy Exp $
+# $Id: configure.in,v 1.32 2002/01/09 23:21:55 gram 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
# Check for glib.
AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS")
-#
-# Arrange that we search for header files in "/usr/local/include",
-# as various packages we use ("libpcap", "zlib") may have been installed
-# under "/usr/local/include".
-#
-# We do this after checking for GLib, so that "-I/usr/local/include"
-# comes after any "-I" flags added by "AM_PATH_GLIB"; if the user has
-# installed a pre-1.2.9 version of GLib, it'd probably go under
-# "/usr/local", and if they then install 1.2.9 or later without
-# uninstalling the pre-1.2.9 version, 1.2.9's header files won't be
-# in "/usr/local/include" (they're put in a separate directory so that
-# GLib 1.2[.x] and 1.3[.x]/2.x can coexist), and if we search
-# "/usr/local/include" before searching the directory "AM_PATH_GLIB"
-# specifies, we may pick up headers from the older version.
-#
-CFLAGS="$CFLAGS -I/usr/local/include"
-CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+dnl Look in /usr/local for header files and libraries ?
+AC_ARG_ENABLE(usr-local,
+[ --enable-usr-local look for headers and libs in /usr/local tree. [default=yes]],enable_usr_local=$enableval,enable_usr_local=yes)
-#
-# Arrange that we search for libraries in "/usr/local/lib", as we'll
-# be testing whether zlib has gzseek, and we need to be able to find
-# zlib even if it's in "/usr/local/lib".
-#
-# We do this after checking for GLib; see above.
-#
-LDFLAGS="$LDFLAGS -L/usr/local/lib"
+AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
+if test "x$enable_usr_local" = "xyes" ; then
+ AC_MSG_RESULT(yes)
+ #
+ # Arrange that we search for header files in "/usr/local/include",
+ # as various packages we use ("libpcap", "zlib") may have been installed
+ # under "/usr/local/include".
+ #
+ # We do this after checking for GLib, so that "-I/usr/local/include"
+ # comes after any "-I" flags added by "AM_PATH_GLIB"; if the user has
+ # installed a pre-1.2.9 version of GLib, it'd probably go under
+ # "/usr/local", and if they then install 1.2.9 or later without
+ # uninstalling the pre-1.2.9 version, 1.2.9's header files won't be
+ # in "/usr/local/include" (they're put in a separate directory so that
+ # GLib 1.2[.x] and 1.3[.x]/2.x can coexist), and if we search
+ # "/usr/local/include" before searching the directory "AM_PATH_GLIB"
+ # specifies, we may pick up headers from the older version.
+ #
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+
+ #
+ # Arrange that we search for libraries in "/usr/local/lib", as we'll
+ # be testing whether zlib has gzseek, and we need to be able to find
+ # zlib even if it's in "/usr/local/lib".
+ #
+ # We do this after checking for GLib; see above.
+ #
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+else
+ AC_MSG_RESULT(no)
+fi
dnl Checks for header files
AC_HEADER_STDC