Java bindings compile, not tested.
[libguestfs.git] / configure.ac
index 68b716b..3a59e65 100644 (file)
@@ -191,9 +191,7 @@ AM_CONDITIONAL([HAVE_PYTHON],
     [test "x$PYTHON_INCLUDEDIR" != "x" -a "x$PYTHON_SITE_PACKAGES" != "x"])
 
 dnl Check for Ruby and rake (optional, for Ruby bindings).
-old_libs="$LIBS"
-AC_CHECK_LIB([ruby],[ruby_init])
-LIBS="$old_libs"
+AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
 AC_CHECK_PROG([RAKE],[rake],[rake],[no])
 
 AM_CONDITIONAL([HAVE_RUBY],
@@ -292,6 +290,17 @@ if test "x$with_java_home" != "xno"; then
        JAVAC_FLAGS="-source 1.5" ;;
     esac
     AC_MSG_RESULT([$JAVAC_FLAGS])
+
+    dnl Where to install jarfiles.
+    dnl XXX How to make it configurable?
+    JAR_INSTALL_DIR=\${prefix}/share/java
+    JNI_INSTALL_DIR=\${libdir}
+
+    dnl JNI version.
+    jni_major_version=`echo $VERSION | awk -F. '{print $1}'`
+    jni_minor_version=`echo $VERSION | awk -F. '{print $2}'`
+    jni_micro_version=`echo $VERSION | awk -F. '{print $3}'`
+    JNI_VERSION_INFO=`expr $jni_major_version + $jni_minor_version`:$jni_micro_version:$jni_minor_version
 fi
 
 AC_SUBST(JAVA_HOME)
@@ -302,6 +311,9 @@ AC_SUBST(JAVADOC)
 AC_SUBST(JAR)
 AC_SUBST(JNI_CFLAGS)
 AC_SUBST(JAVAC_FLAGS)
+AC_SUBST(JAR_INSTALL_DIR)
+AC_SUBST(JNI_INSTALL_DIR)
+AC_SUBST(JNI_VERSION_INFO)
 
 AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC"])
 
@@ -324,3 +336,32 @@ AC_OUTPUT
 
 dnl WTF?
 chmod +x make-initramfs.sh update-initramfs.sh
+
+dnl Produce summary.
+echo
+echo
+echo "------------------------------------------------------------"
+echo "Thank you for downloading $PACKAGE_STRING"
+echo
+echo "This is how we have configured the optional components for you today:"
+echo
+echo -n "OCaml bindings ...................... "
+if test "x$HAVE_OCAML_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+echo -n "Perl bindings ....................... "
+if test "x$HAVE_PERL_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+echo -n "Python bindings ..................... "
+if test "x$HAVE_PYTHON_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+echo -n "Ruby bindings ....................... "
+if test "x$HAVE_RUBY_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+echo -n "Java bindings ....................... "
+if test "x$HAVE_JAVA_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+echo
+echo "If any optional component is configured 'no' when you expected 'yes'"
+echo "then you should check the preceeding messages."
+echo
+echo "Please report bugs back to the fedora-virt mailing list:"
+echo "http://www.redhat.com/mailman/listinfo/fedora-virt"
+echo
+echo "Next you should type 'make' to build the package,"
+echo "then 'make check' to run the tests."
+echo "------------------------------------------------------------"