-# $Id: configure.in,v 1.123 2001/05/01 02:44:51 guy Exp $
+# $Id: configure.in,v 1.140 2001/11/02 10:01:00 guy 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
AC_PREREQ(2.13)
-AM_INIT_AUTOMAKE(ethereal, 0.8.17)
-
-AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
+AM_INIT_AUTOMAKE(ethereal, 0.8.20)
dnl Check for CPU / vendor / OS
AC_CANONICAL_HOST
AC_SUBST(LEX)
AC_SUBST(PYTHON)
-
# Check for packaging utilities
# For now, we check to see if the various packaging utilites are in our
# path. I'm too lazy to write code to go hunt for them. - Gerald
# 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"
+ CFLAGS="-Wall -W -Wno-unused $CFLAGS"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
;;
esac
else
- AC_MSG_RESULT(none needed)
+ case "$host_os" in
+ solaris*)
+ # the X11 headers don't automatically include prototype info
+ # and a lot don't include the return type
+ CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15"
+ AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
+ ;;
+ darwin*)
+ CFLAGS="-traditional-cpp $CFLAGS"
+ AC_MSG_RESULT(Apple cc compiler - added -traditional-cpp)
+ ;;
+ *)
+ AC_MSG_RESULT(none needed)
+ ;;
+ esac
fi
#
LIBS="$ac_save_LIBS"
if test "$ac_cv_glib_supports_modules" = yes ; then
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_PLUGINS)
+ have_plugins=yes
else
AC_MSG_RESULT(no)
+ have_plugins=no
fi
AC_SUBST(editcap_man)
+# Enable/disable mergecap
+
+AC_ARG_ENABLE(mergecap,
+[ --enable-mergecap build mergecap. [default=yes]],,enable_mergecap=yes)
+
+if test "x$enable_mergecap" = "xyes" ; then
+ mergecap_bin="mergecap"
+ mergecap_man="mergecap.1"
+else
+ mergecap_bin=""
+ mergecap_man=""
+fi
+AC_SUBST(mergecap_bin)
+AC_SUBST(mergecap_man)
+
+
+# Enable/disable text2pcap
+
+AC_ARG_ENABLE(text2pcap,
+[ --enable-text2pcap build text2pcap. [default=yes]],,enable_text2pcap=yes)
+
+if test "x$enable_text2pcap" = "xyes" ; then
+ text2pcap_bin="text2pcap"
+ text2pcap_man="text2pcap.1"
+else
+ text2pcap_bin=""
+ text2pcap_man=""
+fi
+AC_SUBST(text2pcap_bin)
+AC_SUBST(text2pcap_man)
+
+# Enable/disable idl2eth
+
+AC_ARG_ENABLE(idl2eth,
+[ --enable-idl2eth build idl2eth. [default=yes]],,enable_idl2eth=yes)
+
+if test "x$enable_idl2eth" = "xyes" ; then
+ idl2eth_bin="idl2eth"
+ idl2eth_man="idl2eth.1"
+else
+ idl2eth_bin=""
+ idl2eth_man=""
+fi
+AC_SUBST(idl2eth_bin)
+AC_SUBST(idl2eth_man)
+
+
# Enable/disable dftest
AC_ARG_ENABLE(dftest,
AC_ETHEREAL_SOCKET_LIB_CHECK
dnl pcap check
-AC_ARG_ENABLE(pcap,
-[ --enable-pcap use libpcap for packet capturing. [default=yes]],,enable_pcap=yes)
-
AC_MSG_CHECKING(whether to use libpcap for packet capture)
-if test "x$enable_pcap" = "xno" ; then
+
+AC_ARG_WITH(pcap,
+[ --with-pcap[=DIR] use libpcap for packet capturing. [default=yes]],
+[
+ if test $withval = no
+ then
+ want_pcap=no
+ elif test $withval = yes
+ then
+ want_pcap=yes
+ else
+ want_pcap=yes
+ pcap_dir=$withval
+ fi
+],[
+ want_pcap=yes
+ pcap_dir=
+])
+if test "x$want_pcap" = "xno" ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_ETHEREAL_PCAP_CHECK
+ AC_ETHEREAL_PCAP_VERSION_CHECK
fi
dnl zlib check
AC_MSG_RESULT(yes)
fi
+AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
+
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(stddef.h)
AC_CHECK_HEADERS(arpa/inet.h)
+AC_CHECK_HEADERS(iconv.h)
dnl SSL Check
SSL_LIBS=''
if test "$ac_cv_func_mkstemp" = no ; then
MKSTEMP_C="mkstemp.c"
MKSTEMP_O="mkstemp.o"
- AC_DEFINE(NEED_MKSTEMP)
fi
AC_SUBST(MKSTEMP_C)
AC_SUBST(MKSTEMP_O)
+AC_CHECK_FUNC(strptime, STRPTIME_O="",
+ STRPTIME_O="strptime.o" [AC_DEFINE(NEED_STRPTIME_H)])
+if test "$ac_cv_func_strptime" = no ; then
+ STRPTIME_C="strptime.c"
+ STRPTIME_O="strptime.o"
+fi
+AC_SUBST(STRPTIME_C)
+AC_SUBST(STRPTIME_O)
+
AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
dnl blank for now, but will be used in future
AC_SUBST(ethereal_SUBDIRS)
+dnl
+dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.in
+dnl
PLUGIN_DIR="$libdir/ethereal/plugins/$VERSION"
-AC_ARG_WITH(plugindir,
- [ --with-plugindir=DIR install plugins in DIR],
+AC_ARG_WITH(plugins,
+ [ --with-plugins[=DIR] support plugins (installed in DIR, if supplied).],
[
case "$withval" in
"" | y | ye | yes )
- AC_MSG_ERROR([*** You must supply an argument to the --with-plugindir option.])
- ;;
+ if test x$have_plugins = xno
+ then
+ AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
+ fi
+ ;;
n | no)
- AC_MSG_ERROR([*** The --without-plugindir option is not supported.])
- ;;
- *) PLUGIN_DIR="$withval"
+ have_plugins=no
+ ;;
+ *)
+ if test x$have_plugins = xno
+ then
+ AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
+ fi
+ PLUGIN_DIR="$withval"
+ ;;
esac
]
)
-PLUGIN_DIR=`(
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
- eval echo "$PLUGIN_DIR"
-)`
-AC_DEFINE_UNQUOTED(PLUGIN_DIR,"$PLUGIN_DIR", [Plugin installation directory])
+AM_CONDITIONAL(HAVE_PLUGINS, test x$have_plugins = xyes)
+if test x$have_plugins = xyes
+then
+ AC_DEFINE(HAVE_PLUGINS)
+ PLUGIN_DIR=`(
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
+ eval echo "$PLUGIN_DIR"
+ )`
+ AC_DEFINE_UNQUOTED(PLUGIN_DIR,"$PLUGIN_DIR", [Plugin installation directory])
+else
+ AC_DEFINE(PLUGIN_DIR,NULL)
+fi
AC_SUBST(PLUGIN_DIR)
dnl libtool defs
plugins/Makefile
plugins/gryphon/Makefile
plugins/mgcp/Makefile
+ plugins/giop/Makefile
tools/Makefile
tools/lemon/Makefile
,)
echo " Build ethereal : $enable_ethereal"
echo " Build tethereal : $enable_tethereal"
echo " Build editcap : $enable_editcap"
+echo " Build mergecap : $enable_mergecap"
+echo " Build text2pcap : $enable_text2pcap"
+echo " Build idl2eth : $enable_idl2eth"
echo " Build randpkt : $enable_randpkt"
echo " Build dftest : $enable_dftest"
echo ""
echo " Install setuid : $setuid_message"
-echo " Use pcap library : $enable_pcap"
+echo " Use plugins : $have_plugins"
+echo " Use pcap library : $want_pcap"
echo " Use zlib library : $enable_zlib"
echo " Use IPv6 name resolution : $enable_ipv6"
echo " Use SNMP library : $snmp_libs_message"
-
-