]> xenbits.xensource.com Git - libvirt.git/commitdiff
make: Drop building without driver modules
authorPeter Krempa <pkrempa@redhat.com>
Wed, 26 Jul 2017 19:31:47 +0000 (21:31 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 27 Jul 2017 10:00:35 +0000 (12:00 +0200)
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>
daemon/Makefile.am
daemon/libvirtd.c
m4/virt-driver-modules.m4
src/Makefile.am
src/driver.c
src/storage/storage_backend.c
src/vbox/vbox_driver.c
src/vbox/vbox_driver.h
tests/Makefile.am
tests/testutils.c
tools/virsh.c

index d02ab33bd18c5a0b1cc2bea1d365b007fe1824e7..697778e565a428b2f8088a7df93af003aa128158 100644 (file)
@@ -208,63 +208,6 @@ libvirtd_LDADD += \
        ../src/libvirt_driver_remote.la \
        $(NULL)
 
-if ! WITH_DRIVER_MODULES
-if WITH_QEMU
-    libvirtd_LDADD += ../src/libvirt_driver_qemu.la
-if WITH_DTRACE_PROBES
-    libvirtd_LDADD += ../src/libvirt_qemu_probes.lo
-endif WITH_DTRACE_PROBES
-endif WITH_QEMU
-
-if WITH_LXC
-    libvirtd_LDADD += ../src/libvirt_driver_lxc.la
-endif WITH_LXC
-
-if WITH_XEN
-    libvirtd_LDADD += ../src/libvirt_driver_xen.la
-endif WITH_XEN
-
-if WITH_LIBXL
-    libvirtd_LDADD += ../src/libvirt_driver_libxl.la
-endif WITH_LIBXL
-
-if WITH_UML
-    libvirtd_LDADD += ../src/libvirt_driver_uml.la
-endif WITH_UML
-
-if WITH_VBOX
-    libvirtd_LDADD += ../src/libvirt_driver_vbox.la
-endif WITH_VBOX
-
-if WITH_VZ
-    libvirtd_LDADD += ../src/libvirt_driver_vz.la
-endif WITH_VZ
-
-if WITH_STORAGE
-    libvirtd_LDADD += ../src/libvirt_driver_storage.la
-endif WITH_STORAGE
-
-if WITH_NETWORK
-    libvirtd_LDADD += ../src/libvirt_driver_network.la
-endif WITH_NETWORK
-
-if WITH_INTERFACE
-    libvirtd_LDADD += ../src/libvirt_driver_interface.la
-endif WITH_INTERFACE
-
-if WITH_NODE_DEVICES
-    libvirtd_LDADD += ../src/libvirt_driver_nodedev.la
-endif WITH_NODE_DEVICES
-
-if WITH_SECRETS
-    libvirtd_LDADD += ../src/libvirt_driver_secret.la
-endif WITH_SECRETS
-
-if WITH_NWFILTER
-    libvirtd_LDADD += ../src/libvirt_driver_nwfilter.la
-endif WITH_NWFILTER
-endif ! WITH_DRIVER_MODULES
-
 libvirtd_LDADD += ../src/libvirt.la
 
 if WITH_POLKIT
index a558458732bdb8175f34796c82d2c14391d86cb6..7e5d7af69e3f44c18b4c9b1a81e65db752703c2c 100644 (file)
 #include "virgettext.h"
 #include "util/virnetdevopenvswitch.h"
 
-#ifdef WITH_DRIVER_MODULES
-# include "driver.h"
-#else
-# ifdef WITH_QEMU
-#  include "qemu/qemu_driver.h"
-# endif
-# ifdef WITH_LXC
-#  include "lxc/lxc_driver.h"
-# endif
-# ifdef WITH_XEN
-#  include "xen/xen_driver.h"
-# endif
-# ifdef WITH_LIBXL
-#  include "libxl/libxl_driver.h"
-# endif
-# ifdef WITH_UML
-#  include "uml/uml_driver.h"
-# endif
-# ifdef WITH_VBOX
-#  include "vbox/vbox_driver.h"
-# endif
-# ifdef WITH_BHYVE
-#  include "bhyve/bhyve_driver.h"
-# endif
-# ifdef WITH_NETWORK
-#  include "network/bridge_driver.h"
-# endif
-# ifdef WITH_INTERFACE
-#  include "interface/interface_driver.h"
-# endif
-# ifdef WITH_STORAGE
-#  include "storage/storage_driver.h"
-# endif
-# ifdef WITH_NODE_DEVICES
-#  include "node_device/node_device_driver.h"
-# endif
-# ifdef WITH_SECRETS
-#  include "secret/secret_driver.h"
-# endif
-# ifdef WITH_NWFILTER
-#  include "nwfilter/nwfilter_driver.h"
-# endif
-#endif
-#ifdef WITH_VZ
-# include "vz/vz_driver.h"
-#endif
+#include "driver.h"
 
 #include "configmake.h"
 
@@ -341,13 +296,8 @@ static int daemonErrorLogFilter(virErrorPtr err, int priority)
 }
 
 
