]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: force configure failed when perl is missing
authorJincheng Miao <jmiao@redhat.com>
Thu, 14 Aug 2014 03:37:45 +0000 (11:37 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 14 Aug 2014 09:28:18 +0000 (11:28 +0200)
Perl is necessary to our build processing, it will invoke a lot of
generating script, like: gendispatch.pl. If perl is missing, it's
ok for build from git checkout, because autogen.sh will tell you.
But for compiling from a release tarball, configure will just record
a missing message, and continue, then build failed, like:
https://www.redhat.com/archives/libvirt-users/2014-August/msg00050.html

So need to enhance configure script to handle this negative case.

Reported-by: Hongbin Lu <hongbin@savinetwork.ca>
Signed-off-by: Jincheng Miao <jmiao@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
configure.ac
libvirt.spec.in

index 081f2981cf9947628bda5cb92bec5291b756e680..af3fe2896438cdb91a6a369caecbfb14a1bf9af1 100644 (file)
@@ -2173,6 +2173,9 @@ AM_CONDITIONAL([WITH_HYPERV], [test "$with_hyperv" = "yes"])
 dnl Allow perl/python overrides
 AC_PATH_PROGS([PYTHON], [python2 python])
 AC_PATH_PROG([PERL], [perl])
+if test -z "$PERL"; then
+         AC_MSG_ERROR([Failed to find perl.])
+fi
 
 AC_ARG_WITH([test-suite],
             [AS_HELP_STRING([--with-test-suite],
index 29da071b476789b695e0ea4b29ca9530f998a07b..f491de7f3d1eee8c3672d9dafbd89b78716dbeae 100644 (file)
@@ -446,6 +446,7 @@ BuildRequires: gettext-devel
 BuildRequires: libtool
 BuildRequires: /usr/bin/pod2man
 %endif
+BuildRequires: perl
 BuildRequires: python
 %if %{with_systemd}
 BuildRequires: systemd-units