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 2020/03/18 04:52:08 UTC
[trafficserver] branch 9.0.x updated: Adds support for configure
option --enable-yaml-headers (#6519)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 67ed212 Adds support for configure option --enable-yaml-headers (#6519)
67ed212 is described below
commit 67ed21235869f315d10f6c6b5965133af77c2c5d
Author: Lokesh Jindal <60...@users.noreply.github.com>
AuthorDate: Tue Mar 17 21:51:44 2020 -0700
Adds support for configure option --enable-yaml-headers (#6519)
=> Gives build-time control for exporting yaml-cpp headers from
trafficserver. By default, headers won't be exported.
=> Enhances support added in following commit:
a71a815dacea967b3e02a1f103b7ae199d993913 (Export headers for internal
YAML-CPP library)
=> Allows client-code to keep using their own yaml-cpp headers without
any interference from yam-cpp headers in trafficserver
Co-authored-by: Lokesh Jindal <lj...@linkedin.com>
(cherry picked from commit 527861fbc5fb76a09535e0665fac1e71036ae740)
---
build/yaml-cpp.m4 | 11 +++++++++++
configure.ac | 3 +++
lib/Makefile.am | 2 ++
3 files changed, 16 insertions(+)
diff --git a/build/yaml-cpp.m4 b/build/yaml-cpp.m4
index 67c5b13..596ca19 100644
--- a/build/yaml-cpp.m4
+++ b/build/yaml-cpp.m4
@@ -84,3 +84,14 @@ AC_SUBST([YAMLCPP_LIBS])
AC_SUBST([YAMLCPP_LDFLAGS])
])
+
+dnl TS_CHECK_YAML_HEADERS_EXPORT: check if we want to export yaml-cpp headers from trafficserver. default: not exported
+AC_DEFUN([TS_CHECK_YAML_HEADERS_EXPORT], [
+AC_MSG_CHECKING([whether to export yaml-cpp headers])
+AC_ARG_ENABLE([yaml-headers],
+ [AS_HELP_STRING([--enable-yaml-headers],[Export yaml-cpp headers])],
+ [],
+ [enable_yaml_headers=no]
+)
+AC_MSG_RESULT([$enable_yaml_headers])
+])
diff --git a/configure.ac b/configure.ac
index 6b46a1c..8d3fa62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1432,6 +1432,9 @@ AC_SUBST([LIBJANSSON])
TS_CHECK_YAML_CPP
AM_CONDITIONAL([BUILD_YAML_CPP], [test x"$has_yaml_cpp" = x"no"])
+TS_CHECK_YAML_HEADERS_EXPORT
+AM_CONDITIONAL([EXPORT_YAML_HEADERS], [test x"$enable_yaml_headers" = x"yes"])
+
# Check for optional hiredis library
TS_CHECK_HIREDIS
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 35f7c8e..cc091b3 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -35,5 +35,7 @@ all-local: $(LOCAL)
clean-local:
$(MAKE) -C yamlcpp clean
+if EXPORT_YAML_HEADERS
install-data-local:
$(MAKE) -C yamlcpp install
+endif