From patchwork Wed Jan 16 12:40:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Al-Gaaf X-Patchwork-Id: 1987681 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3D5D33FC85 for ; Wed, 16 Jan 2013 12:40:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753420Ab3APMkW (ORCPT ); Wed, 16 Jan 2013 07:40:22 -0500 Received: from wp188.webpack.hosteurope.de ([80.237.132.195]:33299 "EHLO wp188.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751558Ab3APMkV (ORCPT ); Wed, 16 Jan 2013 07:40:21 -0500 Received: from nrbg-4dbfcb00.pool.mediaways.net ([77.191.203.0] helo=darkangel.fritz.box); authenticated by wp188.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1TvSHy-0008Ax-DB; Wed, 16 Jan 2013 13:40:18 +0100 From: Danny Al-Gaaf To: ceph-devel@vger.kernel.org Cc: Gary Lowell , Gregory Farnum , Danny Al-Gaaf Subject: [PATCH] configure.ac: fix problem with --enable-cephfs-java Date: Wed, 16 Jan 2013 13:40:17 +0100 Message-Id: <1358340017-26454-1-git-send-email-danny.al-gaaf@bisect.de> X-Mailer: git-send-email 1.8.1 X-bounce-key: webpack.hosteurope.de; danny.al-gaaf@bisect.de; 1358340021; 33d569f5; Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org The AS_IF used to cover java related checks via --enable-cephfs-java didn't work correctly. Use a plain 'if/fi' instead to make sure this section is only executed if --enable-cephfs-java is used. Signed-off-by: Danny Al-Gaaf --- configure.ac | 66 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/configure.ac b/configure.ac index 32814b8..b67e5cd 100644 --- a/configure.ac +++ b/configure.ac @@ -263,15 +263,15 @@ AM_CONDITIONAL(WITH_TCMALLOC, [test "$HAVE_LIBTCMALLOC" = "1"]) # - this might become bigger. maybe should be own m4 file # AC_ARG_ENABLE(cephfs-java, - AC_HELP_STRING([--enable-cephfs-java], [build libcephfs Java bindings]), + [AC_HELP_STRING([--enable-cephfs-java], [build libcephfs Java bindings])], [], [enable_cephfs_java=no]) -AM_CONDITIONAL(ENABLE_CEPHFS_JAVA, test "x$enable_cephfs_java" = "xyes") +AM_CONDITIONAL(ENABLE_CEPHFS_JAVA, [test "x$enable_cephfs_java" = "xyes"]) AC_ARG_WITH(jdk-dir, AC_HELP_STRING([--with-jdk-dir(=DIR)], [Path to JDK directory])) -AS_IF([test "x$enable_cephfs_java" = "xyes"], [ +if test "x$enable_cephfs_java" = "xyes"; then # setup bin/include dirs from --with-jdk-dir (search for jni.h, javac) AS_IF([test -n "$with_jdk_dir"], [ @@ -293,36 +293,36 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [ AS_IF([test -r "$jnih"], [ EXTRA_JDK_INC_DIR=`dirname $jnih`])]) - # cephfs_java_test only makes sense if java is already turned on + # cephfs_java_test only makes sense if java is already turned on # setup CLASSPATH for Debian default junit4.jar package - # - # Configuring --with-debug and --enable-cephfs-java will throw an error if - # JUnit4 cannot be found. While currently this works for users who have - # installed via the package manager on Ubuntu, we need to expand this - # check to 1) support other distrubtions and 2) allow users to influence - # the search path. - AS_IF([test "x$with_debug" = "xyes"], [ - dir='/usr/share/java' - junit4_jar=`find $dir -name junit4.jar | head -n 1` - AS_IF([test -r "$junit4_jar"], [ - EXTRA_CLASSPATH_JAR=`dirname $junit4_jar`/junit4.jar - AC_SUBST(EXTRA_CLASSPATH_JAR) - [have_junit4=1]], [ - AC_MSG_NOTICE([Cannot find junit4.jar (apt-get install junit4)]) - [have_junit4=0]])]) - - AC_CHECK_CLASSPATH - AC_PROG_JAVAC - AC_PROG_JAVAH - AC_PROG_JAR - - CLASSPATH=$CLASSPATH:$EXTRA_CLASSPATH_JAR - export CLASSPATH - AC_MSG_NOTICE([classpath - $CLASSPATH]) - AS_IF([test "$have_junit4" = "1"], [ - AC_CHECK_CLASS([org.junit.rules.ExternalResource], [], [ - AC_MSG_NOTICE(Could not find org.junit.rules.ExternalResource) - have_junit4=0])]) + # + # Configuring --with-debug and --enable-cephfs-java will throw an error if + # JUnit4 cannot be found. While currently this works for users who have + # installed via the package manager on Ubuntu, we need to expand this + # check to 1 support other distrubtions and 2 allow users to influence + # the search path. + AS_IF([test "x$with_debug" = "xyes"], [ + dir='/usr/share/java' + junit4_jar=`find $dir -name junit4.jar | head -n 1` + AS_IF([test -r "$junit4_jar"], [ + EXTRA_CLASSPATH_JAR=`dirname $junit4_jar`/junit4.jar + AC_SUBST(EXTRA_CLASSPATH_JAR) + [have_junit4=1]], [ + AC_MSG_NOTICE([Cannot find junit4.jar (apt-get install junit4)]) + [have_junit4=0]])]) + + AC_CHECK_CLASSPATH + AC_PROG_JAVAC + AC_PROG_JAVAH + AC_PROG_JAR + + CLASSPATH=$CLASSPATH:$EXTRA_CLASSPATH_JAR + export CLASSPATH + AC_MSG_NOTICE([classpath - $CLASSPATH]) + AS_IF([test "$have_junit4" = "1"], [ + AC_CHECK_CLASS([org.junit.rules.ExternalResource], [], [ + AC_MSG_NOTICE(Could not find org.junit.rules.ExternalResource) + have_junit4=0])]) # Check for jni.h CPPFLAGS_save=$CPPFLAGS @@ -339,7 +339,7 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [ # Setup output var AC_SUBST(JDK_CPPFLAGS) -]) +fi AM_CONDITIONAL(HAVE_JUNIT4, [test "$have_junit4" = "1"]) # jni?