Commit Graph

371 Commits

Author SHA1 Message Date
Daniel P. Berrangé
c0a8ea450d po: provide custom make rules for po file management
Historically we have relied on autopoint/gettextize to install a
standard po/Makefile.in.in. There is very limited scope for customizing
this and it also causes a bunch of extra stuff to be pulled into
configure.ac which potentially clashes with gnulib. Writing make rules
for po file management is no more difficult than any other rules libvirt
has, so stop using autopoint/gettextize.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:35:58 +01:00
Jim Fehlig
1dac5fbbbb Remove the xend driver
xend was deprecated in Xen 4.2 and removed from the Xen sources
before the Xen 4.5 release. The last Xen release to contain xend
was Xen 4.4, which was retired upstream in March 2017.

Remove xend support from libvirt since it is unrealistic to use
modern libvirt with ancient Xen.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-09 11:38:05 -06:00
Ján Tomko
5123e6ed1f polkit: reintroduce check for pkcheck
Commit 2499d1a0 was too eager and possibly enabled polkit
on all platforms with D-Bus, regardless of whether they use polkit.

Reintroduce the usage of pkcheck as a witness for --with-polkit=check,
but do not require it for --with-polkit=yes.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Jiří Denemark <jdenemar@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-03-25 22:27:22 +02:00
Rainer Müller
c28d837c0f build: Remove --with-xml-catalog-file option
After validation against XHTML 1.0 was dropped in f802c9de0,
the XML_CATALOG_FILE is not in use anymore. Therefore the checks in
configure can be removed.

Signed-off-by: Rainer Müller <raimue@codingfarm.de>
2018-03-25 19:49:25 +02:00
Andrea Bolognani
5433ec02ad m4: Fix xenstore detection
Commit 596fc3e389 introduced the ability to detect xenstore
using pkg-config for systems with Xen 4.9, but accidentally broke
detection for all other systems. Fix the logic so that it works
in all cases.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-03-14 16:07:31 +01:00
Ján Tomko
2499d1a095 Do not check for pkcheck
All we need is D-Bus.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-14 12:46:26 +01:00
Ján Tomko
0d4b988b3e Merge WITH_POLKIT1 and WITH_POLKIT
There is just one polkit now.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-14 12:46:26 +01:00
Ján Tomko
af41cf5957 Remove Policy-Kit support
Policy-Kit has been replaced by polkit (referred to, respectively,
as POLKIT0 and POLKIT1 in our Makefiles).

The last build fix with old Policy-Kit was in May 2013:
commit <442eb2ba> and build with -Wunused-label was broken
since April 2016: commit <8437130>

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-14 12:46:26 +01:00
Olaf Hering
596fc3e389 m4: use pkgconfig to detect xenstore
Since Xen 4.9 a pkgconfig file exists to gather info about building
against libxenstore.so. Use it if available.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2018-03-14 08:48:31 +01:00
Daniel P. Berrangé
67966ad518 m4: enforce that all enum cases are listed in switch statements
As a general rule any time we switch() on something that is an enum, we
want to have a case for every enum constant. The -Wswitch warning will
report any switch where we've violated this rule, except if that switch
has a default case.

Unfortunately it is reasonable to want to list all enum constants *and*
also have a default case. To get a warning in that scenario requires
that we turn on -Wswitch-enum.

In a few cases where we explicitly don't want to list all enum cases, we
can discard the enum type checking by casting the value to a plain int.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-21 16:59:48 +00:00
Daniel P. Berrangé
9148293018 m4: disable gcc8 -Wcast-function-type warnings from -Wextra
The -Wextra flag bundle gained a new warning -Wcast-function-type.
This complains if you cast between two function prototypes where
the number of parameters or their data types are not compatible.
Unfortunately we need such "bad" function casts for our event
callbacks. It is possible to silence the warning by first casting
to the generic "void (*)(void)" function prototype, but that is
rather ugly to add throughout libvirt code.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-16 14:37:04 +00:00
Daniel P. Berrangé
a1f6030def build: passing the "-z defs" linker flag to prevent undefined symbols
Undefined symbols are a bad thing in general because they can get
resolved in unexpected ways at runtime if multiple sources provide the
same symbol name. For example both glibc and libtirpc may provide XDR
symbols and we want to ensure that we resolve to libtirpc if that's what
we originally built against.

