From bd297be1d1fedc85d70b9b1f3e4d4aa7b9980c76 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 21 May 2009 02:20:26 +0000 Subject: Check for returns when apxs fails and disable mod_glusterfs Signed-off-by: Anand V. Avati --- configure.ac | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 621c26a14c7..3978036bb97 100644 --- a/configure.ac +++ b/configure.ac @@ -263,8 +263,11 @@ if test "x$enable_mod_glusterfs" != "xno" -a "x$HAVE_APXS" = "xyes" -a "x$HAVE_L fi if test "x$BUILD_MOD_GLUSTERFS" = "xyes"; then - HTTPD_BIN_DIR=`$APXS -q SBINDIR` - MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_BIN_DIR/httpd -V | head -1 | awk "{print $3}" | sed 's/[[^0-9.]]//g' | sed 's/\(.*\..*\)\..*/\1/'` + HTTPD_BIN_DIR=`$APXS -q SBINDIR 2>/dev/null` + RET=$? + if test "x$RET" = "x0"; then + MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_BIN_DIR/httpd -V | head -1 | awk "{print $3}" | sed 's/[[^0-9\.]]//g' | sed 's/\(.*\..*\)\..*/\1/'` + fi fi if test "x$with_apxspath" != "x"; then @@ -282,8 +285,11 @@ if test "x$enable_mod_glusterfs" != "xno" -a "x$with_apxspath" != "x" -a "x$with fi if test "x$APACHE_MANUAL" = "xyes"; then - HTTPD_BIN_DIR=`$APXS_MANUAL -q SBINDIR` - MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_MANUAL -V | head -1 | awk "{print $3}" | sed 's/[[^0-9.]]//g' | sed 's/\(.*\..*\)\..*/\1/'` + HTTPD_BIN_DIR=`$APXS_MANUAL -q SBINDIR 2>/dev/null` + RET=$? + if test "x$RET" = "x0"; then + MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_MANUAL -V | head -1 | awk "{print $3}" | sed 's/[[^0-9\.]]//g' | sed 's/\(.*\..*\)\..*/\1/'` + fi APXS=$APXS_MANUAL fi -- cgit