Lines 473-538
AC_SUBST([HIVEX_CFLAGS])
Link Here
|
473 |
AC_SUBST([HIVEX_LIBS]) |
473 |
AC_SUBST([HIVEX_LIBS]) |
474 |
|
474 |
|
475 |
dnl FUSE is optional to build the FUSE module. |
475 |
dnl FUSE is optional to build the FUSE module. |
476 |
HAVE_FUSE=yes |
476 |
AC_ARG_ENABLE([fuse], |
477 |
PKG_CHECK_MODULES([FUSE],[fuse],,[ |
477 |
AS_HELP_STRING([--enable-fuse], [Build FUSE module]), |
478 |
HAVE_FUSE=no |
478 |
[], |
479 |
AC_MSG_WARN([FUSE library and headers are missing, so optional FUSE module won't be built])]) |
479 |
[enable_fuse="no"]) |
480 |
AM_CONDITIONAL([HAVE_FUSE],[test "x$HAVE_FUSE" = "xyes"]) |
480 |
if test "x$enable_fuse" == "xyes"; then |
|
|
481 |
PKG_CHECK_MODULES([FUSE],[fuse],,[ |
482 |
AC_MSG_ERROR([FUSE library and headers are missing, so optional FUSE module cannot be built])]) |
483 |
fi |
484 |
AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" = "xyes"]) |
481 |
|
485 |
|
482 |
dnl Check for OCaml (optional, for OCaml bindings). |
486 |
dnl Check for OCaml (optional, for OCaml bindings). |
483 |
AC_PROG_OCAML |
487 |
AC_ARG_ENABLE([ocaml], |
484 |
AC_PROG_FINDLIB |
488 |
AS_HELP_STRING([--enable-ocaml], [Enable optional OCaml binding]), |
485 |
AM_CONDITIONAL([HAVE_OCAML],[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"]) |
489 |
[], |
|
|
490 |
[enable_ocaml=no]) |
491 |
if test "x$enable_ocaml" == "xyes"; then |
492 |
AC_PROG_OCAML |
493 |
AC_PROG_FINDLIB |
494 |
if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then |
495 |
AC_MSG_ERROR([OCaml not found, so cannot build OCaml bindings]) |
496 |
fi |
486 |
|
497 |
|
487 |
dnl Optional xml-light for running the generator. |
498 |
AC_ARG_WITH([xml-light], |
488 |
OCAML_PKG_xml_light=no |
499 |
AS_HELP_STRING([--with-xml-light], [Use xml-light OCaml package, needed for running generator]), |
489 |
if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then |
500 |
[], |
|
|
501 |
[with_xml-light=no]) |
502 |
dnl Optional xml-light for running the generator. |
503 |
OCAML_PKG_xml_light=no |
490 |
AC_CHECK_OCAML_PKG([xml-light]) |
504 |
AC_CHECK_OCAML_PKG([xml-light]) |
|
|
505 |
if test "x$OCAML_PKG_xml_light" == "xno"; then |
506 |
AC_MSG_ERROR([xml-light OCaml package not found]) |
507 |
fi |
508 |
|
509 |
dnl Build the OCaml viewer example. This has a lengthy list of |
510 |
dnl dependencies and we don't attempt to detect them all. Read |
511 |
dnl the top of ocaml/examples/viewer.ml before enabling this. |
512 |
AC_ARG_ENABLE([ocaml-viewer], |
513 |
[AS_HELP_STRING([--enable-ocaml-viewer], |
514 |
[enable OCaml viewer (see ocaml/examples) @<:@default=no@:>@])], |
515 |
[], |
516 |
[enable_ocaml_viewer=no]) |
491 |
fi |
517 |
fi |
492 |
AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$OCAML_PKG_xml_light" != "xno"]) |
518 |
AM_CONDITIONAL([HAVE_OCAML],[test "x$enable_ocaml" == "xyes"]) |
493 |
|
519 |
AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$with_xml-light" == "xyes"]) |
494 |
dnl Build the OCaml viewer example. This has a lengthy list of |
520 |
AM_CONDITIONAL([BUILD_OCAML_VIEWER],[test "x$enable_ocaml_viewer" == "xyes"]) |
495 |
dnl dependencies and we don't attempt to detect them all. Read |
|
|
496 |
dnl the top of ocaml/examples/viewer.ml before enabling this. |
497 |
AC_ARG_ENABLE([ocaml-viewer], |
498 |
[AS_HELP_STRING([--enable-ocaml-viewer], |
499 |
[enable OCaml viewer (see ocaml/examples) @<:@default=no@:>@])], |
500 |
[], |
501 |
[enable_ocaml_viewer=no]) |
502 |
AM_CONDITIONAL([BUILD_OCAML_VIEWER],[test "x$enable_ocaml_viewer" = "xyes"]) |
503 |
|
521 |
|
|
|
522 |
AC_ARG_ENABLE([perl], |
523 |
AS_HELP_STRING([--enable-perl], [Enable building optional perl bindings]), |
524 |
[], |
525 |
[enable_perl=no]) |
504 |
dnl Check for Perl (optional, for Perl bindings). |
526 |
dnl Check for Perl (optional, for Perl bindings). |
505 |
dnl XXX This isn't quite right, we should check for Perl devel library. |
527 |
dnl XXX This isn't quite right, we should check for Perl devel library. |
506 |
AC_CHECK_PROG([PERL],[perl],[perl],[no]) |
528 |
AC_CHECK_PROG([PERL],[perl],[perl],[no]) |
507 |
|
529 |
if test "x$PERL" == "xno"; then |
508 |
dnl Check for Perl modules that must be present to compile and |
530 |
AC_MSG_ERROR([perl not found so cannot build perl bindings]) |
509 |
dnl test the Perl bindings. |
531 |
else |
510 |
missing_perl_modules=no |
532 |
dnl Check for Perl modules that must be present to compile and |
511 |
for pm in Test::More ExtUtils::MakeMaker; do |
533 |
dnl test the Perl bindings. |
512 |
AC_MSG_CHECKING([for $pm]) |
534 |
missing_perl_modules=no |
513 |
if ! perl -M$pm -e1 >/dev/null 2>&1; then |
535 |
for pm in Test::More ExtUtils::MakeMaker; do |
514 |
AC_MSG_RESULT([no]) |
536 |
AC_MSG_CHECKING([for $pm]) |
515 |
missing_perl_modules=yes |
537 |
if ! perl -M$pm -e1 >/dev/null 2>&1; then |
516 |
else |
538 |
AC_MSG_RESULT([no]) |
517 |
AC_MSG_RESULT([yes]) |
539 |
missing_perl_modules=yes |
|
|
540 |
else |
541 |
AC_MSG_RESULT([yes]) |
542 |
fi |
543 |
done |
544 |
if test "x$missing_perl_modules" = "xyes"; then |
545 |
AC_MSG_ERROR([some Perl modules required to compile or test the Perl bindings are missing]) |
518 |
fi |
546 |
fi |
519 |
done |
|
|
520 |
if test "x$missing_perl_modules" = "xyes"; then |
521 |
AC_MSG_WARN([some Perl modules required to compile or test the Perl bindings are missing]) |
522 |
fi |
547 |
fi |
|
|
548 |
AM_CONDITIONAL([HAVE_PERL], |
549 |
[test "x$enable_perl" == "xyes"]) |
523 |
|
550 |
|
524 |
AM_CONDITIONAL([HAVE_PERL], |
551 |
AC_ARG_ENABLE([python], |
525 |
[test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"]) |
552 |
AS_HELP_STRING([--enable-python], [Enable building optional Python bindings]), |
526 |
|
553 |
[], |
|
|
554 |
[enable_python=no]) |
555 |
if test "x$enable_python" == "xyes"; then |
527 |
dnl Check for Python (optional, for Python bindings). |
556 |
dnl Check for Python (optional, for Python bindings). |
528 |
AC_CHECK_PROG([PYTHON],[python],[python],[no]) |
557 |
AC_CHECK_PROG([PYTHON],[python],[python],[no]) |
529 |
|
558 |
|
|
|
559 |
if test "x$PYTHON" == "xno"; then |
560 |
AC_MSG_ERROR([Python not found so cannot build python bindings]) |
561 |
fi |
562 |
|
530 |
PYTHON_PREFIX= |
563 |
PYTHON_PREFIX= |
531 |
PYTHON_VERSION= |
564 |
PYTHON_VERSION= |
532 |
PYTHON_INCLUDEDIR= |
565 |
PYTHON_INCLUDEDIR= |
533 |
PYTHON_SITE_PACKAGES= |
566 |
PYTHON_SITE_PACKAGES= |
534 |
|
567 |
|
535 |
if test "x$PYTHON" != "xno"; then |
|
|
536 |
PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"` |
568 |
PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"` |
537 |
PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
569 |
PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
538 |
for d in \ |
570 |
for d in \ |
Lines 548-553
if test "x$PYTHON" != "xno"; then
Link Here
|
548 |
fi |
580 |
fi |
549 |
AC_MSG_RESULT([not found]) |
581 |
AC_MSG_RESULT([not found]) |
550 |
done |
582 |
done |
|
|
583 |
if test -z "$PYTHON_INCLUDEDIR"; then |
584 |
AC_MSG_ERROR([Python include directory not found]) |
585 |
fi |
551 |
for d in \ |
586 |
for d in \ |
552 |
$PYTHON_PREFIX/lib64/python$PYTHON_VERSION/site-packages \ |
587 |
$PYTHON_PREFIX/lib64/python$PYTHON_VERSION/site-packages \ |
553 |
$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages \ |
588 |
$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages \ |
Lines 563-589
if test "x$PYTHON" != "xno"; then
Link Here
|
563 |
fi |
598 |
fi |
564 |
AC_MSG_RESULT([not found]) |
599 |
AC_MSG_RESULT([not found]) |
565 |
done |
600 |
done |
|
|
601 |
if test -z "$PYTHON_SITE_PACKAGES"; then |
602 |
AC_MSG_ERROR([Python site-packages directory not found]) |
603 |
fi |
566 |
|
604 |
|
567 |
old_LIBS="$LIBS" |
605 |
old_LIBS="$LIBS" |
568 |
LIBS="$LIBS -lpython$PYTHON_VERSION" |
606 |
LIBS="$LIBS -lpython$PYTHON_VERSION" |
569 |
AC_CHECK_FUNCS([PyCapsule_New]) |
607 |
AC_CHECK_FUNCS([PyCapsule_New]) |
570 |
LIBS="$old_LIBS" |
608 |
LIBS="$old_LIBS" |
571 |
fi |
|
|
572 |
|
609 |
|
573 |
AC_SUBST(PYTHON_PREFIX) |
610 |
AC_SUBST(PYTHON_PREFIX) |
574 |
AC_SUBST(PYTHON_VERSION) |
611 |
AC_SUBST(PYTHON_VERSION) |
575 |
AC_SUBST(PYTHON_INCLUDEDIR) |
612 |
AC_SUBST(PYTHON_INCLUDEDIR) |
576 |
AC_SUBST(PYTHON_SITE_PACKAGES) |
613 |
AC_SUBST(PYTHON_SITE_PACKAGES) |
577 |
|
614 |
fi |
578 |
AM_CONDITIONAL([HAVE_PYTHON], |
615 |
AM_CONDITIONAL([HAVE_PYTHON], |
579 |
[test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_SITE_PACKAGES" != "x"]) |
616 |
[test "x$enable_python" == "xyes"]) |
|
|
617 |
|
580 |
|
618 |
|
|
|
619 |
AC_ARG_ENABLE([ruby], |
620 |
AS_HELP_STRING([--enable-ruby], [Enable building optional Ruby bindings]), |
621 |
[], |
622 |
[enable_ruby=no]) |
623 |
if test "x$enable_ruby" == "xyes"; then |
581 |
dnl Check for Ruby and rake (optional, for Ruby bindings). |
624 |
dnl Check for Ruby and rake (optional, for Ruby bindings). |
582 |
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0]) |
625 |
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0]) |
583 |
AC_CHECK_PROG([RAKE],[rake],[rake],[no]) |
626 |
AC_CHECK_PROG([RAKE],[rake],[rake],[no]) |
584 |
|
627 |
|
|
|
628 |
if test -z "x$HAVE_LIBRUBY"; then |
629 |
AC_MSG_ERROR([Ruby library not found so cannot build Ruby bindings]) |
630 |
fi |
631 |
if test "x$RAKE" == "xno"; then |
632 |
AC_MSG_ERROR([rake not found]) |
633 |
fi |
634 |
fi |
585 |
AM_CONDITIONAL([HAVE_RUBY], |
635 |
AM_CONDITIONAL([HAVE_RUBY], |
586 |
[test "x$RAKE" != "xno" && test -n "$HAVE_LIBRUBY"]) |
636 |
[test "x$enable_ruby" == "xyes"]) |
587 |
|
637 |
|
588 |
dnl Check for Java. |
638 |
dnl Check for Java. |
589 |
AC_ARG_WITH(java_home, |
639 |
AC_ARG_WITH(java_home, |
Lines 725-736
AC_SUBST(JNI_VERSION_INFO)
Link Here
|
725 |
|
775 |
|
726 |
AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC"]) |
776 |
AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC"]) |
727 |
|
777 |
|
|
|
778 |
AC_ARG_ENABLE([haskell], |
779 |
AS_HELP_STRING([--enable-haskell], [Enable building optional Haskell bindings]), |
780 |
[], |
781 |
[enable_haskell=no]) |
782 |
if test "x$enable_haskell" == "xyes"; then |
728 |
dnl Check for Haskell (GHC). |
783 |
dnl Check for Haskell (GHC). |
729 |
AC_CHECK_PROG([GHC],[ghc],[ghc],[no]) |
784 |
AC_CHECK_PROG([GHC],[ghc],[ghc],[AC_MSG_ERROR([GHC not found])]) |
730 |
|
785 |
fi |
731 |
AM_CONDITIONAL([HAVE_HASKELL], |
786 |
AM_CONDITIONAL([HAVE_HASKELL], |
732 |
[test "x$GHC" != "xno"]) |
787 |
[test "x$enable_haskell" = "xyes"]) |
733 |
|
788 |
|
|
|
789 |
if test "x$enable_perl" == "xyes"; then |
790 |
AC_ARG_WITH([inspector], |
791 |
AS_HELP_STRING([--with-inspector], [Enable building virt-inspector]) |
792 |
[], |
793 |
[with_inspector=no]) |
794 |
AC_ARG_WITH([tools], |
795 |
AS_HELP_STRING([--with-tools], [Enable building virt-* tools]), |
796 |
[], |
797 |
[with_tools=no]) |
798 |
if test "x$with_inspector" == "xyes" -o "x$with_tools" == "xyes"; then |
734 |
dnl Check for Perl modules needed by virt-df, inspector, etc. |
799 |
dnl Check for Perl modules needed by virt-df, inspector, etc. |
735 |
missing_perl_modules=no |
800 |
missing_perl_modules=no |
736 |
for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain Win::Hivex Win::Hivex::Regedit; do |
801 |
for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain Win::Hivex Win::Hivex::Regedit; do |
Lines 743-764
for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::Tex
Link Here
|
743 |
fi |
808 |
fi |
744 |
done |
809 |
done |
745 |
if test "x$missing_perl_modules" = "xyes"; then |
810 |
if test "x$missing_perl_modules" = "xyes"; then |
746 |
AC_MSG_WARN([some Perl modules required to compile virt-inspector and the other virt-* tools are missing]) |
811 |
AC_MSG_ERROR([some Perl modules required to compile virt-inspector and/or the other virt-* tools are missing]) |
|
|
812 |
fi |
747 |
fi |
813 |
fi |
748 |
|
|
|
749 |
AM_CONDITIONAL([HAVE_INSPECTOR], |
814 |
AM_CONDITIONAL([HAVE_INSPECTOR], |
750 |
[test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"]) |
815 |
[test "x$with_inspector" == "xyes"]) |
751 |
AM_CONDITIONAL([HAVE_TOOLS], |
816 |
AM_CONDITIONAL([HAVE_TOOLS], |
752 |
[test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"]) |
817 |
[test "x$with_tools" == "xyes"]) |
|
|
818 |
fi |
753 |
|
819 |
|
|
|
820 |
AC_ARG_WITH([po4a], |
821 |
AS_HELP_STRING([--with-po4a], [Use po4a tool for translating documentation]), |
822 |
[], |
823 |
[with_po4a=no]) |
824 |
if test "x$with_po4a" == "xyes"; then |
754 |
dnl po4a for translating man pages and POD files (optional). |
825 |
dnl po4a for translating man pages and POD files (optional). |
755 |
AC_CHECK_PROG([PO4A],[po4a],[po4a],[no]) |
826 |
AC_CHECK_PROG([PO4A],[po4a],[po4a],[AC_MSG_ERROR([po4a not found])]) |
756 |
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"]) |
827 |
fi |
|
|
828 |
AM_CONDITIONAL([HAVE_PO4A], [test "x$with_po4a" == "xyes"]) |
757 |
|
829 |
|
|
|
830 |
AC_ARG_ENABLE([php], |
831 |
AS_HELP_STRING([--enable-php], [Enable building optional php bindigns]), |
832 |
[], |
833 |
[enable_php=no]) |
834 |
if test "x$enable_php" == "xyes"; then |
758 |
dnl PHP |
835 |
dnl PHP |
759 |
AC_CHECK_PROG([PHP],[php],[php],[no]) |
836 |
AC_CHECK_PROG([PHP],[php],[php],[AC_MSG_ERROR([php not found])]) |
760 |
AC_CHECK_PROG([PHPIZE],[phpize],[phpize],[no]) |
837 |
AC_CHECK_PROG([PHPIZE],[phpize],[phpize],[AC_MSG_ERROR([phpize not found])]) |
761 |
AM_CONDITIONAL([HAVE_PHP], [test "x$PHP" != "xno" && test "x$PHPIZE" != "xno"]) |
838 |
fi |
|
|
839 |
AM_CONDITIONAL([HAVE_PHP], [test "x$enable_php" == "xyes"]) |
762 |
|
840 |
|
763 |
dnl Library versioning. |
841 |
dnl Library versioning. |
764 |
MAX_PROC_NR=`cat $srcdir/src/MAX_PROC_NR` |
842 |
MAX_PROC_NR=`cat $srcdir/src/MAX_PROC_NR` |