The toolchain maintainers thus strongly recommend that all applications
use the '-z defs' linker flag to prevent undefined symbols. This is
shortly becoming part of the default linker flags for RPMs. As an added
benefit this aligns Linux builds with Windows builds, where the linker
has never permitted undefined symbols.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-09 11:05:10 +00:00
Daniel P. Berrange
ed45361044 libxl: add explicit linkage to xenstore library
Since

  commit eee7bd4ecb
  Author: Joao Martins <joao.m.martins@oracle.com>
  Date:   Tue Jul 26 00:45:14 2016 +0100

    libxl: implement virDomainBlockStats

    Introduce initial support for domainBlockStats API

the libxl driver calls a couple of xenstore APIs, so it must explicitly
link to this library rather than rely on indirect linkage via libxl or
other xen libraries.

Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-25 09:30:54 +00:00
Ján Tomko
33dd664c50 Raise the frame limit for tests
After the latest CPU additions, the build fails with clang:
cputest.c:905:1: error: stack frame size of 26136 bytes
  in function 'mymain' [-Werror,-Wframe-larger-than=]

Raise the relaxed limit which is used for tests.
2018-01-18 10:16:41 +01:00
Michal Privoznik
74416b1d48 m4: Check for rl_completion_quote_character
Apparently we can't assume that people run readline recent enough
to have rl_completion_quote_character (added in readline-5.0
released in 2011). However, we can't compile without it. So if
not present, disable readline.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-01-15 17:59:26 +01:00
Michal Privoznik
72ac507f42 m4: Don't enable bash-completion by default
Due to the way that check logic was written we basically enabled
bash completion whenever readline was enabled. This is not right
because it made bash-completion pkg-config module required.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-01-12 10:43:30 +01:00
Michal Privoznik
f0d390bc16 tools: Provide bash autompletion file
The only purpose of this file is to be sourced. After that one
can use completion even for their bash:

  # virsh list --<TAB><TAB>
  --all                   --inactive ...

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-01-11 18:53:04 +01:00
Andrea Bolognani
fbe315bdc8 m4: Disable -Wdisabled-optimization
After b4f7793ce2, qemuxml2xmltest has apparently become big enough
to trigger a compilation error when using --enable-test-coverage on
aarch64:

    CC       qemuxml2xmltest.o
  qemuxml2xmltest.c: In function 'mymain':
  qemuxml2xmltest.c:1216:1: error: const/copy propagation disabled: 4361 basic blocks and 99285 registers [-Werror=disabled-optimization]
   }
   ^
  qemuxml2xmltest.c:1216:1: error: PRE disabled: 4361 basic blocks and 99285 registers [-Werror=disabled-optimization]
  qemuxml2xmltest.c:1216:1: error: const/copy propagation disabled: 4361 basic blocks and 99285 registers [-Werror=disabled-optimization]
  qemuxml2xmltest.c:1216:1: error: const/copy propagation disabled: 4361 basic blocks and 99285 registers [-Werror=disabled-optimization]

However, as the GCC documentation states, this warning is not really
caused by issues in our code, so it makes sense to disable it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2017-09-06 09:06:26 +02:00
Eric Blake
b887d7b0c7 maint: correct quoting for gl_WARN_ADD
3 out of 4 uses of gl_WARN_ADD() were incorrectly adding "" around
the argument, which in turn resulted in the argument being used
unquoted (configure had gl_positive=""-fstack-protector-all"",
rather than the intended gl_positive="-fstack-protector-all").

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2017-08-28 10:15:05 -05:00
Daniel P. Berrange
1c21dd711c m4: workaround clang/glibc problem with isnan()
When building libvirt with clang we get bogus warnings about
'double' being promoted to 'long double' when calling isnan().

  https://bugzilla.redhat.com/show_bug.cgi?id=1472437

