X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=configure.ac;h=e995500e368baa0acb2dc95b74b78237b5aedeef;hp=68b716b99639d0bb049705ad03bd4a76af1bdc1f;hb=a8d25362435121ada85656c08cd79642f79f9f7b;hpb=b9014d6a0da8b2b3a76c4ab51fab2773fe7480b2 diff --git a/configure.ac b/configure.ac index 68b716b..e995500 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -AC_INIT([libguestfs],[1.0.4]) +AC_INIT([libguestfs],[1.0.8]) AM_INIT_AUTOMAKE AC_CONFIG_MACRO_DIR([m4]) @@ -54,8 +54,18 @@ test "x$POD2TEXT" = "xno" && AC_MSG_ERROR([pod2text must be installed]) dnl Check for QEMU for running binaries on this $host_cpu, fall -dnl back to basic 'qemu'. -AC_PATH_PROGS([QEMU],[qemu-system-$host_cpu qemu],[no], +dnl back to basic 'qemu'. Allow the user to override it. +default_qemu="qemu-system-$host_cpu qemu" +# On x86-64, try using KVM first. +if test "x$host_cpu" = "xx86_64"; then + default_qemu="qemu-kvm $default_qemu" +fi +AC_ARG_WITH([qemu], + [AS_HELP_STRING([--with-qemu], + [set default QEMU binary @<:@default=[qemu-kvm] qemu-system- qemu@:>@])], + [], + [with_qemu="$default_qemu"]) +AC_PATH_PROGS([QEMU],[$with_qemu],[no], [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) test "x$QEMU" = "xno" && AC_MSG_ERROR([qemu must be installed]) AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.]) @@ -191,9 +201,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], @@ -212,7 +220,7 @@ if test "x$with_java_home" != "xno"; then if test -d "$with_java_home"; then JAVA_HOME="$with_java_home" else - AC_MSG_FAILURE([$with_java_home is not a directory]) + AC_MSG_FAILURE([$with_java_home is not a directory (use --with-java-home=no to disable Java support)]) fi fi if test "x$JAVA_HOME" = "x"; then @@ -220,7 +228,7 @@ if test "x$with_java_home" != "xno"; then fi AC_MSG_CHECKING(for JDK in $JAVA_HOME) if test ! -x "$JAVA_HOME/bin/java"; then - AC_MSG_ERROR([missing $JAVA_HOME/bin/java binary]) + AC_MSG_ERROR([missing $JAVA_HOME/bin/java binary (use --with-java-home=no to disable Java support)]) else JAVA="$JAVA_HOME/bin/java" fi @@ -292,6 +300,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 +321,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"]) @@ -318,9 +340,39 @@ AC_CONFIG_FILES([Makefile src/Makefile fish/Makefile examples/Makefile ruby/Makefile ruby/Rakefile java/Makefile make-initramfs.sh update-initramfs.sh - libguestfs.spec + libguestfs.spec libguestfs.pc ocaml/META perl/Makefile.PL]) 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 "QEMU ................................ $QEMU" +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 "------------------------------------------------------------"