trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: Reworks yaml-cpp build flags
Date Thu, 21 Jun 2018 22:07:30 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 4001105  Reworks yaml-cpp build flags
4001105 is described below

commit 4001105011dfa54df0898e12bbf7929b35498e7b
Author: Randall Meyer <randallmeyer@yahoo.com>
AuthorDate: Tue Jun 19 15:21:57 2018 -0700

    Reworks yaml-cpp build flags
    
    This includes renaming and localizing usage of them
---
 build/yaml-cpp.m4                 | 22 +++++++++++++---------
 configure.ac                      |  2 ++
 iocore/net/Makefile.am            | 13 ++++++++-----
 proxy/logging/Makefile.am         |  3 ++-
 src/traffic_logcat/Makefile.inc   |  8 ++++++--
 src/traffic_logstats/Makefile.inc |  6 +++++-
 src/traffic_manager/Makefile.inc  |  5 +++--
 src/traffic_server/Makefile.inc   |  6 +++++-
 8 files changed, 44 insertions(+), 21 deletions(-)

diff --git a/build/yaml-cpp.m4 b/build/yaml-cpp.m4
index 444939b..67c5b13 100644
--- a/build/yaml-cpp.m4
+++ b/build/yaml-cpp.m4
@@ -54,17 +54,17 @@ AC_ARG_WITH(yaml-cpp, [AC_HELP_STRING([--with-yaml-cpp=DIR],[use a specific
yaml
 if test "$has_yaml_cpp" != "no"; then
   saved_ldflags=$LDFLAGS
   saved_cppflags=$CPPFLAGS
-  yaml_cpp_have_headers=0
-  yaml_cpp_have_libs=0
+
+  YAMLCPP_LIBS=-lyaml-cpp
   if test "$yaml_cpp_base_dir" != "/usr"; then
-    TS_ADDTO(CPPFLAGS, [-I${yaml_cpp_include}])
-    TS_ADDTO(LDFLAGS, [-L${yaml_cpp_ldflags}])
+    YAMLCPP_INCLUDES=-I${yaml_cpp_include}
+    YAMLCPP_LDFLAGS=-L${yaml_cpp_ldflags}
+
     TS_ADDTO_RPATH(${yaml_cpp_ldflags})
   fi
 
   if test "$yaml_cpp_include" != "0"; then
-    AC_SUBST([LIB_YAMLCPP], [-lyaml-cpp])
-    AC_SUBST([CFLAGS_YAMLCPP], [-I${yaml_cpp_include}])
+    YAMLCPP_INCLUDES=-I${yaml_cpp_include}
   else
     has_yaml_cpp=no
     CPPFLAGS=$saved_cppflags
@@ -74,9 +74,13 @@ fi
 ],
 [
   has_yaml_cpp=no
-  TS_ADDTO(CPPFLAGS, [-I\${abs_top_srcdir}/lib/yamlcpp/include])
-  TS_ADDTO(LDFLAGS, [-L\${abs_top_builddir}/lib/yamlcpp])
-  AC_SUBST([LIB_YAMLCPP], [-lyamlcpp])
+  YAMLCPP_INCLUDES=-I\${abs_top_srcdir}/lib/yamlcpp/include
+  YAMLCPP_LIBS=-lyamlcpp
+  YAMLCPP_LDFLAGS=-L\${abs_top_builddir}/lib/yamlcpp
 ])
 
+AC_SUBST([YAMLCPP_INCLUDES])
+AC_SUBST([YAMLCPP_LIBS])
+AC_SUBST([YAMLCPP_LDFLAGS])
+
 ])
diff --git a/configure.ac b/configure.ac
index f298398..5870972 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2096,4 +2096,6 @@ AC_MSG_NOTICE([Build option summary:
     TS_INCLUDES:        $TS_INCLUDES
     OPENSSL_LDFLAGS:    $OPENSSL_LDFLAGS
     OPENSSL_INCLUDES:   $OPENSSL_INCLUDES
+    YAMLCPP_LDFLAGS:    $YAMLCPP_LDFLAGS
+    YAMLCPP_INCLUDES:   $YAMLCPP_INCLUDES
 ])
diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index 825ec46..dfb2bc9 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS += \
 	-I$(abs_top_srcdir)/mgmt/utils \
 	-I$(abs_top_srcdir)/proxy/http \
 	$(TS_INCLUDES) \
-	@OPENSSL_INCLUDES@
+	@OPENSSL_INCLUDES@ \
+	@YAMLCPP_INCLUDES@
 
 TESTS = $(check_PROGRAMS)
 
@@ -37,7 +38,8 @@ noinst_LIBRARIES = libinknet.a
 
 test_certlookup_LDFLAGS = \
 	@AM_LDFLAGS@ \
-	@OPENSSL_LDFLAGS@
+	@OPENSSL_LDFLAGS@ \
+	@YAMLCPP_LDFLAGS@
 
 test_certlookup_SOURCES = \
 	test_certlookup.cc \
@@ -48,7 +50,7 @@ test_certlookup_LDADD = \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	$(top_builddir)/iocore/eventsystem/libinkevent.a \
 	$(top_builddir)/proxy/ParentSelectionStrategy.o \
-	@LIB_YAMLCPP@
+	@YAMLCPP_LIBS@
 
 test_UDPNet_CPPFLAGS = \
 	$(AM_CPPFLAGS) \
@@ -63,7 +65,8 @@ test_UDPNet_CPPFLAGS = \
 
 test_UDPNet_LDFLAGS = \
 	@AM_LDFLAGS@ \
-	@OPENSSL_LDFLAGS@
+	@OPENSSL_LDFLAGS@ \
+	@YAMLCPP_LDFLAGS@
 
 test_UDPNet_LDADD = \
 	libinknet.a \
@@ -73,7 +76,7 @@ test_UDPNet_LDADD = \
 	$(top_builddir)/lib/ts/libtsutil.la \
 	$(top_builddir)/proxy/ParentSelectionStrategy.o \
 	$(top_builddir)/lib/tsconfig/libtsconfig.la \
-	@LIBTCL@ @HWLOC_LIBS@ @OPENSSL_LIBS@ @LIB_YAMLCPP@
+	@LIBTCL@ @HWLOC_LIBS@ @OPENSSL_LIBS@ @YAMLCPP_LIBS@
 
 test_UDPNet_SOURCES = \
 	test_I_UDPNet.cc
diff --git a/proxy/logging/Makefile.am b/proxy/logging/Makefile.am
index c26adeb..ed8d6e1 100644
--- a/proxy/logging/Makefile.am
+++ b/proxy/logging/Makefile.am
@@ -29,7 +29,8 @@ AM_CPPFLAGS += \
 	-I$(abs_top_srcdir)/proxy/shared \
 	-I$(abs_top_srcdir)/mgmt \
 	-I$(abs_top_srcdir)/mgmt/utils \
-	$(TS_INCLUDES)
+	$(TS_INCLUDES) \
+	@YAMLCPP_INCLUDES@
 
 EXTRA_DIST = LogStandalone.cc
 
diff --git a/src/traffic_logcat/Makefile.inc b/src/traffic_logcat/Makefile.inc
index 38cbad1..80dac6d 100644
--- a/src/traffic_logcat/Makefile.inc
+++ b/src/traffic_logcat/Makefile.inc
@@ -31,8 +31,12 @@ traffic_logcat_traffic_logcat_CPPFLAGS = \
 	-I$(abs_top_srcdir)/mgmt/utils \
 	$(TS_INCLUDES)
 
+traffic_logcat_traffic_logcat_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	@YAMLCPP_LDFLAGS@
+
 traffic_logcat_traffic_logcat_SOURCES = \