Detect this broken isnan() / compiler combination and disable
the -Wdouble-promotion flag.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-11 17:48:06 +01:00
Jim Fehlig
d8e8b63d30 libxl: Add a test suite for libxl_domain_config generator
The libxl library allows a libxl_domain_config object to be serialized
from/to a JSON string. Use this to allow testing of the XML to
libxl_domain_config conversion process. Test XML is converted to
libxl_domain_config, which is then serialized to json. A json template
corresponding to the test XML is converted to a libxl_domain_config
object using libxl_domain_config_from_json(), and then serialized
back to json using libxl_domain_config_to_json(). The two json
docs are then compared.

Using libxl to convert the json template to a libxl_domain_config
object and then back to json provides a simple way to account for
any changes or additions to the json representation across Xen
releases.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
[update to v3.5.0-rc1, improve error reporting, use /bin/true emulator]
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2017-08-04 10:17:55 -06:00
Daniel P. Berrange
94d2d6429d docs: make xmllint & xsltproc compulsory
We already require libxml to be installed, so it is not unreasonable
to require xmllint and xsltproc to be installed too - any platform
with the former will have the latter too.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Daniel P. Berrange
f802c9de09 docs: drop XHTML 1.0 validation of website
The HTML pages are currently validated against an XHTML 1.0 DTD.
This makes it impossible to take advantage of features that are
introduced in HTML 5, because they'll fail validation.

There is intentionally no DTD defined for HTML 5, so there's no
alternative to XHTML 1.0 DTD that we could switch to. The only
options are to stick with XHTML 1.0 forever, or drop the DTD
validation, and we pick the latter.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Peter Krempa
5aec02dc37 make: Drop building without driver modules
Driver modules proved to be reliable for a long time. Since support for
not building modules complicates the code and makefiles drop it.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-27 12:00:35 +02:00
Pino Toscano
1df47a70fb configure: fix typo in nss error message
This error message refers to the lack of network, not to yajl.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2017-07-10 10:00:43 +02:00
Daniel P. Berrange
f1acc4130c Temporarily disable format truncation warnings
GCC 7.1 introduces a new -Wformat-truncation warning
flag that reports if it thinks the maximum possible
size of the formatted output will exceed the provided
fixed buffer. This is enabled automatically by the
-Wformat warning flag. There are quite a few places
hit by this in libvirt which need rewriting. This is
non-trivial work in some places, so temporarily
disable the new warning until those fixes can be
implemented.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-15 14:22:54 +01:00
Daniel P. Berrange
1ba693994a Disable the -Wduplicated-branches warning
Depending on the platform/architecture, a number of conditionals
in libvirt code expand the same on both branches. This is expected
behaviour and harmless, so disable the warning to avoid creating
unexpected build failures

Two examples, mingw32:

../../src/util/vircommand.c: In function 'virCommandWait':
../../src/util/vircommand.c:2562:51: error: this condition has identical branches [-Werror=duplicated-branches]
             *exitstatus = cmd->rawStatus ? status : WEXITSTATUS(status);
                                                   ^
and gcc7.1

In file included from util/virobject.c:28:0:
util/virobject.c: In function 'virClassNew':
util/viratomic.h:176:46: error: this condition has identical branches [-Werror=duplicated-branches]
            (void)(0 ? *(atomic) ^ *(atomic) : 0);                      \
                                             ^
util/virobject.c:144:20: note: in expansion of macro 'virAtomicIntInc'
    klass->magic = virAtomicIntInc(&magicCounter);
                   ^~~~~~~~~~~~~~~

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-15 13:26:51 +01:00
Roman Bogorodskiy
9ea3424a17 virsh: workaround readline prototypes warnings
When building with clang 4.0.0, virsh build fails like this:

gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools'
  CC       virsh-virsh.o
In file included from virsh.c:45:
In file included from /usr/local/include/readline/readline.h:31:
/usr/local/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int Function () __attribute__ ((deprecated));
                     ^
                      void
