hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject incubator-hawq git commit: HAWQ-1081 - Check missing perl modules (at least JSON) in configure
Date Thu, 29 Sep 2016 02:34:22 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master efd02a4e8 -> ea04a072b


HAWQ-1081 - Check missing perl modules (at least JSON) in configure


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/ea04a072
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/ea04a072
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/ea04a072

Branch: refs/heads/master
Commit: ea04a072b1855fc921520689acc7f24fe12cbb33
Parents: efd02a4
Author: Paul Guo <paulguo@gmail.com>
Authored: Wed Sep 28 13:42:48 2016 +0800
Committer: rlei <rlei@pivotal.io>
Committed: Thu Sep 29 10:33:39 2016 +0800

----------------------------------------------------------------------
 config/perl.m4 | 20 ++++++++++++++++++++
 configure      | 14 ++++++++++++++
 configure.in   |  1 +
 3 files changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ea04a072/config/perl.m4
----------------------------------------------------------------------
diff --git a/config/perl.m4 b/config/perl.m4
index 031c3a0..631acf7 100644
--- a/config/perl.m4
+++ b/config/perl.m4
@@ -31,6 +31,26 @@ if test -z "$PERL"; then
 fi
 ])# PGAC_PATH_PERL
 
+# PGAC_CHECK_PERL_MODULE(NAME)
+# ----------------------------
+AC_DEFUN([PGAC_CHECK_PERL_MODULE],
+[AC_REQUIRE([PGAC_PATH_PERL])
+AC_MSG_CHECKING([for Perl module $1])
+$PERL -MJSON -e 1
+perl_$1=$?
+if [[ $perl_$1 -ne 0 ]]; then
+	AC_MSG_ERROR([
+*** Perl JSON module is not installed. You could install it using the cpan utility.
+*** Or try to install the perl-JSON package if you are building on Linux. ])
+else
+	AC_MSG_RESULT([yes])
+fi
+]) # PGAC_CHECK_PERL_MODULE
+
+# PGAC_CHECK_PERL_MODULES(NAMES)
+# ------------------------------
+AC_DEFUN([PGAC_CHECK_PERL_MODULES],
+[m4_foreach([pgac_item], [$1], [PGAC_CHECK_PERL_MODULE(pgac_item)])])
 
 # PGAC_CHECK_PERL_CONFIG(NAME)
 # ----------------------------

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ea04a072/configure
----------------------------------------------------------------------
diff --git a/configure b/configure
index 63da7fc..57729d0 100755
--- a/configure
+++ b/configure
@@ -7707,6 +7707,20 @@ $as_echo "$as_me: WARNING:
 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
 fi
 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl module JSON" >&5
+$as_echo_n "checking for Perl module JSON... " >&6; }
+$PERL -MJSON -e 1
+perl_JSON=$?
+if [ $perl_JSON -ne 0 ]; then
+	as_fn_error $? "
+*** Perl JSON module is not installed. You could install it using the cpan utility.
+*** Or try to install the perl-JSON package if you are building on Linux. " "$LINENO" 5
+else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
 if test "$with_perl" = yes; then
   if test -z "$PERL"; then
     as_fn_error $? "Perl not found" "$LINENO" 5

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ea04a072/configure.in
----------------------------------------------------------------------
diff --git a/configure.in b/configure.in
index 92cdf4f..fba70f9 100644
--- a/configure.in
+++ b/configure.in
@@ -968,6 +968,7 @@ PGAC_PATH_MAVEN
 PGAC_PATH_GPERF
 
 PGAC_PATH_PERL
+PGAC_CHECK_PERL_MODULES([JSON])
 if test "$with_perl" = yes; then
   if test -z "$PERL"; then
     AC_MSG_ERROR([Perl not found])


Mime
View raw message