diff --git a/libvirt.spec.in b/libvirt.spec.in index 80c5c1f37a..050903647b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -8,6 +8,11 @@ sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')} %endif +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%{!?enable_autotools:%define enable_autotools 0} + # A client only build will create a libvirt.so only containing # the generic RPC driver, and test driver and no libvirtd # Default to a full server + client build @@ -349,6 +354,12 @@ Requires(postun): systemd-units %endif # All build-time requirements +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif BuildRequires: python-devel %if %{with_systemd} BuildRequires: systemd-units @@ -729,6 +740,9 @@ of recent versions of Linux (and other OSes). %define init_scripts --with-init_script=redhat %endif +%if 0%{?enable_autotools} +autoreconf -if +%endif %configure %{?_without_xen} \ %{?_without_qemu} \ %{?_without_openvz} \ diff --git a/mingw32-libvirt.spec.in b/mingw32-libvirt.spec.in index 89d1d7fefb..ef636cd39f 100644 --- a/mingw32-libvirt.spec.in +++ b/mingw32-libvirt.spec.in @@ -5,6 +5,11 @@ %define __find_provides %{_mingw32_findprovides} %define __debug_install_post %{_mingw32_debug_install_post} +# Default to skipping autoreconf. Distros can change just this one line +# (or provide a command-line override) if they backport any patches that +# touch configure.ac or Makefile.am. +%{!?enable_autotools:%define enable_autotools 0} + # The mingw build is client only. Set up defaults for hypervisor drivers # that talk via a native remote protocol, and for which prereq mingw # libraries exist. @@ -44,6 +49,12 @@ BuildRequires: mingw32-portablexdr BuildRequires: pkgconfig # Need native version for msgfmt BuildRequires: gettext +%if 0%{?enable_autotools} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libtool +%endif %if %{with_phyp} BuildRequires: mingw32-libssh2 @@ -81,6 +92,9 @@ MinGW Windows libvirt virtualization library. %define _without_xenapi --without-xenapi %endif +%if 0%{?enable_autotools} +autoreconf -if +%endif # XXX enable SASL in future %{_mingw32_configure} \ --without-xen \