/usr/local/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef void VFunction () __attribute__ ((deprecated));
                       ^
                        void
/usr/local/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char *CPFunction () __attribute__ ((deprecated));
                         ^
                          void
/usr/local/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char **CPPFunction () __attribute__ ((deprecated));
                           ^
                            void
In file included from virsh.c:45:
/usr/local/include/readline/readline.h:385:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int rl_message ();
                      ^
                       void
5 errors generated.
gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1

Fix that by adding -D_FUNCTION_DEF to READLINE_CFLAGS to fix *Function
related warnings and add a check for stdarg.h so we have HAVE_STDARG_H
defined that's needed by the readline headers to use proper rl_message
declaration.

Bug report on the readline mailing list:

 http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00004.html
2017-06-08 21:03:34 +04:00
Erik Skultety
5970b13982 udev: Fix build on older platforms
Caused by commit @d1eea6c1 due to the missing symbol on older platforms.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2017-05-31 13:28:24 +02:00
Julio Faracco
424a21a9c8 m4: Fix missing with_acl variable
This commit fixes an acl missing variable. The virt-acl.m4 inside the
macro directory does not contain the variable 'with_acl'. So, it is
being set as an empty string "with_acl=''". This is causing a missing
option during the configuration, even if you have acl libs installed.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
2017-05-26 11:37:44 +02:00
Jiri Denemark
23377c539b locking: Add support for sanlock_strerror
The recently added sanlock_strerror function can be used to translate
sanlock's numeric errors into human readable strings.

https://bugzilla.redhat.com/show_bug.cgi?id=1409511

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-04-27 11:44:11 +02:00
Daniel P. Berrange
4d80317655 virt-storage-rbd: fix typo s/RDB/RBD/ in configure check
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-19 15:01:17 +01:00
Daniel P. Berrange
354191c5f1 Fix detection of required RBD version
If building libvirt against Ubuntu precise, the librbd.h is lacking
many functions that libvirt expects. We have no version check, so
we were enabling RBD even though it cannot compile. This configure
check uses existance of 'rbd_get_features' as an identifier for the
min required version.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-19 10:51:51 +01:00
Ján Tomko
e73889b631 Split out -Wframe-larger-than warning from WARN_CLFAGS
Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for
production code and RELAXED_FRAME_LIMIT_CFLAGS for tests.

Raising the limit for tests allows building them with clang
with optimizations disabled.
2017-04-06 12:29:35 +02:00
Peter Krempa
17c4b07a38 configure: Fix configure output for RBD storage backend
We'd print status for the 'dir' backend instead of the correct one.
2017-02-21 08:19:11 +01:00
Andrea Bolognani
c315ead702 configure: Move ACL checks to a separate file 2017-02-14 19:06:30 +01:00
Peter Krempa
a7ae7ca9d4 configure: Fix copy-paste error in vstorage backend check
The 'fs' backend m4 code was copied, but one of the condition were not
changed which resulted into:

configure:    Gluster: yes
configure:        ZFS: yes
configure: Virtuozzo storage: check

Make the code turn on the virtuozzo driver automatically if the tools
are found.
2017-01-27 10:37:56 +01:00
Olga Krishtal
e590d5301e storage: Introduce Virtuozzo vstorage backend
Added general definitions for vstorage pool backend including
the build options to add --with-storage-vstorage checking.
In order to use vstorage as a backend for a storage pool
vstorage tools (vstorage and vstorage-mount) need to be installed.

Signed-off-by: Olga Krishtal <okrishtal@virtuozzo.com>
2017-01-26 10:43:42 -05:00
Boris Fiuczynski
16dd2f030a configure: fix indentation in TLS priority result
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2017-01-24 17:24:14 +01:00
Michal Privoznik
09da661006 virt-nss: Introduce more checks before enabling NSS
The plugin depends on more modules than we currently check for,
i.e. network driver and yajl library.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2017-01-02 13:25:42 +01:00
Andrea Bolognani
e64f2fab92 m4/virt-arg: Rename LIBVIRT_ARG_WITH* macros
LIBVIRT_ARG_WITH_ALT is more generic than LIBVIRT_ARG_WITH, which
is tailored at switching features on and off.