-#ifdef WITH_DRIVER_MODULES
-# define VIR_DAEMON_LOAD_MODULE(func, module) \
+#define VIR_DAEMON_LOAD_MODULE(func, module) \
     virDriverLoadModule(module, #func)
-#else
-# define VIR_DAEMON_LOAD_MODULE(func, module) \
-    func()
-#endif
 static void daemonInitialize(void)
 {
     /*
index ba65c3ba6ca7a331b6c46d6000dcf700cd470d44..8bf8ecf2b1ee8f2e6d1d5a738c2f04ffb7a90f3a 100644 (file)
@@ -19,7 +19,7 @@ dnl
 
 AC_DEFUN([LIBVIRT_ARG_DRIVER_MODULES], [
   LIBVIRT_ARG_WITH([DRIVER_MODULES], [build drivers as loadable modules],
-                   [check])
+                   [yes])
 ])
 
 AC_DEFUN([LIBVIRT_CHECK_DRIVER_MODULES], [
@@ -27,28 +27,26 @@ AC_DEFUN([LIBVIRT_CHECK_DRIVER_MODULES], [
 
   if test "$with_libvirtd" = "no" ; then
     with_driver_modules=no
+  else
+    if test "$with_driver_modules" = "no"; then
+      AC_MSG_ERROR([Building without driver modules is not supported anymore])
+    fi
+
+    if test "$with_driver_modules" = "check"; then
+      with_driver_modules=yes
+    fi
   fi
 
   DRIVER_MODULES_CFLAGS=
   DRIVER_MODULES_LIBS=
-  if test "$with_driver_modules" = "yes" || test "$with_driver_modules" = "check"; then
+  if test "$with_driver_modules" = "yes"; then
     if test "$with_dlfcn" != "yes" || test "$with_dlopen" != "yes"; then
-      if test "$with_driver_modules" = "yes" ; then
-        AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
-      else
-        with_driver_modules=no
-      fi
-    else
-      with_driver_modules=yes
+      AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
     fi
-  fi
 
-  if test "$with_driver_modules" = "yes" ; then
     DRIVER_MODULES_LDFLAGS="-export-dynamic"
     DRIVER_MODULES_LIBS="$DLOPEN_LIBS"
-    AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
   fi
-  AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
   AC_SUBST([DRIVER_MODULES_LDFLAGS])
   AC_SUBST([DRIVER_MODULES_LIBS])
 ])
index d86b2825193d7c6adbc502cfe3271e4348e3fda0..471be40d172e8fb818c6d51f981a6c95b94b1c31 100644 (file)
@@ -1328,15 +1328,9 @@ if WITH_XEN
 noinst_LTLIBRARIES += libvirt_driver_xen_impl.la
 libvirt_driver_xen_la_SOURCES =
 libvirt_driver_xen_la_LIBADD = libvirt_driver_xen_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_xen.la
 libvirt_driver_xen_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_xen_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_xen.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_xen.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_xen_impl_la_CFLAGS =                            \
                $(XEN_CFLAGS)                                   \
@@ -1379,17 +1373,10 @@ noinst_LTLIBRARIES += \
                libvirt_driver_vbox_impl.la
 libvirt_driver_vbox_la_SOURCES =
 libvirt_driver_vbox_la_LIBADD = libvirt_driver_vbox_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += \
                libvirt_driver_vbox.la
 libvirt_driver_vbox_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_vbox.la
-# GPLv2-only license requries that it be linked into
-# libvirtd and *not* libvirt.so
-#libvirt_la_BUILT_LIBADD += libvirt_driver_vbox.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_vbox_impl_la_CFLAGS =                           \
                -I$(srcdir)/conf                                \
@@ -1416,15 +1403,9 @@ if WITH_LIBXL
 noinst_LTLIBRARIES += libvirt_driver_libxl_impl.la
 libvirt_driver_libxl_la_SOURCES =
 libvirt_driver_libxl_la_LIBADD = libvirt_driver_libxl_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_libxl.la
 libvirt_driver_libxl_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_libxl_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_libxl.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_libxl.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_libxl_impl_la_CFLAGS =          \
                $(LIBXL_CFLAGS)                 \
@@ -1452,15 +1433,9 @@ if WITH_QEMU
 noinst_LTLIBRARIES += libvirt_driver_qemu_impl.la
 libvirt_driver_qemu_la_SOURCES =
 libvirt_driver_qemu_la_LIBADD = libvirt_driver_qemu_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_qemu.la
 libvirt_driver_qemu_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_qemu_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_qemu.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_qemu.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_qemu_impl_la_CFLAGS = \
                $(GNUTLS_CFLAGS) \
@@ -1494,15 +1469,9 @@ if WITH_LXC
 noinst_LTLIBRARIES += libvirt_driver_lxc_impl.la
 libvirt_driver_lxc_la_SOURCES =
 libvirt_driver_lxc_la_LIBADD = libvirt_driver_lxc_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_lxc.la
 libvirt_driver_lxc_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_lxc_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_lxc.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_lxc.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_lxc_impl_la_CFLAGS = \
                $(LIBNL_CFLAGS) \
@@ -1537,15 +1506,9 @@ if WITH_UML
 noinst_LTLIBRARIES += libvirt_driver_uml_impl.la
 libvirt_driver_uml_la_SOURCES =
 libvirt_driver_uml_la_LIBADD = libvirt_driver_uml_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_uml.la
 libvirt_driver_uml_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_uml_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_uml.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_uml.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_uml_impl_la_CFLAGS = \
                -I$(srcdir)/access \
@@ -1615,13 +1578,9 @@ if WITH_VZ
 noinst_LTLIBRARIES += libvirt_driver_vz_impl.la
 libvirt_driver_vz_la_SOURCES =
 libvirt_driver_vz_la_LIBADD = libvirt_driver_vz_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_vz.la
 libvirt_driver_vz_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_vz_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_vz.la
-endif ! WITH_DRIVER_MODULES
 libvirt_driver_vz_impl_la_CFLAGS = \
                -I$(srcdir)/conf \
                -I$(srcdir)/access \
@@ -1635,13 +1594,9 @@ if WITH_BHYVE
 noinst_LTLIBRARIES += libvirt_driver_bhyve_impl.la
 libvirt_driver_bhyve_la_SOURCES =
 libvirt_driver_bhyve_la_LIBADD = libvirt_driver_bhyve_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_bhyve.la
 libvirt_driver_bhyve_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_bhyve_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_bhyve.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_bhyve_impl_la_CFLAGS = \
        -I$(srcdir)/access \
@@ -1662,18 +1617,12 @@ if WITH_NETWORK
 noinst_LTLIBRARIES += libvirt_driver_network_impl.la
 libvirt_driver_network_la_SOURCES =
 libvirt_driver_network_la_LIBADD = libvirt_driver_network_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_network.la
 libvirt_driver_network_la_LIBADD += ../gnulib/lib/libgnu.la \
        $(LIBNL_LIBS) \
        $(DBUS_LIBS) \
        $(NULL)
 libvirt_driver_network_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_network.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_network.la
-endif ! WITH_DRIVER_MODULES
 
 libvirt_driver_network_impl_la_CFLAGS = \
                $(LIBNL_CFLAGS) \
@@ -1688,13 +1637,7 @@ EXTRA_DIST += network/default.xml
 
 
 if WITH_INTERFACE
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_interface.la
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_interface.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_interface.la
-endif ! WITH_DRIVER_MODULES
 libvirt_driver_interface_la_CFLAGS = \
                -I$(srcdir)/access \
                -I$(srcdir)/conf \
@@ -1709,29 +1652,19 @@ if WITH_UDEV
 libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
 libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
 endif WITH_UDEV
-if WITH_DRIVER_MODULES
 libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
-endif WITH_DRIVER_MODULES
 libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
 endif WITH_INTERFACE
 
 if WITH_SECRETS
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_secret.la
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_secret.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_secret.la
-endif ! WITH_DRIVER_MODULES
 libvirt_driver_secret_la_CFLAGS = \
                -I$(srcdir)/access \
                -I$(srcdir)/conf \
                $(AM_CFLAGS)
-if WITH_DRIVER_MODULES
 libvirt_driver_secret_la_LIBADD = ../gnulib/lib/libgnu.la
 libvirt_driver_secret_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-endif WITH_DRIVER_MODULES
 libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
 endif WITH_SECRETS
 
@@ -1750,24 +1683,16 @@ libvirt_driver_storage_impl_la_CFLAGS += $(BLKID_CFLAGS)
 libvirt_driver_storage_impl_la_LIBADD += $(BLKID_LIBS)
 endif WITH_BLKID
 
-if WITH_DRIVER_MODULES
 storagebackenddir = $(libdir)/libvirt/storage-backend
 storagebackend_LTLIBRARIES =
-endif WITH_DRIVER_MODULES
 
 if WITH_STORAGE
 noinst_LTLIBRARIES += libvirt_driver_storage_impl.la
 libvirt_driver_storage_la_SOURCES =
 libvirt_driver_storage_la_LIBADD = libvirt_driver_storage_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_storage.la
 libvirt_driver_storage_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_storage_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_storage.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_storage.la
-endif ! WITH_DRIVER_MODULES
 libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
 
 
@@ -1776,14 +1701,9 @@ libvirt_storage_backend_fs_la_CFLAGS =   \
        -I$(srcdir)/conf \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_fs.la
 libvirt_storage_backend_fs_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_fs.la
-libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_fs.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE
 
 if WITH_STORAGE_LVM
@@ -1793,15 +1713,9 @@ libvirt_storage_backend_logical_la_CFLAGS = \
        -I$(srcdir)/conf \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_logical.la
 libvirt_storage_backend_logical_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_logical.la
-libvirt_driver_storage_impl_la_LIBADD += \
-       libvirt_storage_backend_logical.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_LVM
 
 if WITH_STORAGE_ISCSI
@@ -1812,15 +1726,9 @@ libvirt_storage_backend_iscsi_la_CFLAGS = \
        -I$(srcdir)/secret \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_iscsi.la
 libvirt_storage_backend_iscsi_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_iscsi.la
-libvirt_driver_storage_impl_la_LIBADD += \
-       libvirt_storage_backend_iscsi.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_ISCSI
 
 if WITH_STORAGE_SCSI
@@ -1829,14 +1737,9 @@ libvirt_storage_backend_scsi_la_CFLAGS = \
        -I$(srcdir)/conf \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_scsi.la
 libvirt_storage_backend_scsi_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_scsi.la
-libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_scsi.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_SCSI
 
 if WITH_STORAGE_MPATH
@@ -1848,15 +1751,9 @@ libvirt_storage_backend_mpath_la_CFLAGS =        \
        $(DEVMAPPER_CFLAGS) \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_mpath.la
 libvirt_storage_backend_mpath_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_mpath.la
-libvirt_driver_storage_impl_la_LIBADD += \
-       libvirt_storage_backend_mpath.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_MPATH
 
 if WITH_STORAGE_DISK
@@ -1865,14 +1762,9 @@ libvirt_storage_backend_disk_la_CFLAGS = \
        -I$(srcdir)/conf \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_disk.la
 libvirt_storage_backend_disk_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_disk.la
-libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_disk.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_DISK
 
 if WITH_STORAGE_RBD
@@ -1883,14 +1775,9 @@ libvirt_storage_backend_rbd_la_CFLAGS = \
        -I$(srcdir)/secret \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_rbd.la
 libvirt_storage_backend_rbd_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_rbd.la
-libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_rbd.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_RBD
 
 if WITH_STORAGE_SHEEPDOG
@@ -1908,15 +1795,9 @@ libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \
        $(AM_CFLAGS)
 noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog_priv.la
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
 libvirt_storage_backend_sheepdog_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
-libvirt_driver_storage_impl_la_LIBADD += \
-       libvirt_storage_backend_sheepdog.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_SHEEPDOG
 
 if WITH_STORAGE_GLUSTER
@@ -1928,15 +1809,9 @@ libvirt_storage_backend_gluster_la_CFLAGS = \
        $(GLUSTERFS_CFLAGS) \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_gluster.la
 libvirt_storage_backend_gluster_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_gluster.la
-libvirt_driver_storage_impl_la_LIBADD += \
-       libvirt_storage_backend_gluster.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_GLUSTER
 
 if WITH_STORAGE_ZFS
@@ -1945,14 +1820,9 @@ libvirt_storage_backend_zfs_la_CFLAGS =  \
        -I$(srcdir)/conf \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_zfs.la
 libvirt_storage_backend_zfs_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_zfs.la
-libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_zfs.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_ZFS
 
 if WITH_STORAGE_VSTORAGE
@@ -1962,26 +1832,14 @@ libvirt_storage_backend_vstorage_la_CFLAGS =    \
        -I$(srcdir)/conf \
        $(AM_CFLAGS)
 
-if WITH_DRIVER_MODULES
 storagebackend_LTLIBRARIES += libvirt_storage_backend_vstorage.la
 libvirt_storage_backend_vstorage_la_LDFLAGS = \
        -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_storage_backend_vstorage.la
-libvirt_driver_storage_impl_la_LIBADD += \
-       libvirt_storage_backend_vstorage.la
-endif ! WITH_DRIVER_MODULES
 endif WITH_STORAGE_VSTORAGE
 
 if WITH_NODE_DEVICES
 # Needed to keep automake quiet about conditionals
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_nodedev.la
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_nodedev.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_nodedev.la
-endif ! WITH_DRIVER_MODULES
 libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)
 
 libvirt_driver_nodedev_la_CFLAGS = \
@@ -2004,10 +1862,8 @@ libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS)
 endif WITH_UDEV
 endif WITH_LIBVIRTD
 
-if WITH_DRIVER_MODULES
 libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version
-endif WITH_DRIVER_MODULES
 endif WITH_NODE_DEVICES
 
 
@@ -2015,14 +1871,8 @@ if WITH_NWFILTER
 noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la
 libvirt_driver_nwfilter_la_SOURCES =
 libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la
-if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_nwfilter.la
 libvirt_driver_nwfilter_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
-else ! WITH_DRIVER_MODULES
-noinst_LTLIBRARIES += libvirt_driver_nwfilter.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_nwfilter.la
-endif ! WITH_DRIVER_MODULES
 libvirt_driver_nwfilter_impl_la_CFLAGS = \
                $(LIBPCAP_CFLAGS) \
                $(LIBNL_CFLAGS) \
@@ -2035,10 +1885,8 @@ libvirt_driver_nwfilter_impl_la_LIBADD = \
                $(LIBPCAP_LIBS) \
                $(LIBNL_LIBS) \
                $(DBUS_LIBS)
-if WITH_DRIVER_MODULES
 libvirt_driver_nwfilter_impl_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_nwfilter_impl_la_LDFLAGS += -module -avoid-version
-endif WITH_DRIVER_MODULES
 libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
 endif WITH_NWFILTER
 
@@ -2335,11 +2183,7 @@ check-augeas-virtlogd: test_virtlogd.aug
 # symbols aren't present at all.
 #
 
-if WITH_DRIVER_MODULES
 USED_SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
-else ! WITH_DRIVER_MODULES
-SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
-endif ! WITH_DRIVER_MODULES
 
 if WITH_LINUX
 USED_SYM_FILES += $(srcdir)/libvirt_linux.syms
@@ -2542,9 +2386,7 @@ nodist_libvirt_la_SOURCES = libvirt_probes.h
 if WITH_REMOTE
 nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h
 endif WITH_REMOTE
-if WITH_DRIVER_MODULES
 DTRACE2SYSTEMTAP_FLAGS = --with-modules
-endif WITH_DRIVER_MODULES
 
 BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp
 
index f6acfd669bc7786a0a9322fdaf0a1b98b94fe8a9..2e7dd01df8877b97fd53a4819cabd793f15aba00 100644 (file)
 VIR_LOG_INIT("driver");
 
 
-#ifdef WITH_DRIVER_MODULES
-
 /* XXX re-implement this for other OS, or use libtools helper lib ? */
 
-# include <dlfcn.h>
-# define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/connection-driver"
+#include <dlfcn.h>
+#define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/connection-driver"
 
 
 static void *
@@ -155,5 +153,3 @@ virDriverLoadModule(const char *name,
 
 
 /* XXX unload modules, but we can't until we can unregister libvirt drivers */
-
-#endif
index e585a5d6b3673f2e09a7cdb2d3fdd9d154ac2805..cdc8d3d572ab2480b32eabb1608e2a355a2668dd 100644 (file)
@@ -81,9 +81,7 @@ static size_t virStorageBackendsCount;
 static virStorageFileBackendPtr virStorageFileBackends[VIR_STORAGE_BACKENDS_MAX];
 static size_t virStorageFileBackendsCount;
 
-#if WITH_DRIVER_MODULES
-
-# define STORAGE_BACKEND_MODULE_DIR LIBDIR "/libvirt/storage-backend"
+#define STORAGE_BACKEND_MODULE_DIR LIBDIR "/libvirt/storage-backend"
 
 static int
 virStorageDriverLoadBackendModule(const char *name,
@@ -116,14 +114,9 @@ virStorageDriverLoadBackendModule(const char *name,
 }
 
 
-# define VIR_STORAGE_BACKEND_REGISTER(func, module)                            \
+#define VIR_STORAGE_BACKEND_REGISTER(func, module)                            \
     if (virStorageDriverLoadBackendModule(module, #func, allbackends) < 0)     \
         return -1
-#else
-# define VIR_STORAGE_BACKEND_REGISTER(func, module)                            \
-    if (func() < 0)                                                            \
-        return -1
-#endif
 
 int
 virStorageBackendDriversRegister(bool allbackends ATTRIBUTE_UNUSED)
index 147a328bc02ff6942143c9385f424e7d1727abc2..c10c0c492b54f858649b213e1bb5dc630de8196b 100644 (file)
@@ -48,7 +48,7 @@
 
 VIR_LOG_INIT("vbox.vbox_driver");
 
-#if !defined(WITH_DRIVER_MODULES) || defined(VBOX_DRIVER)
+#if defined(VBOX_DRIVER)
 static virDrvOpenStatus dummyConnectOpen(virConnectPtr conn,
                                          virConnectAuthPtr auth ATTRIBUTE_UNUSED,
                                          virConfPtr conf ATTRIBUTE_UNUSED,
index ccd331a410b05ccd6104f433c819623e528a4987..bf7db2bf87d960d01d0b5891e42d6915187f50ad 100644 (file)
 
 # include "internal.h"
 
-# if !defined(WITH_DRIVER_MODULES) || defined(VBOX_NETWORK_DRIVER)
+# if defined(VBOX_NETWORK_DRIVER)
 int vboxNetworkRegister(void);
 # endif
 
-# if !defined(WITH_DRIVER_MODULES) || defined(VBOX_STORAGE_DRIVER)
+# if defined(VBOX_STORAGE_DRIVER)
 int vboxStorageRegister(void);
 # endif
 
-# if !defined(WITH_DRIVER_MODULES) || defined(VBOX_DRIVER)
+# if defined(VBOX_DRIVER)
 int vboxRegister(void);
 # endif
 
index 9a822f7d565d868733d1fcd4c2fbe0f0655fe265..542c4a5729706c542beb88adf10a0359864b453d 100644 (file)
@@ -62,10 +62,8 @@ QEMULIB_LDFLAGS = \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation \
        $(MINGW_EXTRA_LDFLAGS)
 
-if WITH_DRIVER_MODULES
 INCLUDES += \
        -DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
-endif WITH_DRIVER_MODULES
 
 PROBES_O =
 if WITH_DTRACE_PROBES
@@ -263,9 +261,7 @@ endif WITH_QEMU
 endif WITH_ATTR
 endif WITH_SECDRIVER_SELINUX
 
-if WITH_DRIVER_MODULES
 test_programs += virdrivermoduletest
-endif WITH_DRIVER_MODULES
 
 # This is a fake SSH we use from virnetsockettest
 ssh_SOURCES = ssh.c
@@ -1396,11 +1392,9 @@ utiltest_SOURCES = \
        utiltest.c testutils.h testutils.c
 utiltest_LDADD = $(LDADDS)
 
-if WITH_DRIVER_MODULES
 virdrivermoduletest_SOURCES = \
        virdrivermoduletest.c testutils.h testutils.c
 virdrivermoduletest_LDADD = $(LDADDS)
-endif WITH_DRIVER_MODULES
 
 if WITH_LIBVIRTD
 eventtest_SOURCES = \
index 5e71f348be342eab3feb74f43de745bccfcfc5af..40e9650fdd3ca8bc14c0d405dd81a6d4c37b7a1c 100644 (file)
@@ -451,9 +451,7 @@ void virTestCaptureProgramExecChild(const char *const argv[],
     int stdinfd = -1;
     const char *const env[] = {
         "LANG=C",
-# if WITH_DRIVER_MODULES
         "LIBVIRT_DRIVER_DIR=" TEST_DRIVER_DIR,
-# endif
         NULL
     };
 
index 3da9534233e626f83597c475c7bc2257a424857a..94bb7ff6c93afa46d31d085eaa5e504f1cca7593 100644 (file)
@@ -645,9 +645,6 @@ virshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
 #endif
 #if WITH_READLINE
     vshPrint(ctl, " Readline");
-#endif
-#ifdef WITH_DRIVER_MODULES
-    vshPrint(ctl, " Modular");
 #endif
     vshPrint(ctl, "\n");
 }