tests: Tweak vircapstest_LDADD
[libvirt/ericb.git] / config-post.h
blob093f84a7ce2eccb8fc5433f7f5fce1cc78bc9ed7
1 /*
2 * Copyright (C) 2013 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see
16 * <http://www.gnu.org/licenses/>.
20 * Since virt-login-shell will be setuid, we must do everything
21 * we can to avoid linking to other libraries. Many of them do
22 * unsafe things in functions marked __attribute__((constructor)).
23 * The only way to avoid such deps is to re-compile the
24 * functions with the code in question disabled, and for that we
25 * must override the main config.h rules. Hence this file :-(
28 #ifdef LIBVIRT_SETUID_RPC_CLIENT
29 # undef HAVE_LIBNL
30 # undef HAVE_LIBNL3
31 # undef HAVE_LIBSASL2
32 # undef HAVE_SYS_ACL_H
33 # undef WITH_CAPNG
34 # undef WITH_CURL
35 # undef WITH_DBUS
36 # undef WITH_DEVMAPPER
37 # undef WITH_DTRACE_PROBES
38 # undef WITH_GNUTLS
39 # undef WITH_LIBSSH
40 # undef WITH_MACVTAP
41 # undef WITH_NUMACTL
42 # undef WITH_SASL
43 # undef WITH_SSH2
44 # undef WITH_SYSTEMD_DAEMON
45 # undef WITH_VIRTUALPORT
46 # undef WITH_YAJL
47 #endif
50 * With the NSS module it's the same story as virt-login-shell. See the
51 * explanation above.
53 #ifdef LIBVIRT_NSS
54 # undef HAVE_LIBNL
55 # undef HAVE_LIBNL3
56 # undef HAVE_LIBSASL2
57 # undef HAVE_SYS_ACL_H
58 # undef WITH_CAPNG
59 # undef WITH_CURL
60 # undef WITH_DEVMAPPER
61 # undef WITH_DTRACE_PROBES
62 # undef WITH_GNUTLS
63 # undef WITH_LIBSSH
64 # undef WITH_MACVTAP
65 # undef WITH_NUMACTL
66 # undef WITH_SASL
67 # undef WITH_SSH2
68 # undef WITH_VIRTUALPORT
69 # undef WITH_SECDRIVER_SELINUX
70 # undef WITH_SECDRIVER_APPARMOR
71 #endif /* LIBVIRT_NSS */
73 #ifndef __GNUC__
74 # error "Libvirt requires GCC >= 4.4, or CLang"
75 #endif
78 * Define __GNUC_PREREQ to a sane default if it isn't yet defined.
79 * This is done here so that it's included as early as possible; gnulib relies
80 * on this to be defined in features.h, which should be included from ctype.h.
81 * This doesn't happen on many non-glibc systems.
82 * When __GNUC_PREREQ is not defined, gnulib defines it to 0, which breaks things.
84 #ifndef __GNUC_PREREQ
85 # define __GNUC_PREREQ(maj, min) \
86 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
87 #endif
89 #if !(__GNUC_PREREQ(4, 4) || defined(__clang__))
90 # error "Libvirt requires GCC >= 4.4, or CLang"
91 #endif