#
m4_define([version_major], [1])
m4_define([version_minor], [99])
-m4_define([version_micro], [1])
+m4_define([version_micro], [2])
m4_define([version_micro_extra], version_micro)
m4_append([version_micro_extra], [])
AC_PATH_PROG(PERL, perl)
# Check for Python.
-AC_PATH_PROG(PYTHON, python)
+AC_PATH_PROGS(PYTHON, python, python3)
if test ! -z "$PYTHON"; then
#
# OK, we found Python; is it Python 2.5 or later?
# the comments in acolocal.m4
#
PKG_PROG_PKG_CONFIG
+if test -z "$PKG_CONFIG"; then
+ AC_MSG_ERROR(I couldn't find pkg-config; make sure it's installed and in your path)
+fi
AC_ARG_ENABLE(osx-deploy-target,
AC_HELP_STRING( [--enable-osx-deploy-target],
#
AC_SYS_LARGEFILE
+#
+# Look for math functions; use libm if necessary.
+#
+AC_SEARCH_LIBS(floor, m)
+AC_SEARCH_LIBS(ceil, m)
+AC_SEARCH_LIBS(exp, m)
+AC_SEARCH_LIBS(log, m)
+AC_SEARCH_LIBS(log10, m)
+AC_SEARCH_LIBS(floorl, m,
+ [
+ FLOORL_LO=""
+ AC_DEFINE(HAVE_FLOORL, 1, [Define if you have the floorl function.])
+ ],
+ FLOORL_LO="floorl.lo")
+AC_SUBST(FLOORL_LO)
+
+
#
# GUI toolkit options
#
fi
AC_SUBST(HAVE_OSX_PACKAGING)
+#
+# Use this as a proxy for "is this OS X" (just in case somebody actually
+# built and installed Darwin as an OS, perhaps with some X11-based GUI,
+# don't look for Darwin).
+#
+AC_CHECK_PROG(have_sw_vers, sw_vers, "yes", "no")
+AM_CONDITIONAL(NOT_OS_X, test "x$have_sw_vers" = "xno")
+
#
# Some compilers have to be told to fail when passed an unknown -W flag;
# make sure we do that.
AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wwrite-strings)
AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-long-long)
AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wheader-guard)
-
+AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunused-const-variable)
#
# The following are C only, not C++
#
AC_HELP_STRING( [--enable-wireshark],
[build the Wireshark GUI (with Gtk+, Qt, or both) @<:@default=yes@:>@]),
enable_wireshark=$enableval,enable_wireshark=yes)
+AM_CONDITIONAL(BUILDING_WIRESHARK, test x$enable_wireshark = xyes)
AC_ARG_ENABLE(packet-editor,
AC_HELP_STRING( [--enable-packet-editor],
# XXX - do we need this?
AC_PROG_GCC_TRADITIONAL
-AC_CHECK_FUNC(getopt,
+AC_CHECK_FUNC(getopt_long,
[
GETOPT_LO=""
- AC_DEFINE(HAVE_GETOPT, 1, [Define to 1 if you have the getopt function.])
+ AC_DEFINE(HAVE_GETOPT_LONG, 1, [Define to 1 if you have the getopt_long function.])
+
+ #
+ # Do we have optreset?
+ #
+ AC_MSG_CHECKING(whether optreset is defined)
+ AC_TRY_LINK([],
+ [
+ extern int optreset;
+
+ return optreset;
+ ],
+ ac_cv_pcap_debug_defined=yes,
+ ac_cv_pcap_debug_defined=no)
+ if test "$ac_cv_pcap_debug_defined" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if you have the optreset variable])
+ else
+ AC_MSG_RESULT(no)
+ fi
],
GETOPT_LO="wsgetopt.lo")
AC_SUBST(GETOPT_LO)
STRPTIME_LO="strptime.lo")
AC_SUBST(STRPTIME_LO)
+AC_CHECK_FUNC(popcount,
+ [
+ POPCOUNT_LO=""
+ AC_DEFINE(HAVE_POPCOUNT, 1, [Define if you have the popcount function.])
+ ],
+ POPCOUNT_LO="popcount.lo")
+AC_SUBST(POPCOUNT_LO)
+
AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
AC_CHECK_FUNCS(issetugid)
AC_CHECK_FUNCS(mmap mprotect sysconf)