Rename the macros according to their intended purpose, and add
some documentation to help developers pick between the two.
2016-12-22 15:20:05 +01:00
Andrea Bolognani
bd4255680d m4/virt-arg: Move LIBVIRT_ARG_* macros to their own file
They're not just used, or supposed to be just used, for
library-related arguments, so they deserve to have their
own separate file.
2016-12-22 15:20:05 +01:00
Pavel Hrdina
aac34eca90 m4/virt-gnutls: properly backup CFLAGS and LIBS for AC_CHECK_* macros
Commit 943ddcb712 partially fixed this bug in gnutls configure code.
However we also need to backup and modify CFLAGS and do if for
AC_CHECK_HEADERS as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-22 14:14:40 +01:00
Pavel Hrdina
ba5d9dd476 m4/virt-gnutls: use AC_CHECK_FUNCS to detect availability of functions
Sigh, autoconf has AC_CHECK_FUNC and AC_CHECK_FUNCS and both check
whether some function exists or not.  However in addition to the obvious
difference that the later is able to check multiple functions it also
defines HAVE_FUNCTION_NAME for each function.

Commit 680d2f49da moved the code to separate file, but also blindly
changed the macro to AC_CHECK_FUNC without confronting the
documentation.

Reported-by: John Ferlan <jferlan@redhat.com>

