diff options
author | Maxim Koltsov <kolmax94@gmail.com> | 2010-11-08 14:16:15 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-08 14:28:51 +0000 |
commit | 57c74708ca4e00db259903998b67489e50b8d12b (patch) | |
tree | a28855a21a992b6fde1927a4b0da92022e8900fa /configure.ac | |
parent | 53c524819323dcea8d5e3d56ff4fc6cf49b6c64f (diff) | |
download | libguestfs-57c74708ca4e00db259903998b67489e50b8d12b.tar.gz libguestfs-57c74708ca4e00db259903998b67489e50b8d12b.tar.xz libguestfs-57c74708ca4e00db259903998b67489e50b8d12b.zip |
build: Add ./configure --disable-perl option.
This disables the Perl bindings.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 979a0cd2..439846d2 100644 --- a/configure.ac +++ b/configure.ac @@ -513,25 +513,32 @@ AM_CONDITIONAL([HAVE_OCAML], AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$OCAML_PKG_xml_light" != "xno"]) dnl Check for Perl (optional, for Perl bindings). -dnl XXX This isn't quite right, we should check for Perl devel library. -AC_CHECK_PROG([PERL],[perl],[perl],[no]) - -dnl Check for Perl modules that must be present to compile and -dnl test the Perl bindings. -missing_perl_modules=no -for pm in Test::More ExtUtils::MakeMaker; 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 or test the Perl bindings are missing]) -fi - +PERL=no +AC_ARG_ENABLE([perl], + AS_HELP_STRING([--disable-perl], [Disable Perl language bindings]), + [], + [enable_perl=yes]) +AS_IF([test "x$enable_perl" != "xno"], + [ + PERL= + AC_CHECK_PROG([PERL],[perl],[perl],[no]) + + dnl Check for Perl modules that must be present to compile and + dnl test the Perl bindings. + missing_perl_modules=no + for pm in Test::More ExtUtils::MakeMaker; 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 or test the Perl bindings are missing]) + fi + ]) AM_CONDITIONAL([HAVE_PERL], [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"]) |