Add ability to follow UDP stream by index
[metze/wireshark/wip.git] / configure.ac
index 42c01ec7b3771cd457af3570a593f5f06e1de0f5..89a15d44478e32a1fca70b05762adc53bb9d9155 100644 (file)
@@ -239,6 +239,9 @@ AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
 # 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],
@@ -506,6 +509,23 @@ AC_SUBST(OSX_MIN_VERSION)
 #
 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
 #
@@ -2648,10 +2668,29 @@ AC_C_BIGENDIAN
 # 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)
@@ -2733,6 +2772,14 @@ AC_CHECK_FUNC(strptime,
   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)