-# $Id: configure.in,v 1.221 2003/09/10 07:17:21 jmayer Exp $
+# $Id: configure.in,v 1.245 2004/01/18 16:24:58 jmayer 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_CANONICAL_HOST
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(ethereal, 0.9.15)
+AM_INIT_AUTOMAKE(ethereal, 0.10.0a)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_LEX
AC_PATH_PROG(PERL, perl)
AC_PATH_PROG(POD2MAN, pod2man)
+if test "x$POD2MAN" = x
+then
+ #
+ # The alternative is not to build the man pages....
+ #
+ AC_MSG_ERROR(I couldn't find pod2man; make sure it's installed and in your path)
+fi
AC_PATH_PROG(LEX, flex)
AC_PATH_PROG(PYTHON, python)
[
if test $withval != no
then
- ethereal_extra_gcc_flags=" -Wcast-qual -Wcast-align"
+ ethereal_extra_gcc_flags=" -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wstrict-prototypes"
fi
],)
AC_MSG_CHECKING(to see if we can add '-Wall -W$ethereal_extra_gcc_flags' to CFLAGS)
[ --enable-threads use threads in ethereal. [default=no]],enable_threads=$enableval,enable_threads=no)
AM_CONDITIONAL(USE_THREADS, test x$enable_threads = xyes)
+AC_ARG_ENABLE(profile-build,
+[ --enable-profile-build build profile-ready binaries. [default=no]],enable_profile_build=$enableval,enable_profile_build=no)
+AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)
+AC_MSG_CHECKING(if profile builds must be generated)
+if test "x$enable_profile_build" = "xyes" ; then
+ if test -n "$GCC" ; then
+ AC_MSG_RESULT(yes)
+ CFLAGS=" -pg $CFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ echo "Building profile binaries currently only supported for GCC."
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
# GTK checks
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
# programs to be built with GTK+.
AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
fi
else
- ethereal_bin="ethereal"
+ ethereal_bin="ethereal\$(EXEEXT)"
ethereal_man="ethereal.1"
ethereal_SUBDIRS="gtk"
# Honor GLIB_CFLAGS
AC_SUBST(ethereal_bin)
AC_SUBST(ethereal_man)
+rdps_bin="rdps\$(EXEEXT)"
+AC_SUBST(rdps_bin)
# Enable/disable tethereal
[ --enable-tethereal build tethereal. [default=yes]],tethereal=$enableval,enable_tethereal=yes)
if test "x$enable_tethereal" = "xyes" ; then
- tethereal_bin="tethereal"
+ tethereal_bin="tethereal\$(EXEEXT)"
tethereal_man="tethereal.1"
+ etherealfilter_man="ethereal-filter.4"
else
tethereal_bin=""
tethereal_man=""
fi
AC_SUBST(tethereal_bin)
AC_SUBST(tethereal_man)
+AC_SUBST(etherealfilter_man)
[ --enable-editcap build editcap. [default=yes]],enable_editcap=$enableval,enable_editcap=yes)
if test "x$enable_editcap" = "xyes" ; then
- editcap_bin="editcap"
+ editcap_bin="editcap\$(EXEEXT)"
editcap_man="editcap.1"
else
editcap_bin=""
[ --enable-mergecap build mergecap. [default=yes]],enable_mergecap=$enableval,enable_mergecap=yes)
if test "x$enable_mergecap" = "xyes" ; then
- mergecap_bin="mergecap"
+ mergecap_bin="mergecap\$(EXEEXT)"
mergecap_man="mergecap.1"
else
mergecap_bin=""
[ --enable-text2pcap build text2pcap. [default=yes]],text2pcap=$enableval,enable_text2pcap=yes)
if test "x$enable_text2pcap" = "xyes" ; then
- text2pcap_bin="text2pcap"
+ text2pcap_bin="text2pcap\$(EXEEXT)"
text2pcap_man="text2pcap.1"
else
text2pcap_bin=""
[ --enable-dftest build dftest. [default=no]],enable_dftest=$enableval,enable_dftest=no)
if test "x$enable_dftest" = "xyes" ; then
- dftest_bin="dftest"
+ dftest_bin="dftest\$(EXEEXT)"
else
dftest_bin=""
fi
[ --enable-randpkt build randpkt. [default=no]],enable_randpkt=$enableval,enable_randpkt=no)
if test "x$enable_randpkt" = "xyes" ; then
- randpkt_bin="randpkt"
+ randpkt_bin="randpkt\$(EXEEXT)"
else
randpkt_bin=""
fi
else
AC_MSG_RESULT(yes)
AC_ETHEREAL_PCAP_CHECK
- AC_ETHEREAL_PCAP_VERSION_CHECK
fi
dnl zlib check
fi
+dnl pcre check
+AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
+
+AC_ARG_WITH(pcre,
+changequote(<<, >>)dnl
+<< --with-pcre[=DIR] use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions. [default=yes, if present]>>,
+changequote([, ])dnl
+[
+ if test $withval = no
+ then
+ want_pcre=no
+ elif test $withval = yes
+ then
+ want_pcre=yes
+ else
+ want_pcre=yes
+ pcre_dir=$withval
+ fi
+],[
+ #
+ # Use libpcre if it's present, otherwise don't.
+ #
+ want_pcre=ifpresent
+ pcre_dir=
+])
+if test "x$want_pcre" = "xno" ; then
+ AC_MSG_RESULT(no)
+else
+ AC_MSG_RESULT(yes)
+ AC_ETHEREAL_LIBPCRE_CHECK
+ if test "x$want_pcre" = "xno" ; then
+ AC_MSG_RESULT(libpcre not found - disabling support for perl compatible regular expressions in dfilters)
+ fi
+fi
+
+
dnl ipv6 check
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 use ipv6 name resolution, if available. [default=yes]],enable_ipv6=$enableval,enable_ipv6=yes)
dnl other choices for flags to use here: could also use
dnl --prefix or --exec-prefix if you don't want the full list.
+ #
+ # Save the current settings of CFLAGS and CPPFLAGS, and add
+ # the output of "$NETSNMPCONFIG --cflags" to it, so that when
+ # searching for the Net-SNMP headers, we look in whatever
+ # directory that output specifies.
+ #
+ ethereal_save_CFLAGS="$CFLAGS"
+ ethereal_save_CPPFLAGS="$CPPFLAGS"
+ CFLAGS="$CFLAGS `$NETSNMPCONFIG --cflags`"
+ CPPFLAGS="$CPPFLAGS `$NETSNMPCONFIG --cflags`"
+
AC_CHECK_HEADERS(net-snmp/net-snmp-config.h net-snmp/library/default_store.h)
if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = "xyes" -a "x$ac_cv_header_net_snmp_library_default_store_h" = "xyes" ; then
- CFLAGS="$CFLAGS `net-snmp-config --cflags`"
- CPPFLAGS="$CPPLAGS `net-snmp-config --cflags`"
- SNMP_LIBS=`net-snmp-config --libs`
+ SNMP_LIBS=`$NETSNMPCONFIG --libs`
AC_DEFINE(HAVE_NET_SNMP, 1, [Define to enable support for NET-SNMP])
have_net_snmp="yes"
else
# headers. This would likely be a broken system to
# try and use anyway.
NETSNMPCONFIG="no"
+
+ #
+ # Restore the versions of CFLAGS and CPPFLAGS before
+ # we added the output of '$NETSNMPCONFIG --cflags",
+ # as we didn't actually find Net-SNMP there.
+ #
+ CFLAGS="$ethereal_save_CFLAGS"
+ CPPFLAGS="$ethereal_save_CPPFLAGS"
fi
else
AC_MSG_CHECKING(whether to use UCD SNMP library if available)
dnl ADNS Check
ADNS_LIBS=''
AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
-if test "x$enable_adns" = "xno" ; then
+if test "x$with_adns" = "xno" ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_SUBST(plugindir)
dnl libtool defs
+#
+# Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
+# (autoconf? automake? libtool?) - with the newer version(s), it's
+# just an alias for AC_PROG_LIBTOOL, which is called earlier.
+#
+# With older version(s) of those tool(s), however, it's not just an
+# alias, and the configure scripts don't work without it.
+#
+AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
Makefile
doc/Makefile
gtk/Makefile
+ help/Makefile
packaging/Makefile
packaging/nsis/Makefile
packaging/rpm/Makefile
packaging/svr4/checkinstall
packaging/svr4/pkginfo
plugins/Makefile
+ plugins/acn/Makefile
plugins/artnet/Makefile
+ plugins/asn1/Makefile
plugins/docsis/Makefile
+ plugins/enttec/Makefile
plugins/giop/Makefile
plugins/gryphon/Makefile
+ plugins/irda/Makefile
plugins/lwres/Makefile
plugins/megaco/Makefile
plugins/mgcp/Makefile
plugins/pcli/Makefile
+ plugins/rdm/Makefile
plugins/rtnet/Makefile
+ plugins/v5ua/Makefile
tools/Makefile
tools/lemon/Makefile
,)
zlib_message="yes"
fi
-if test "x$want_adns" = "xno" ; then
- adns_message="no"
+if test "x$want_pcre" = "xno" ; then
+ pcre_message="no"
else
+ pcre_message="yes"
+fi
+
+if test "x$have_good_adns" = "xyes" ; then
adns_message="yes"
+else
+ adns_message="no"
fi
if test "x$NETSNMPCONFIG" != "xno" -a "x$NETSNMPCONFIG" != "x" -a -x "$NETSNMPCONFIG" ; then
echo " Use GTK+ v2 library : $enable_gtk2"
if test "x$enable_gtk2" = "xyes" ; then
echo " Use threads : $enable_threads"
+echo " Build profile binaries : $enable_profile_build"
fi
echo " Use pcap library : $want_pcap"
echo " Use zlib library : $zlib_message"
+echo " Use pcre library : $pcre_message"
echo " Use GNU ADNS library : $adns_message"
echo " Use IPv6 name resolution : $enable_ipv6"
echo " Use UCD SNMP/NET-SNMP library : $snmp_libs_message"