Repository: trafficserver Updated Branches: refs/heads/master f06708f5b -> 92a76b030
TS-4095: clean up webp_transform build detection Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6d7c7a1c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6d7c7a1c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6d7c7a1c Branch: refs/heads/master Commit: 6d7c7a1c3fa45c6bf921e19b1a0384743568fc24 Parents: f06708f Author: James Peach <[email protected]> Authored: Tue Feb 23 08:31:13 2016 -0800 Committer: James Peach <[email protected]> Committed: Tue Feb 23 08:31:13 2016 -0800 ---------------------------------------------------------------------- configure.ac | 20 ++++++++++++++------ plugins/experimental/Makefile.am | 4 ++-- plugins/experimental/webp_transform/Makefile.am | 19 +++++++++++++------ 3 files changed, 29 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d7c7a1c/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 7d70788..97768fd 100644 --- a/configure.ac +++ b/configure.ac @@ -411,8 +411,17 @@ AM_CONDITIONAL([BUILD_MEMCACHED_REMAP_PLUGIN], [test "x${have_libmemcached}" = " # # Check Magick++ is available. Enable experimental/webp_transform plugin # -PKG_CHECK_MODULES([LIBMAGICKCPP],[Magick++], [have_libmagickcpp=yes], [have_libmagickcpp=no]) -AM_CONDITIONAL([BUILD_HAS_IMAGEMAGICKCPP], [test "x${have_libmagickcpp}" = "xyes"]) +PKG_CHECK_MODULES([LIBMAGICKCPP],[Magick++], [ + have_libmagickcpp=yes + AS_IF([test "x$enable_experimental_plugins" = "xyes"], [ + enable_webp_transform_plugin=yes + ]) +], +[ + have_libmagickcpp=no +]) + +AM_CONDITIONAL([BUILD_WEBP_TRANSFORM_PLUGIN], [test "x${enable_webp_transform_plugin}" = "xyes"]) # # Example plugins. The example plugins are always built, but not always installed. Installing @@ -1938,10 +1947,9 @@ AS_IF([test "x$enable_experimental_plugins" = "xyes"], [ plugins/experimental/stream_editor/Makefile ])]) -AS_IF([test "x$enable_experimental_plugins" = "xyes"], [ - AS_IF([test "x$enable_cppapi" = "xyes"], [ - AC_CONFIG_FILES([plugins/experimental/webp_transform/Makefile]) - ])]) +AS_IF([test "x$enable_webp_transform_plugin" = "xyes"], [ + AC_CONFIG_FILES([plugins/experimental/webp_transform/Makefile]) +]) AS_IF([test "x$enable_cppapi" = "xyes"], [ AC_CONFIG_FILES([ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d7c7a1c/plugins/experimental/Makefile.am ---------------------------------------------------------------------- diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am index b4b92aa..0fdb00b 100644 --- a/plugins/experimental/Makefile.am +++ b/plugins/experimental/Makefile.am @@ -47,7 +47,7 @@ SUBDIRS = \ mp4 \ stream_editor -if BUILD_HAS_IMAGEMAGICKCPP +if BUILD_WEBP_TRANSFORM_PLUGIN SUBDIRS += webp_transform endif @@ -59,4 +59,4 @@ if BUILD_LUAJIT SUBDIRS += ts_lua endif - +DIST_SUBDIRS = $(SUBDIRS) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d7c7a1c/plugins/experimental/webp_transform/Makefile.am ---------------------------------------------------------------------- diff --git a/plugins/experimental/webp_transform/Makefile.am b/plugins/experimental/webp_transform/Makefile.am index 64ef1ab..3132fc9 100644 --- a/plugins/experimental/webp_transform/Makefile.am +++ b/plugins/experimental/webp_transform/Makefile.am @@ -17,12 +17,19 @@ include $(top_srcdir)/build/plugins.mk -if BUILD_HAS_IMAGEMAGICKCPP +AM_CPPFLAGS += \ + -I$(top_srcdir)/lib/atscppapi/src/include \ + $(LIBMAGICKCPP_CFLAGS) + +AM_CXXFLAGS += \ + -Wno-unused-variable -AM_CPPFLAGS += -I$(top_srcdir)/lib/atscppapi/src/include -Wno-unused-variable $(LIBMAGICKCPP_CFLAGS) -target=WebpTransform.so pkglib_LTLIBRARIES = WebpTransform.la -WebpTransform_la_SOURCES = ImageTransform.cc -WebpTransform_la_LDFLAGS = -module -avoid-version -shared -L$(top_srcdir)/lib/atscppapi/src/ -latscppapi $(TS_PLUGIN_LDFLAGS) $(LIBMAGICKCPP_LIBS) -endif +WebpTransform_la_SOURCES = ImageTransform.cc +WebpTransform_la_LDFLAGS = \ + $(TS_PLUGIN_LDFLAGS) \ + -L$(top_builddir)/lib/atscppapi/src +WebpTransform_la_LIBADD = \ + -latscppapi \ + $(LIBMAGICKCPP_LIBS)
