# 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
#
# 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)