mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
nss: only link to yajl library and nothing else
Now that the code does not refer to any libvirt headers, except internal.h macros, it does not need to link to any libvirt code, nor gnulib either. The only thing it needs is yajl. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
8ee34c4ca8
commit
4ab46435f1
@ -16,36 +16,6 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The NSS module can be loaded into any binary and thus we want
|
||||
* to minimize what code is liable to be run. Especiall we need
|
||||
* to minimize use of any 3rd party libraries which have
|
||||
* __attribute__((constructor)) functions.
|
||||
*
|
||||
* The only way to avoid such deps is to re-compile the
|
||||
* functions with the code in question disabled, and for that we
|
||||
* must override the main config.h rules. Hence this file :-(
|
||||
*/
|
||||
#ifdef LIBVIRT_NSS
|
||||
# undef HAVE_LIBNL
|
||||
# undef HAVE_LIBNL3
|
||||
# undef HAVE_LIBSASL2
|
||||
# undef HAVE_SYS_ACL_H
|
||||
# undef WITH_CAPNG
|
||||
# undef WITH_CURL
|
||||
# undef WITH_DEVMAPPER
|
||||
# undef WITH_DTRACE_PROBES
|
||||
# undef WITH_GNUTLS
|
||||
# undef WITH_LIBSSH
|
||||
# undef WITH_MACVTAP
|
||||
# undef WITH_NUMACTL
|
||||
# undef WITH_SASL
|
||||
# undef WITH_SSH2
|
||||
# undef WITH_VIRTUALPORT
|
||||
# undef WITH_SECDRIVER_SELINUX
|
||||
# undef WITH_SECDRIVER_APPARMOR
|
||||
#endif /* LIBVIRT_NSS */
|
||||
|
||||
#ifndef __GNUC__
|
||||
# error "Libvirt requires GCC >= 4.8, or CLang"
|
||||
#endif
|
||||
|
@ -767,79 +767,6 @@ libvirt_iohelper_CFLAGS = \
|
||||
endif WITH_LIBVIRTD
|
||||
|
||||
|
||||
|
||||
if WITH_NSS
|
||||
noinst_LTLIBRARIES += libvirt-nss.la
|
||||
|
||||
libvirt_nss_la_SOURCES = \
|
||||
util/viralloc.c \
|
||||
util/viralloc.h \
|
||||
util/viratomic.c \
|
||||
util/viratomic.h \
|
||||
util/virautoclean.h \
|
||||
util/virbitmap.c \
|
||||
util/virbitmap.h \
|
||||
util/virbuffer.c \
|
||||
util/virbuffer.h \
|
||||
util/vircommand.c \
|
||||
util/vircommand.h \
|
||||
util/virenum.c \
|
||||
util/virenum.h \
|
||||
util/virerror.c \
|
||||
util/virerror.h \
|
||||
util/virfile.c \
|
||||
util/virfile.h \
|
||||
util/virhash.c \
|
||||
util/virhash.h \
|
||||
util/virhashcode.c \
|
||||
util/virhashcode.h \
|
||||
util/virjson.c \
|
||||
util/virjson.h \
|
||||
util/virkmod.c \
|
||||
util/virkmod.h \
|
||||
util/virlease.c \
|
||||
util/virlease.h \
|
||||
util/virlog.c \
|
||||
util/virlog.h \
|
||||
util/virmacmap.c \
|
||||
util/virmacmap.h \
|
||||
util/virobject.c \
|
||||
util/virobject.h \
|
||||
util/virpidfile.c \
|
||||
util/virpidfile.h \
|
||||
util/virprocess.c \
|
||||
util/virprocess.h \
|
||||
util/virrandom.c \
|
||||
util/virrandom.h \
|
||||
util/virsocketaddr.c \
|
||||
util/virsocketaddr.h \
|
||||
util/virstring.c \
|
||||
util/virstring.h \
|
||||
util/virthread.c \
|
||||
util/virthread.h \
|
||||
util/virthreadjob.c \
|
||||
util/virthreadjob.h \
|
||||
util/virtime.c \
|
||||
util/virtime.h \
|
||||
util/virutil.c \
|
||||
util/virutil.h \
|
||||
$(NULL)
|
||||
|
||||
libvirt_nss_la_CFLAGS = \
|
||||
-DLIBVIRT_NSS \
|
||||
$(AM_CFLAGS) \
|
||||
$(YAJL_CFLAGS) \
|
||||
$(NULL)
|
||||
libvirt_nss_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libvirt_nss_la_LIBADD = \
|
||||
$(YAJL_LIBS) \
|
||||
$(NULL)
|
||||
endif WITH_NSS
|
||||
|
||||
|
||||
install-data-local: $(INSTALL_DATA_LOCAL) \
|
||||
$(INSTALL_DATA_DIRS:%=install-data-%)
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
|
||||
|
@ -631,8 +631,7 @@ int virFileUpdatePerm(const char *path,
|
||||
}
|
||||
|
||||
|
||||
#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR && \
|
||||
!defined(LIBVIRT_NSS)
|
||||
#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
|
||||
|
||||
# if HAVE_DECL_LOOP_CTL_GET_FREE
|
||||
|
||||
|
@ -493,8 +493,8 @@ nss_libnss_libvirt_impl_la_CFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
nss_libnss_libvirt_impl_la_LIBADD = \
|
||||
../gnulib/lib/libgnu.la \
|
||||
../src/libvirt-nss.la
|
||||
$(YAJL_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
nss_libnss_libvirt_la_SOURCES =
|
||||
nss_libnss_libvirt_la_LDFLAGS = \
|
||||
@ -524,8 +524,8 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
nss_libnss_libvirt_guest_impl_la_LIBADD = \
|
||||
../gnulib/lib/libgnu.la \
|
||||
../src/libvirt-nss.la
|
||||
$(YAJL_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
nss_libnss_libvirt_guest_la_SOURCES =
|
||||
nss_libnss_libvirt_guest_la_LDFLAGS = \
|
||||
|
Loading…
Reference in New Issue
Block a user