]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add driver_modules build check
authorPavel Hrdina <phrdina@redhat.com>
Fri, 24 Jul 2020 14:44:39 +0000 (16:44 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:00 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
m4/virt-driver-modules.m4 [deleted file]
meson.build

index 7760435135c1d3f0e018bbecd9d46a237c35a285..141c926a911387e4f01a69d9150d76fdee4840a6 100644 (file)
@@ -138,10 +138,6 @@ LIBVIRT_WIN_CHECK_SYMBOLS
 LIBVIRT_WIN_CHECK_WINDRES
 
 
-dnl Driver-Modules library support
-LIBVIRT_CHECK_DRIVER_MODULES
-
-
 # Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
 # we're building shared libraries.  This is the name of the directory
 # in which .o files will be created.
@@ -180,10 +176,6 @@ AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Configuration summary])
 AC_MSG_NOTICE([=====================])
 AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Driver Loadable Modules])
-AC_MSG_NOTICE([])
-LIBVIRT_RESULT_DRIVER_MODULES
-AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Libraries])
 AC_MSG_NOTICE([])
 LIBVIRT_RESULT_NSS
diff --git a/m4/virt-driver-modules.m4 b/m4/virt-driver-modules.m4
deleted file mode 100644 (file)
index f790228..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-dnl The driver module support
-dnl
-dnl Copyright (C) 2016 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library.  If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_CHECK_DRIVER_MODULES], [
-  AC_REQUIRE([LIBVIRT_CHECK_DLOPEN])
-
-  with_driver_modules=$with_libvirtd
-
-  DRIVER_MODULES_CFLAGS=
-  if test "$with_driver_modules" = "yes"; then
-    if test "$with_dlfcn" != "yes" || test "$with_dlopen" != "yes"; then
-      AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
-    fi
-
-    DRIVER_MODULES_LDFLAGS="-export-dynamic"
-  fi
-  AC_SUBST([DRIVER_MODULES_LDFLAGS])
-])
-
-AC_DEFUN([LIBVIRT_RESULT_DRIVER_MODULES], [
-  LIBVIRT_RESULT_LIB([DRIVER_MODULES])
-])
index c949b014f193882d1eb7125354cb57514dc9ad6a..f98d219f1865911a47840f413fdd439378b12128 100644 (file)
@@ -2077,6 +2077,14 @@ if chrdev_lock_files != ''
   conf.set_quoted('VIR_CHRDEV_LOCK_FILE_PATH', chrdev_lock_files)
 endif
 
+driver_modules_flags = []
+if conf.has('WITH_LIBVIRTD')
+  if not conf.has('HAVE_DLFCN_H') or not dlopen_dep.found()
+    error('You must have dlfcn.h / dlopen() support to build driver modules')
+  endif
+  driver_modules_flags = libvirt_export_dynamic
+endif
+
 
 # define top include directory
 
@@ -2139,6 +2147,11 @@ secdriver_summary = {
 }
 summary(secdriver_summary, section: 'Security Drivers', bool_yn: true)
 
+drivermod_summary = {
+  'driver_modules': driver_modules_flags.length() > 0,
+}
+summary(drivermod_summary, section: 'Driver Loadable Modules', bool_yn: true)
+
 libs_summary = {
   'acl': acl_dep.found(),
   'apparmor': apparmor_dep.found(),