You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/10/27 22:37:04 UTC

[39/50] [abbrv] git commit: TS-2291: Make configure.ac cleaner for remap_stats checks

TS-2291: Make configure.ac cleaner for remap_stats checks


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/22e33c53
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/22e33c53
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/22e33c53

Branch: refs/heads/5.0.x
Commit: 22e33c53fc968062554ffb785b7956315dfab5b6
Parents: 6da424f
Author: Phil Sorber <so...@apache.org>
Authored: Wed Oct 23 11:26:43 2013 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Oct 23 11:26:43 2013 -0600

----------------------------------------------------------------------
 configure.ac | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/22e33c53/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index b25a6fb..b4fda1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1788,13 +1788,18 @@ AC_CHECK_TYPE([struct tcp_info],
 )
 AM_CONDITIONAL([BUILD_TCPINFO_PLUGIN], [ test "x${enable_tcpinfo_plugin}" != "xno" ])
 
-AC_SEARCH_LIBS([hcreate_r],
-  [],
-  [enable_remap_stats_plugin=yes],
-  [enable_remap_stats_plugin=no],
-  []
-)
-AM_CONDITIONAL([BUILD_REMAP_STATS_PLUGIN], [ test "x${enable_remap_stats_plugin}" != "xno" ])
+# See if we can build the remap_stats plugin
+AS_IF([test "x$enable_experimental_plugins" = xyes],
+  [
+    AC_CHECK_HEADERS([search.h])
+    AS_IF([test "x$ac_cv_header_search_h" = "xyes"],
+      [
+        AC_CHECK_TYPE([struct hsearch_data],[],[],[[#include <search.h>]])
+        AC_CHECK_FUNCS([hcreate_r hsearch_r])
+      ])
+  ])
+AM_CONDITIONAL([BUILD_REMAP_STATS_PLUGIN],
+  [ test "x$enable_experimental_plugins" = "xyes" -a "x$ac_cv_header_search_h" = "xyes" -a "x$ac_cv_type_struct_hsearch_data" = "xyes" -a "x$ac_cv_func_hcreate_r" = "xyes" -a "x$ac_cv_func_hsearch_r" = "xyes" ])
 
 #
 # use modular IOCORE