trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject git commit: TS-2129 Check for existence of ExtUtils::MakeMaker
Date Sun, 11 Aug 2013 00:31:48 GMT
Updated Branches:
  refs/heads/master f34c62b42 -> 3f2b11310


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/3f2b1131
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3f2b1131
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3f2b1131

Branch: refs/heads/master
Commit: 3f2b1131069292310edb8c8fe3c5b51b96660f54
Parents: f34c62b
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Sat Aug 10 18:31:40 2013 -0600
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Sat Aug 10 18:31:40 2013 -0600

----------------------------------------------------------------------
 CHANGES                  |  2 ++
 build/ax_perl_modules.m4 | 51 +++++++++++++++++++++++++++++++++++++++++++
 configure.ac             |  8 ++++++-
 lib/Makefile.am          |  6 ++++-
 4 files changed, 65 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3f2b1131/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 0c70a39..e64dabc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 Changes with Apache Traffic Server 3.5.0
 
 
+  *) [TS-2129] Check for existence of ExtUtils::MakeMaker.
+
   *) [TS-2128] Don't link libGeoIP.so.1 into binaries
 
   *) [TS-2122] Enlarge the 64KB limitation of log buffer size.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3f2b1131/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 <povey@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/3f2b1131/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index e689872..bfd92d0 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/3f2b1131/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


Mime
View raw message