Introduced by commit 25034b3c40 and reused by commit 4519e94b74.
This patch silences warning printed by configure:
configure: WARNING: unrecognized options: --with-qemu-user
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This allows to use two or more LIBVIRT_CHECK_(LIB|LIB_ALT|PKG) macros
for one library. For example, when we check for existence of
pgk-config file of some library and we know that not all versions of
that library that libvirt requires provides this file, we can fallback
to use library check.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Following patch will update LIBVIRT_CHECK_(LIB|LIB_ALT|PKG) macros in
a way that you will be able to call a another macro as a fallback if
the first one fails. To allow that, we need to move the
LIBVIRT_ARG_WITH out of those macro to not have two or more same lines
in output of "configure --help".
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
The *header_name* cannot be quoted, otherwise it is not translated to
the passed argument. Without this fix the generated configure contains
*ac_cv_header_header_name*, but there should be for example
*ac_cv_header_sals_sasl_h* for "sasl/sasl.h".
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Commit 68954fb added a configure option --with-systemd_daemon,
which violates the conventions of configure files preferring
dash in all option names. This fixes it, before we hit a
release where the tarball is baked with an awkward name.
* m4/virt-lib.m4 (LIBVIRT_CHECK_LIB, LIBVIRT_CHECK_LIB_ALT)
(LIBVIRT_CHECK_PKG): Favor - over _ in configure option names.
Signed-off-by: Eric Blake <eblake@redhat.com>
Jonathan Lebon reported an issue to me off-list about his build
failing to use qemu because he failed to install yajl-devel. But
I recalled specifically tweaking configure.ac to die in that
situation (commits 350583c, ba9c38b). After a bit more
head-scratching, we found the cause of the regression: commit
654c709 rearranged things so that the qemu version check now
occurs before AC_ARG_WITH has had a chance to set either
$with_qemu or $with_yajl.
Coincidentally, this fix aligns with a documentation patch that
was just posted to the autoconf mailing list :)
http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/8324
* m4/virt-lib.m4 (LIBVIRT_CHECK_LIB, LIBVIRT_CHECK_LIB_ALT)
(LIBVIRT_CHECK_PKG): Populate defaults earlier.
* configure.ac (AC_ARG_WITH): Likewise for drivers.
Signed-off-by: Eric Blake <eblake@redhat.com>
It adds an empty space after the package version. Previously the error
message looked like:
"You must install the dbus-1 >= 1.0.0pkg-config module to compile libvirt"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Problem introduced in commit cd699ed.
* m4/virt-lib.m4 (LIBVIRT_CHECK_LIB, LIBVIRT_CHECK_PKG): Set up
direct expansions, since autoconf 2.59 lacked m4_expand.
Most checks for libraries take the same format
* --with-libFOO=yes|no|check|/some/path argument
* check for a function NNN in libFOO.so
* check for a header file DDD/HHH.h
* Define a WITH_FOO config.h symbol
* Define a WITH_FOO make conditional
* Substitute FOO_CFLAGS and FOO_LIBS make variables
* Print CFLAGS & LIBS summary at the end
Doing all this correctly is rather difficult, typically
done by copy+paste of a previous usage. Further small
improvements people make are not applied to all previous
usages.
Improve this by creating some helper macros to apply
good practice. First, to perform the actual checks:
LIBVIRT_CHECK_LIB([SELINUX], [selinux],
[getfilecon], [selinux/selinux.h])
This checks for 'getfilecon' in -lselinux, and the
existence of 'selinux/selinux.h' header file. If successful
it sets SELINUX_CFLAGS and SELINUX_LIBS. The WITH_SELINUX
config.h macro and WITH_SELINUX make conditional are also
defined.
In some cases we need to check two variants of the same
library
LIBVIRT_CHECK_LIB_ALT([SASL], [sasl2],
[sasl_client_init], [sasl/sasl.h],
[SASL1], [sasl],
[sasl_client_init], [sasl/sasl.h])
This checks for sasl_client_init in libsasl2, and if that
is not found, checks sasl_client_init in libsasl. If the
first check succeeds WITH_SASL is set, while if the second
check succeeds *both* WITH_SASL and WITH_SASL1 are set.
If the library supports pkg-config, then another variant
is available
LIBVIRT_CHECK_PKG([AVAHI], [avahi-client], [0.6.0])
This checks for avahi-client >= 0.6.0 via pkg-config
and sets WITH_AVAHI if found.
Finally to print a summary of CFLAGS & LIBs found (if any):
LIBVIRT_RESULT_LIB([SELINUX])
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>