From: Richard W.M. Jones Date: Mon, 8 Nov 2010 14:53:48 +0000 (+0000) Subject: build: Test for virt tools Perl libraries conditionally. X-Git-Tag: 1.6.2~40 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=51acb9b08ba33194978b8081e0ff76709c192ea4;p=libguestfs.git build: Test for virt tools Perl libraries conditionally. Only test for these if $PERL is defined, and use $PERL as the interpreter. (cherry picked from commit 8e4a4d3d88b814504c6f2abbf6bf3dab789021b1) --- diff --git a/configure.ac b/configure.ac index e85c998..a170f28 100644 --- a/configure.ac +++ b/configure.ac @@ -777,19 +777,22 @@ AM_CONDITIONAL([HAVE_HASKELL], [test "x$GHC" != "xno"]) dnl Check for Perl modules needed by virt-df, inspector, etc. -missing_perl_modules=no -for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain Win::Hivex Win::Hivex::Regedit; do - AC_MSG_CHECKING([for $pm]) - if ! perl -M$pm -e1 >/dev/null 2>&1; then - AC_MSG_RESULT([no]) - missing_perl_modules=yes - else - AC_MSG_RESULT([yes]) - fi -done -if test "x$missing_perl_modules" = "xyes"; then - AC_MSG_WARN([some Perl modules required to compile virt-inspector and the other virt-* tools are missing]) -fi +AS_IF([test "x$PERL" != "xno"], + [ + missing_perl_modules=no + for pm in Pod::Usage Getopt::Long Sys::Virt Data::Dumper XML::Writer Locale::TextDomain Win::Hivex Win::Hivex::Regedit; do + AC_MSG_CHECKING([for $pm]) + if ! $PERL -M$pm -e1 >/dev/null 2>&1; then + AC_MSG_RESULT([no]) + missing_perl_modules=yes + else + AC_MSG_RESULT([yes]) + fi + done + if test "x$missing_perl_modules" = "xyes"; then + AC_MSG_WARN([some Perl modules required to compile virt-inspector and the other virt-* tools are missing]) + fi + ]) AM_CONDITIONAL([HAVE_INSPECTOR], [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"])