<https://www.redhat.com/archives/libvir-list/2016-December/msg01086.html>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-22 10:30:10 +01:00
Pavel Hrdina
513824a8be m4/virt-lib: use correct format of package name for AC_ARG_* macros
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>
2016-12-21 22:24:55 +01:00
Pavel Hrdina
83390dac2f m4/virt-loader-nvram: use quotation for list of loader:nvram pairs
The bug was introduced by commit 08c2d1480b.  The string must be quoted
because it is used as function argument.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 21:29:30 +01:00
Pavel Hrdina
decce786a3 configure: move storage ZFS check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
ef386bf7a2 configure: move storage Gluster check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
9a9073a132 configure: move storage Sheepdog check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
173f8a2f7b configure: move storage RBD check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
dfa5820b67 configure: move storage disk check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
c5241454dd configure: move storage mpath check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
0a5af1b93c configure: move storage SCSI check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
9290a748e9 configure: move storage iSCSI check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
ed46a79213 configure: move storage LVM check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
61418e5584 configure: move storage fs check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:43 +01:00
Pavel Hrdina
9f092db85a configure: move storage dir check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
2700764acc configure: move AppArmor secdriver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
2caf4d6cdf configure: move SELinux secdriver check into its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
01463beb79 configure: move parallels version definition to m4/virt-driver-vz
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
66611879f1 configure: move interface driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
bdfb892ba8 configure: move network driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
13b238dc86 configure: move libvirtd driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
35d07e3da5 configure: move Hyper-V driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
ceb2e03912 configure: move ESX driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
572e79df7e configure: move vbox driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
5f1ace8e38 configure: move remote driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
da2cef55b2 configure: move test driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:42 +01:00
Pavel Hrdina
8577d4a049 configure: move PHYP driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
12050cf11c m4/virt-driver-xenapi: use LIBVIRT_CHECK_LIB macro
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
02957106a0 configure: move XenAPI driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
7f0caf57cc m4/virt-libxl: cleanup storing CFLAGS and LIBS variables
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
5767a2da4b m4/virt-libxl: properly check for required libxl version
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
2620fa178d m4/virt-libxl: use LIBVIRT_CHECK_(PKG|LIB) macros
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
9dcfa182a2 configure: move libxl driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
10ecd90213 configure: move XEN driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
07b1d80a2a configure: move LXC driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
68649d1007 configure: move qemu bridge helper check to qemu driver file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
3138d6993e configure: move qemu privileges check to qemu driver file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
32af9539a3 configure: move QEMU driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
6827072857 configure: move VMware driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
c0c7fdaf24 configure: move OpenVZ driver check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:41 +01:00
Pavel Hrdina
eea1d6dc90 configure: move debug check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
7d55c6003c configure: move xml catalog file check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
634cf2bb1e configure: move TLS priority check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
fcdcb7353e configure: move default editor check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
a26ed14a4a configure: move loader/nvram check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
b1b9d15a05 configure: move chrdev lock files check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
24ef6bccfb configure: move sysctl config check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
a02992a246 configure: move numad check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
1dec40f870 configure: move DTrace check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
b51714bd05 m4/virt-parted: use LIBVIRT_CHECK_PKG
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
597efd7a26 configure: move libparted check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:40 +01:00
Pavel Hrdina
60af91ca85 m4/virt-devmapper: use LIBVIRT_CHECK_(PKG|LIB)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
f1a7a624d0 configure: move devmapper check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
71844322a4 configure: move pm-utils check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
9461a9f94b configure: move nwfilter check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
ed4cae50da configure: move windres check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
349727dc46 configure: move windows symbols check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
4675c6dd36 configure: move MinGW check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
e62541be0f configure: move Cygwin check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
9587319333 configure: move windows common check to its own file
This renames MSCOM_LIBS to WIN32_EXTRA_LIBS to make it consistent with
WIN32_EXTRA_CFLAGS.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
21b3f33978 configure: move libnl check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
994fe998b7 configure: move virtualport check to its own file
This patch moves the virtualport result out of *Driver* section because
it's not a driver.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
e0a39ba09d configure: move macvtap check to its own file
This patch moves the macvtap result out of *Driver* section because
it's not a driver.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
604f6ef85f m4/virt-libpcap: error out if asked for libpcap but it was not found
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:39 +01:00
Pavel Hrdina
368e143a1c m4/virt-libpcap: remove unreasonable dependency on QEMU
Libpcap is used by nwfilter driver and it could be build without QEMU
driver.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
41872ffade configure: move libpcap check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
438c8c1626 configure: move XDR check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
e18108acb4 configure: move atomic check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
9a9623a68a configure: move pthread check it its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
5b2d616c9e configure: move polkit check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
00125bdf58 configure: move firewalld check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
aee0043bd7 configure: move with-driver-modules check to its own file
Rename DRIVER_MODULE_(LDFLAGS|LIBS|CFLAGS) to unify the naming.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
a811e45824 configure: move dlopen check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
71cf49b774 m4/virt-libxml: use LIBVIRT_CHECK_PKG
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
46ccbea870 m4/virt-libxml: use only pkg-config to check for libxml2
Pkg-config file libxml-2.0.pc was introduced in libxml2-2.2.4 and we
require at least 2.6.0 so the crazy xml2-config check can be dropped.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
4c71c20eff configure: move libxml check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
4565980313 m4/virt-lib: add new parameter to override default fail action
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>
2016-12-21 15:39:38 +01:00
Pavel Hrdina
eeccee1870 m4/virt: introduce LIBVIRT_ARG_* macros for all library checks
Usage of AC_REQUIRE will mess with order how LIBVIRT_CHECK_* macros
are composed into configure.ac.  This ensures that the output of
configure --help is properly ordered and grouped into sections.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
e03d43714a m4/virt-lib: move LIBVIRT_ARG_WITH out of LIBVIRT_CHECK_(LIB|LIB_ALT|PKG)
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>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
ca01aeb57f configure: use LIBVIRT_ARG_ENABLE macro
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
08c2d1480b configure: use LIBVIRT_ARG_WITH(_ALT) macros
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
7f1e6e9d5a m4/virt-lib: introduce LIBVIRT_ARG_ENABLE macro
This macro helps create unified output of "configure --help".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
4519e94b74 m4/virt-lib: introduce LIBVIRT_ARG_WITH(_ALT) macro
These macros help create unified output of "configure --help".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
ec1a663195 m4/virt: use LIBVIRT_RESULT macro instead of AC_MSG_NOTICE
The LIBVIRT_RESULT does a nice formatting of the output and ensures
that the format is unified.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
c093fb1fdc m4/virt: create result macros for the remaining virt check
All checks that prints result at the end of configure uses
LIBVIRT_RESULT_${CHECK_NAME}.  Create those macros for remaining check.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
90d376a75a configure: move external programs check to its own file
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
5bacfec2da m4/virt-netcf: fix bug where we overwrite LIBS
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-12-21 15:39:37 +01:00
Pavel Hrdina
d3f851c516 m4/virt-lib: properly pass header_name in LIBVIRT_CHECK_LIB(_ALT)
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>
2016-12-07 16:21:31 +01:00
Nikos Mavrogiannopoulos
943ddcb712 virt-gnutls.m4: fixed check for gnutls_rnd and gnutls_cipher_encrypt 2016-11-30 14:29:46 +00:00
Pino Toscano
6917467c2b libssh_transport: add new libssh-based transport
Implement a new libssh transport, which uses libssh to communicate with
remote hosts, and add all the build system stuff (search of libssh,
private symbols, etc) to built it.

