diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-01-16 13:40:17 +0100 |
---|---|---|
committer | Gary Lowell <glowell@inktank.com> | 2013-01-16 09:41:13 -0800 |
commit | c1a86ab142cdcc2c2fe6641927abfa5d38b30f8c (patch) | |
tree | 3b5db6e44423855b59149c7a2ebdb9c0233ccd23 /configure.ac | |
parent | be0c4b34bc5d9b491f224ccd29ec7c914efd6b1f (diff) | |
download | ceph-c1a86ab142cdcc2c2fe6641927abfa5d38b30f8c.tar.gz |
configure.ac: fix problem with --enable-cephfs-java
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 <danny.al-gaaf@bisect.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index 32814b8da1d..b67e5cd39c3 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? |