-    traffic_logcat/logcat.cc
+	traffic_logcat/logcat.cc
 
 traffic_logcat_traffic_logcat_LDADD = \
 	$(top_builddir)/proxy/logging/liblogging.a \
@@ -45,5 +49,5 @@ traffic_logcat_traffic_logcat_LDADD = \
 
 traffic_logcat_traffic_logcat_LDADD += \
 	@LIBTCL@ @HWLOC_LIBS@ \
-	@LIB_YAMLCPP@ \
+	@YAMLCPP_LIBS@ \
 	@LIBPROFILER@ -lm
diff --git a/src/traffic_logstats/Makefile.inc b/src/traffic_logstats/Makefile.inc
index f0ae8d5..78a3929 100644
--- a/src/traffic_logstats/Makefile.inc
+++ b/src/traffic_logstats/Makefile.inc
@@ -31,6 +31,10 @@ traffic_logstats_traffic_logstats_CPPFLAGS = \
 	-I$(abs_top_srcdir)/mgmt/utils \
 	$(TS_INCLUDES)
 
+traffic_logstats_traffic_logstats_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	@YAMLCPP_LDFLAGS@
+
 TESTS += \
 	traffic_logstats/tests/test_logstats_json \
 	traffic_logstats/tests/test_logstats_summary
@@ -49,5 +53,5 @@ traffic_logstats_traffic_logstats_LDADD = \
 
 traffic_logstats_traffic_logstats_LDADD += \
   @LIBTCL@ @HWLOC_LIBS@ \
-  @LIB_YAMLCPP@ \
+  @YAMLCPP_LIBS@ \
   @LIBPROFILER@ -lm
diff --git a/src/traffic_manager/Makefile.inc b/src/traffic_manager/Makefile.inc
index 55d42cd..94c6438 100644
--- a/src/traffic_manager/Makefile.inc
+++ b/src/traffic_manager/Makefile.inc
@@ -31,9 +31,9 @@ traffic_manager_traffic_manager_CPPFLAGS = \
 	$(TS_INCLUDES)
 
 traffic_manager_traffic_manager_LDFLAGS = \
-    $(AM_LDFLAGS) \
+	$(AM_LDFLAGS) \
 	@OPENSSL_LDFLAGS@ \
-	@LIB_YAMLCPP@
+	@YAMLCPP_LDFLAGS@
 
 traffic_manager_traffic_manager_SOURCES = \
 	traffic_manager/AddConfigFilesHere.cc \
@@ -49,6 +49,7 @@ traffic_manager_traffic_manager_LDADD = \
 	$(top_builddir)/proxy/shared/libdiagsconfig.a \
    	$(LIBUNWIND_LIBS) \
 	@LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ \
+	@YAMLCPP_LIBS@
 	-lm
 
 # Must do it this way or the dependencies aren't detected.
diff --git a/src/traffic_server/Makefile.inc b/src/traffic_server/Makefile.inc
index b264afd..4ae3687 100644
--- a/src/traffic_server/Makefile.inc
+++ b/src/traffic_server/Makefile.inc
@@ -36,6 +36,10 @@ traffic_server_traffic_server_CPPFLAGS = \
 	$(TS_INCLUDES) \
 	@OPENSSL_INCLUDES@
 
+traffic_server_traffic_server_LDFLAGS = \
+	$(AM_LDFLAGS) \
+	@YAMLCPP_LDFLAGS@
+
 traffic_server_traffic_server_SOURCES = \
 	traffic_server/CoreUtils.cc \
 	traffic_server/CoreUtils.h \
@@ -89,5 +93,5 @@ traffic_server_traffic_server_LDADD += \
 	@LIBLZMA@ \
 	@LIBPROFILER@ \
 	@OPENSSL_LIBS@ \
-	@LIB_YAMLCPP@ \
+	@YAMLCPP_LIBS@ \
 	-lm


Mime
View raw message