You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by br...@apache.org on 2014/09/10 01:34:55 UTC

git commit: [TS-3069] Fixing mysql_remap build including lib

Repository: trafficserver
Updated Branches:
  refs/heads/master 9d3839f59 -> 5a911bbd3


[TS-3069] Fixing mysql_remap build including lib


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

Branch: refs/heads/master
Commit: 5a911bbd3b91e6efd656540a5b22f5f8c1d06fa1
Parents: 9d3839f
Author: Brian Geffon <br...@apache.org>
Authored: Tue Sep 9 16:34:47 2014 -0700
Committer: Brian Geffon <br...@apache.org>
Committed: Tue Sep 9 16:34:47 2014 -0700

----------------------------------------------------------------------
 configure.ac                                 | 15 ++++++++-------
 plugins/experimental/Makefile.am             |  5 ++++-
 plugins/experimental/mysql_remap/Makefile.am |  2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5a911bbd/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 7aa7cf0..e946d7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1926,14 +1926,15 @@ AC_CONFIG_FILES([
   tools/tsxs
 ])
 
-AS_IF([test "x$enable_experimental_plugins" = xyes], [
-  TS_FLAG_HEADERS([mysql/mysql.h], [
-    AC_CONFIG_FILES([
-      plugins/experimental/mysql_remap/Makefile
-    ])
-  ], [])
-          
+
+TS_FLAG_HEADERS([mysql/mysql.h], [has_mysql=1],[has_mysql=0])
+AC_CHECK_LIB([mysqlclient],[mysql_info],[AC_SUBST([LIB_MYSQLCLIENT],["-lmysqlclient"])],[has_mysql=0])
+AC_SUBST(has_mysql)
+AM_CONDITIONAL([HAS_MYSQL], [ test "x${has_mysql}" = "x1" ])
+
+AS_IF([test "x$enable_experimental_plugins" = xyes], [  
   AC_CONFIG_FILES([
+    plugins/experimental/mysql_remap/Makefile
     plugins/experimental/Makefile
     plugins/experimental/authproxy/Makefile
     plugins/experimental/background_fetch/Makefile

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5a911bbd/plugins/experimental/Makefile.am
----------------------------------------------------------------------
diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am
index 661e80d..7e5ab51 100644
--- a/plugins/experimental/Makefile.am
+++ b/plugins/experimental/Makefile.am
@@ -22,7 +22,6 @@ SUBDIRS = \
  channel_stats \
  collapsed_connection \
  custom_redirect \
- mysql_remap \
  epic \
  escalate \
  esi \
@@ -38,6 +37,10 @@ SUBDIRS = \
  url_sig \
  xdebug
 
+if HAS_MYSQL
+  SUBDIRS += mysql_remap
+endif
+
 if BUILD_LUAJIT
   SUBDIRS += ts_lua
 endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5a911bbd/plugins/experimental/mysql_remap/Makefile.am
----------------------------------------------------------------------
diff --git a/plugins/experimental/mysql_remap/Makefile.am b/plugins/experimental/mysql_remap/Makefile.am
index d4cdfd5..afcd540 100644
--- a/plugins/experimental/mysql_remap/Makefile.am
+++ b/plugins/experimental/mysql_remap/Makefile.am
@@ -18,4 +18,4 @@ include $(top_srcdir)/build/plugins.mk
 
 pkglib_LTLIBRARIES = mysql_remap.la
 mysql_remap_la_SOURCES = mysql_remap.cc
-mysql_remap_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+mysql_remap_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS) $(LIB_MYSQLCLIENT)