This new transport supports all the common ssh authentication methods,
making use of libvirt's auth callbacks for interaction with the user.
2016-11-15 15:50:51 +01:00
Andrea Bolognani
7b3b254063 wireshark: Use ${exec_prefix} instead of ${prefix}
${exec_prefix} and ${prefix} point to the same directory in
most setups, but when that's not the case the former should
be used for architecture-dependent data such as shared objects,
which makes it the best fit for our Wireshark dissector.

While at it, change all uses of $(var) to ${var}: they are
absolutely identicaly as far as make's concerned, but autoconf
itself seems to prefer the latter form so we might as well
follow suit.
2016-11-07 10:16:06 +01:00
Andrea Bolognani
054fd1a7d0 wireshark: Make fallback path construction more reliable
We only need to strip $ws_prefix from $ws_plugindir if we've
retrieved it from pkg-config: if we're building it ourselves
from $libdir, we can just use it without further processing.
2016-11-07 10:16:06 +01:00
Pavel Hrdina
a55fdc3f25 configure: check gnutls related stuff only if gnutls was found
This fixes a build issue with old gnutls.
Broken by commit 680d2f49da.

Reported-by: Olga Krishtal <okrishtal@virtuozzo.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-11-03 15:45:16 +01:00
Pavel Hrdina
0c62ccf927 m4/virt-gnutls: remove code for gnutls < 2.2.0
Commit d8a8af3492 changed the minimal required version of gnutls
so it's safe to remove the code for older versions.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-11-02 10:19:09 +01:00
Pavel Hrdina
680d2f49da configure: move gnutls check into virt-gnutls.m4
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-11-02 10:19:09 +01:00
Andrea Bolognani
3cbf054995 wireshark: Rename plugindir to ws_plugindir
Since we're using autoconf to substitute the right value in
Makefile.am now, we can use a less generic name without running
into circular dependencies.
2016-10-26 17:00:21 +02:00
Andrea Bolognani
c587c73549 wireshark: Inject $(prefix) at the right time
Adding $(prefix) in Makefile.am, as we were doing, means that
it would be prepended even when using --with-ws-plugindir,
which is something we don't want to happen.

Instead, we add it beforehand but take care that it doesn't
get expanded until make is called.
2016-10-26 17:00:21 +02:00
Andrea Bolognani
debf2f0b8a wireshark: Strip prefix correctly
Even when we're building $plugindir ourselves because we can't
retrieve it using pkg-config, we still want to strip the prefix,
except in that case it would be the same prefix we're using for
building libvirt.

