Updated Branches: refs/heads/3.4.x d5046b6cc -> 56d74dee0
TS-2129 Check for existence of ExtUtils::MakeMaker Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/35d6c792 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/35d6c792 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/35d6c792 Branch: refs/heads/3.4.x Commit: 35d6c7923ebfb001929bb7adfb183e70f9fb0fbb Parents: d5046b6 Author: Leif Hedstrom <zw...@apache.org> Authored: Sat Aug 10 18:31:40 2013 -0600 Committer: Leif Hedstrom <zw...@apache.org> Committed: Sun Aug 11 12:47:00 2013 -0600 ---------------------------------------------------------------------- CHANGES | 5 +++++ build/ax_perl_modules.m4 | 51 +++++++++++++++++++++++++++++++++++++++++++ configure.ac | 8 ++++++- lib/Makefile.am | 6 ++++- 4 files changed, 68 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/35d6c792/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 5a342e5..52ce1dc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ -*- coding: utf-8 -*- +Changes with Apache Traffic Server 3.4.0 + + + *) [TS-2129] Check for existence of ExtUtils::MakeMaker. + Changes with Apache Traffic Server 3.3.5 *) [TS-2051] Fix SSL crash due to excess READ_COMPLETE events. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/35d6c792/build/ax_perl_modules.m4 ---------------------------------------------------------------------- diff --git a/build/ax_perl_modules.m4 b/build/ax_perl_modules.m4 new file mode 100644 index 0000000..4d881d4 --- /dev/null +++ b/build/ax_perl_modules.m4 @@ -0,0 +1,51 @@ +# LICENSE +# +# Copyright (c) 2009 Dean Povey <po...@wedgetail.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. +# +# Use: AX_PROG_PERL_MODULES([modules ...], true, false ) +# +# This should only be used after the test for the Perl module in configure.ac. +# +#serial 7 + +AU_ALIAS([AC_PROG_PERL_MODULES], [AX_PROG_PERL_MODULES]) +AC_DEFUN([AX_PROG_PERL_MODULES],[dnl + +m4_define([ax_perl_modules]) +m4_foreach([ax_perl_module], m4_split(m4_normalize([$1])), + [ + m4_append([ax_perl_modules], + [']m4_bpatsubst(ax_perl_module,=,[ ])[' ]) + ]) + +if test "x$PERL" != x; then + ax_perl_modules_failed=0 + for ax_perl_module in ax_perl_modules; do + AC_MSG_CHECKING(for perl module $ax_perl_module) + + # Would be nice to log result here, but can't rely on autoconf internals + $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1 + if test $? -ne 0; then + AC_MSG_RESULT(no); + ax_perl_modules_failed=1 + else + AC_MSG_RESULT(ok); + fi + done + + # Run optional shell commands + if test "$ax_perl_modules_failed" = 0; then + : + $2 + else + : + $3 + fi +else + AC_MSG_WARN(could not find perl) +fi]) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/35d6c792/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 516c16c..616294c 100644 --- a/configure.ac +++ b/configure.ac @@ -716,14 +716,20 @@ AS_IF([test "x$enable_wccp" = "xyes"], ] ) +# Check for Perl and Doxygen AC_PATH_PROG([DOXYGEN], [doxygen]) # needed for Doxygen -AC_PATH_PROG([PERL],[perl],[not found]) +AC_PATH_PROG([PERL], [perl],[not found]) AS_IF([test "x$PERL" = "xnot found"], [AC_MSG_ERROR([check for perl failed. Have you installed perl?])] ) AC_ARG_VAR([DOXYGEN], [full path of Doxygen executable]) AC_ARG_VAR([PERL], [full path of Perl executable]) +# Check if MakeMaker is available +AX_PROG_PERL_MODULES([ExtUtils::MakeMaker], AM_CONDITIONAL([BUILD_PERL_LIB], [true]), + AM_CONDITIONAL([BUILD_PERL_LIB], [false]) +) + # Check for GNU-style -On and for Solaris Studio style -xOn. AC_MSG_CHECKING([checking whether to auto-set compiler optimization flags]) has_optimizer_flags=`echo "$CFLAGS $CXXFLAGS" | ${AWK} '$0 !~ /-x?O.?/{print "no"}'` http://git-wip-us.apache.org/repos/asf/trafficserver/blob/35d6c792/lib/Makefile.am ---------------------------------------------------------------------- diff --git a/lib/Makefile.am b/lib/Makefile.am index df3eee5..8be7aa8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -16,7 +16,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -SUBDIRS = ts records perl +SUBDIRS = ts records + +if BUILD_PERL_LIB +SUBDIRS += perl +endif # TsConfig is only built for WCCP until the bugs are worked out. if BUILD_WCCP