Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 302614 | Differences between
and this patch

Collapse All | Expand All

(-)a/Makefile.am (+2 lines)
Lines 17-22 Link Here
17
17
18
include $(top_srcdir)/subdir-rules.mk
18
include $(top_srcdir)/subdir-rules.mk
19
19
20
generator_built = src/guestfs-actions.pod src/guestfs-availability.pod src/guestfs-structs.pod
21
20
ACLOCAL_AMFLAGS = -I m4
22
ACLOCAL_AMFLAGS = -I m4
21
23
22
# Basic source for the library.
24
# Basic source for the library.
(-)a/configure.ac (-57 / +134 lines)
Lines 478-543 AC_SUBST([HIVEX_CFLAGS]) Link Here
478
AC_SUBST([HIVEX_LIBS])
478
AC_SUBST([HIVEX_LIBS])
479
479
480
dnl FUSE is optional to build the FUSE module.
480
dnl FUSE is optional to build the FUSE module.
481
HAVE_FUSE=yes
481
AC_ARG_ENABLE([fuse], 
482
PKG_CHECK_MODULES([FUSE],[fuse],,[
482
    AS_HELP_STRING([--enable-fuse], [Build FUSE module]),
483
        HAVE_FUSE=no
483
    [],
484
        AC_MSG_WARN([FUSE library and headers are missing, so optional FUSE module won't be built])])
484
    [enable_fuse="no"])
485
AM_CONDITIONAL([HAVE_FUSE],[test "x$HAVE_FUSE" = "xyes"])
485
if test "x$enable_fuse" == "xyes"; then
486
    PKG_CHECK_MODULES([FUSE],[fuse],,[
487
            AC_MSG_ERROR([FUSE library and headers are missing, so optional FUSE module cannot be built])])
488
fi
489
    AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" = "xyes"])
486
490
487
dnl Check for OCaml (optional, for OCaml bindings).
491
dnl Check for OCaml (optional, for OCaml bindings).
488
AC_PROG_OCAML
492
AC_ARG_ENABLE([ocaml],
489
AC_PROG_FINDLIB
493
    AS_HELP_STRING([--enable-ocaml], [Enable optional OCaml binding]),
490
AM_CONDITIONAL([HAVE_OCAML],[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
494
    [],
495
    [enable_ocaml=no])
496
if test "x$enable_ocaml" == "xyes"; then
497
    AC_PROG_OCAML
498
    AC_PROG_FINDLIB
499
    if test "x$OCAMLC" == "xno" -o "x$OCAMLFIND" == "xno"; then
500
        AC_MSG_ERROR([OCaml not found, so cannot build OCaml bindings])
501
    fi
491
502
492
dnl Optional xml-light for running the generator.
503
    dnl Optional xml-light for running the generator.
493
OCAML_PKG_xml_light=no
504
    OCAML_PKG_xml_light=no
494
if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then
495
    AC_CHECK_OCAML_PKG([xml-light])
505
    AC_CHECK_OCAML_PKG([xml-light])
506
    if test "x$OCAML_PKG_xml_light" == "xno"; then
507
        AC_MSG_ERROR([xml-light OCaml package not found])
508
    fi
509
510
    dnl Build the OCaml viewer example.  This has a lengthy list of
511
    dnl dependencies and we don't attempt to detect them all.  Read
512
    dnl the top of ocaml/examples/viewer.ml before enabling this.
513
    AC_ARG_ENABLE([ocaml-viewer],
514
            [AS_HELP_STRING([--enable-ocaml-viewer],
515
              [enable OCaml viewer (see ocaml/examples) @<:@default=no@:>@])],
516
            [],
517
            [enable_ocaml_viewer=no])
496
fi
518
fi
497
AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$OCAML_PKG_xml_light" != "xno"])
519
AM_CONDITIONAL([HAVE_OCAML],[test "x$enable_ocaml" == "xyes"])
498
520
AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$with_xml_light" == "xyes"])
499
dnl Build the OCaml viewer example.  This has a lengthy list of
521
AM_CONDITIONAL([BUILD_OCAML_VIEWER],[test "x$enable_ocaml_viewer" == "xyes"])
500
dnl dependencies and we don't attempt to detect them all.  Read
501
dnl the top of ocaml/examples/viewer.ml before enabling this.
502
AC_ARG_ENABLE([ocaml-viewer],
503
        [AS_HELP_STRING([--enable-ocaml-viewer],
504
          [enable OCaml viewer (see ocaml/examples) @<:@default=no@:>@])],
505
        [],
506
        [enable_ocaml_viewer=no])
507
AM_CONDITIONAL([BUILD_OCAML_VIEWER],[test "x$enable_ocaml_viewer" = "xyes"])
508
522
523
AC_ARG_ENABLE([perl],
524
    AS_HELP_STRING([--enable-perl], [Enable building optional perl bindings]),
525
    [],
526
    [enable_perl=no])
527
if test "x$enable_perl" == "xyes"; then
509
dnl Check for Perl (optional, for Perl bindings).
528
dnl Check for Perl (optional, for Perl bindings).
510
dnl XXX This isn't quite right, we should check for Perl devel library.
529
dnl XXX This isn't quite right, we should check for Perl devel library.
511
AC_CHECK_PROG([PERL],[perl],[perl],[no])
530
AC_CHECK_PROG([PERL],[perl],[perl],[no])
512
531
if test "x$PERL" == "xno"; then
513
dnl Check for Perl modules that must be present to compile and
532
    AC_MSG_ERROR([perl not found so cannot build perl bindings])
514
dnl test the Perl bindings.
533
else
515
missing_perl_modules=no
534
    dnl Check for Perl modules that must be present to compile and
516
for pm in Test::More ExtUtils::MakeMaker; do
535
    dnl test the Perl bindings.
517
    AC_MSG_CHECKING([for $pm])
536
    missing_perl_modules=no
518
    if ! perl -M$pm -e1 >/dev/null 2>&1; then
537
    for pm in Test::More ExtUtils::MakeMaker; do
519
        AC_MSG_RESULT([no])
538
        AC_MSG_CHECKING([for $pm])
520
        missing_perl_modules=yes
539
        if ! perl -M$pm -e1 >/dev/null 2>&1; then
521
    else
540
            AC_MSG_RESULT([no])
522
        AC_MSG_RESULT([yes])
541
            missing_perl_modules=yes
542
        else
543
            AC_MSG_RESULT([yes])
544
        fi
545
    done
546
    if test "x$missing_perl_modules" = "xyes"; then
547
        AC_MSG_ERROR([some Perl modules required to compile or test the Perl bindings are missing])
523
    fi
548
    fi
524
done
525
if test "x$missing_perl_modules" = "xyes"; then
526
    AC_MSG_WARN([some Perl modules required to compile or test the Perl bindings are missing])
527
fi
549
fi
550
fi
551
    AM_CONDITIONAL([HAVE_PERL],
552
        [test "x$enable_perl" == "xyes"])
528
553
529
AM_CONDITIONAL([HAVE_PERL],
554
AC_ARG_ENABLE([python],
530
    [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"])
555
    AS_HELP_STRING([--enable-python], [Enable building optional Python bindings]),
531
556
    [],
557
    [enable_python=no])
558
if test "x$enable_python" == "xyes"; then
532
dnl Check for Python (optional, for Python bindings).
559
dnl Check for Python (optional, for Python bindings).
533
AC_CHECK_PROG([PYTHON],[python],[python],[no])
560
AC_CHECK_PROG([PYTHON],[python],[python],[no])
534
561
562
if test "x$PYTHON" == "xno"; then
563
    AC_MSG_ERROR([Python not found so cannot build python bindings])
564
fi
565
535
PYTHON_PREFIX=
566
PYTHON_PREFIX=
536
PYTHON_VERSION=
567
PYTHON_VERSION=
537
PYTHON_INCLUDEDIR=
568
PYTHON_INCLUDEDIR=
538
PYTHON_SITE_PACKAGES=
569
PYTHON_SITE_PACKAGES=
539
570
540
if test "x$PYTHON" != "xno"; then
541
    PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
571
    PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
542
    PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
572
    PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
543
    for d in \
573
    for d in \
Lines 553-558 if test "x$PYTHON" != "xno"; then Link Here
553
        fi
583
        fi
554
        AC_MSG_RESULT([not found])
584
        AC_MSG_RESULT([not found])
555
    done
585
    done
586
    if test -z "$PYTHON_INCLUDEDIR"; then
587
        AC_MSG_ERROR([Python include directory not found])
588
    fi
556
    for d in \
589
    for d in \
557
        $PYTHON_PREFIX/lib64/python$PYTHON_VERSION/site-packages \
590
        $PYTHON_PREFIX/lib64/python$PYTHON_VERSION/site-packages \
558
        $PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages \
591
        $PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages \
Lines 568-594 if test "x$PYTHON" != "xno"; then Link Here
568
        fi
601
        fi
569
        AC_MSG_RESULT([not found])
602
        AC_MSG_RESULT([not found])
570
    done
603
    done
604
    if test -z "$PYTHON_SITE_PACKAGES"; then
605
        AC_MSG_ERROR([Python site-packages directory not found])
606
    fi
571
607
572
    old_LIBS="$LIBS"
608
    old_LIBS="$LIBS"
573
    LIBS="$LIBS -lpython$PYTHON_VERSION"
609
    LIBS="$LIBS -lpython$PYTHON_VERSION"
574
    AC_CHECK_FUNCS([PyCapsule_New])
610
    AC_CHECK_FUNCS([PyCapsule_New])
575
    LIBS="$old_LIBS"
611
    LIBS="$old_LIBS"
576
fi
577
612
578
AC_SUBST(PYTHON_PREFIX)
613
AC_SUBST(PYTHON_PREFIX)
579
AC_SUBST(PYTHON_VERSION)
614
AC_SUBST(PYTHON_VERSION)
580
AC_SUBST(PYTHON_INCLUDEDIR)
615
AC_SUBST(PYTHON_INCLUDEDIR)
581
AC_SUBST(PYTHON_SITE_PACKAGES)
616
AC_SUBST(PYTHON_SITE_PACKAGES)
582
617
fi
583
AM_CONDITIONAL([HAVE_PYTHON],
618
AM_CONDITIONAL([HAVE_PYTHON],
584
    [test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_SITE_PACKAGES" != "x"])
619
    [test "x$enable_python" == "xyes"])
585
620
621
622
AC_ARG_ENABLE([ruby],
623
    AS_HELP_STRING([--enable-ruby], [Enable building optional Ruby bindings]),
624
    [],
625
    [enable_ruby=no])
626
if test "x$enable_ruby" == "xyes"; then
586
dnl Check for Ruby and rake (optional, for Ruby bindings).
627
dnl Check for Ruby and rake (optional, for Ruby bindings).
587
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
628
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
588
AC_CHECK_PROG([RAKE],[rake],[rake],[no])
629
AC_CHECK_PROG([RAKE],[rake],[rake],[no])
589
630
631
if test -z "x$HAVE_LIBRUBY"; then
632
    AC_MSG_ERROR([Ruby library not found so cannot build Ruby bindings])
633
fi
634
if test "x$RAKE" == "xno"; then
635
    AC_MSG_ERROR([rake not found])
636
fi
637
fi
590
AM_CONDITIONAL([HAVE_RUBY],
638
AM_CONDITIONAL([HAVE_RUBY],
591
    [test "x$RAKE" != "xno" && test -n "$HAVE_LIBRUBY"])
639
    [test "x$enable_ruby" == "xyes"])
592
640
593
dnl Check for Java.
641
dnl Check for Java.
594
AC_ARG_WITH(java_home,
642
AC_ARG_WITH(java_home,
Lines 728-741 AC_SUBST(JAR_INSTALL_DIR) Link Here
728
AC_SUBST(JNI_INSTALL_DIR)
776
AC_SUBST(JNI_INSTALL_DIR)
729
AC_SUBST(JNI_VERSION_INFO)
777
AC_SUBST(JNI_VERSION_INFO)
730
778
731
AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC"])
779
AM_CONDITIONAL([HAVE_JAVA],[test -n "$JAVAC" -a "x$with_java_home" != "xno"])
732
780
781
AC_ARG_ENABLE([haskell],
782
    AS_HELP_STRING([--enable-haskell], [Enable building optional Haskell bindings]),
783
    [],
784
    [enable_haskell=no])
785
if test "x$enable_haskell" == "xyes"; then
733
dnl Check for Haskell (GHC).
786
dnl Check for Haskell (GHC).
734
AC_CHECK_PROG([GHC],[ghc],[ghc],[no])
787
AC_CHECK_PROG([GHC],[ghc],[ghc],[AC_MSG_ERROR([GHC not found])])
735
788
fi
736
AM_CONDITIONAL([HAVE_HASKELL],
789
AM_CONDITIONAL([HAVE_HASKELL],
737
    [test "x$GHC" != "xno"])
790
    [test "x$enable_haskell" = "xyes"])
738
791
792
if test "x$enable_perl" == "xyes"; then
793
AC_ARG_WITH([inspector],
794
    AS_HELP_STRING([--with-inspector], [Enable building virt-inspector]),
795
    [],
796
    [with_inspector=no])
797
AC_ARG_WITH([tools],
798
    AS_HELP_STRING([--with-tools], [Enable building virt-* tools]),
799
    [],
800
    [with_tools=no])
801
if test "x$with_inspector" == "xyes" -o "x$with_tools" == "xyes"; then
739
dnl Check for Perl modules needed by virt-df, inspector, etc.
802
dnl Check for Perl modules needed by virt-df, inspector, etc.
740
missing_perl_modules=no
803
missing_perl_modules=no
741
for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain Win::Hivex Win::Hivex::Regedit; do
804
for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain Win::Hivex Win::Hivex::Regedit; do
Lines 748-769 for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::Tex Link Here
748
    fi
811
    fi
749
done
812
done
750
if test "x$missing_perl_modules" = "xyes"; then
813
if test "x$missing_perl_modules" = "xyes"; then
751
    AC_MSG_WARN([some Perl modules required to compile virt-inspector and the other virt-* tools are missing])
814
    AC_MSG_ERROR([some Perl modules required to compile virt-inspector and/or the other virt-* tools are missing])
815
fi
816
fi
752
fi
817
fi
753
754
AM_CONDITIONAL([HAVE_INSPECTOR],
818
AM_CONDITIONAL([HAVE_INSPECTOR],
755
    [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"])
819
    [test "x$with_inspector" == "xyes"])
756
AM_CONDITIONAL([HAVE_TOOLS],
820
AM_CONDITIONAL([HAVE_TOOLS],
757
    [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"])
821
    [test "x$with_tools" == "xyes"])
822
758
823
824
AC_ARG_WITH([po4a],
825
    AS_HELP_STRING([--with-po4a], [Use po4a tool for translating documentation]),
826
    [],
827
    [with_po4a=no])
828
if test "x$with_po4a" == "xyes"; then
759
dnl po4a for translating man pages and POD files (optional).
829
dnl po4a for translating man pages and POD files (optional).
760
AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
830
AC_CHECK_PROG([PO4A],[po4a],[po4a],[AC_MSG_ERROR([po4a not found])])
761
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
831
fi
832
AM_CONDITIONAL([HAVE_PO4A], [test "x$with_po4a" == "xyes"])
762
833
834
AC_ARG_ENABLE([php],
835
    AS_HELP_STRING([--enable-php], [Enable building optional php bindigns]),
836
    [],
837
    [enable_php=no])
838
if test "x$enable_php" == "xyes"; then
763
dnl PHP
839
dnl PHP
764
AC_CHECK_PROG([PHP],[php],[php],[no])
840
AC_CHECK_PROG([PHP],[php],[php],[AC_MSG_ERROR([php not found])])
765
AC_CHECK_PROG([PHPIZE],[phpize],[phpize],[no])
841
AC_CHECK_PROG([PHPIZE],[phpize],[phpize],[AC_MSG_ERROR([phpize not found])])
766
AM_CONDITIONAL([HAVE_PHP], [test "x$PHP" != "xno" && test "x$PHPIZE" != "xno"])
842
fi
843
AM_CONDITIONAL([HAVE_PHP], [test "x$enable_php" == "xyes"])
767
844
768
dnl Library versioning.
845
dnl Library versioning.
769
MAX_PROC_NR=`cat $srcdir/src/MAX_PROC_NR`
846
MAX_PROC_NR=`cat $srcdir/src/MAX_PROC_NR`
(-)a/po-docs/ja/Makefile.am (-2 / +6 lines)
Lines 41-50 EXTRA_DIST = \ Link Here
41
	libguestfs-test-tool.pod \
41
	libguestfs-test-tool.pod \
42
	$(wildcard virt-*.pl)
42
	$(wildcard virt-*.pl)
43
43
44
all-local: $(MANPAGES)
45
46
if HAVE_PO4A
44
if HAVE_PO4A
47
45
46
all-local: $(MANPAGES)
47
48
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
48
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
49
	sed \
49
	sed \
50
	  -e '/@ACTIONS@/rguestfs-actions.pod' \
50
	  -e '/@ACTIONS@/rguestfs-actions.pod' \
Lines 95-100 virt-%.1: virt-%.pl Link Here
95
	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
95
	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
96
	  $< > $@-t && mv $@-t $@
96
	  $< > $@-t && mv $@-t $@
97
97
98
else
99
100
all-local: 
101
98
endif
102
endif
99
103
100
# XXX Can automake do this properly?
104
# XXX Can automake do this properly?
(-)a/src/Makefile.am (-1 / +1 lines)
Lines 26-32 generator_built = \ Link Here
26
	bindtests.c \
26
	bindtests.c \
27
	errnostring_gperf.gperf \
27
	errnostring_gperf.gperf \
28
	errnostring.c \
28
	errnostring.c \
29
	errnostring.h
29
	errnostring.h \
30
	guestfs-actions.pod \
30
	guestfs-actions.pod \
31
	guestfs-availability.pod \
31
	guestfs-availability.pod \
32
	guestfs-structs.pod \
32
	guestfs-structs.pod \

Return to bug 302614