The fact that $plugindir is missing also doesn't tell us
anything about $ws_prefix, so we have to handle the two variables
separately.
2016-10-26 17:00:21 +02:00
Andrea Bolognani
c64a0a8e32 wireshark: Hoist $ws_prefix declaration
Keep all variable declarations close together.
2016-10-26 17:00:21 +02:00
Andrea Bolognani
182517013e wireshark: Introduce $ws_modversion
Use a separate variable instead of setting it inline for
slightly cleaner code.
2016-10-26 17:00:20 +02:00
Michal Privoznik
35e45760ee virt-wireshark.m4: Defer $(prefix) substitution
The autoconf manual says we shouldn't be using this variable (and
some others) outside of Makefiles as it prevents users providing
their own prefix at the installation phase.

https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Installation-Directory-Variables.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-10-21 09:27:33 +08:00
Andrea Bolognani
a0da41349c m4: Drop PKG_PROG_PKG_CONFIG compatibility code
This was needed for RHEL 4 vintage distributions, which we
haven't supported for a long time now.
2016-10-06 17:36:05 +02:00
Martin Kletzander
36e73cb70b virt-yajl: Fix detection of yajl requirements
Running the output of qemu -help doesn't make any sense.  We should be
looking for libvirt being mentioned in the output.  This worked by
accident, let's make it work as expected it to.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-10-06 13:35:42 +02:00
Michal Privoznik
2bca7cec0b m4: Check for sanlock_write_lockspace
Currently, we are checking for sanlock_add_lockspace_timeout
which is good for now. But in a subsequent patch we are going to
use sanlock_write_lockspace (which sets an initial value for io
timeout for sanlock). Now, there is no reason to check for both
functions in sanlock library as the sanlock_write_lockspace was
introduced in 2.7 release and the one we are currently checking
for in the 2.5 release. Therefore it is safe to assume presence
of sanlock_add_lockspace_timeout when sanlock_write_lockspace
is detected.

Moreover, the macro for conditional compilation is renamed to
HAVE_SANLOCK_IO_TIMEOUT (as it now encapsulates two functions).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-09-29 16:59:11 +02:00
Michal Privoznik
5c2bc001a2 virt-wireshark: Properly substract wireshark prefix
So, when building wireshark plugin, we get the plugindir variable
from the wireshark.pc as well as prefix. Then we replace the
prefix in the plugindir with our own prefix where libvirt is
building to:

  plugindir="${prefix}${plugindir#ws_prefix}"

However, as you can see, there's '$' missing in front of the
ws_prefix variable. This results in the mangled plugindir, for
instance like this:

  plugindir='/usr/usr/lib64/wireshark/plugins'

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-27 17:01:18 +02:00
Fabian Freyer
b436a8ae5c gnulib: add getopt module
Unconditionally use gnulib's getopt module. This is needed by the bhyve driver
to provide a reentrant interface for getopt.

Several gnulib headers rely on features.h being included by ctype.h to provide
__GNUC_PREREQ, but on systems without glibc, this is not provided. In these
cases __GNUC_PREREQ gets redefined to 0, which causes build errors from checks
in src/internal.h.
Therefore, define __GNUC_PREREQ as early as possible. config-post.h is probably
the first header that is included, before any other headers.
2016-07-10 15:39:44 -04:00
Roman Bogorodskiy
a5059b9b02 virt-login-shell: mark as Linux only
Currently, virt-login-shell is not allowed to build on Windows.
However, as it's designed around LXC, it does not make sense to
build it on anything but Linux, so make the check stricter and allow to
enable it on Linux only.
2016-06-13 12:51:17 +03:00
Daniel P. Berrange
c0bc172383 systemd: directly notify systemd instead of using sd_notify
The sd_notify method is used to tell systemd when libvirtd
has finished starting up. All it does is send a datagram
containing the string parameter to systemd on a UNIX socket
named in the NOTIFY_SOCKET environment variable. Rather than
pulling in the systemd libraries for this, just code the
notification directly in libvirt as this is a stable ABI
from systemd's POV which explicitly allows independant
implementations:

See "Reimplementable Independently" column in the
"$NOTIFY_SOCKET Daemon Notifications" row:

https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1314881

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-06-07 09:37:57 +01:00