build: use DLOPEN_LIBS directly

There is no need to have DRIVER_MODULES_LIBS as it's used only for
libvirt.so. The other places are using DLOPEN_LIBS directly and dlopen
is required if building with libvirtd.

It's mandatory since <5aec02dc37623bf739d1edd8f2be3e4ad9f94ff5>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-05-04 18:00:47 +02:00
parent 2c846fa6bc
commit 6c1ee710b1
2 changed files with 1 additions and 4 deletions

View File

@ -38,17 +38,14 @@ AC_DEFUN([LIBVIRT_CHECK_DRIVER_MODULES], [
fi
DRIVER_MODULES_CFLAGS=
DRIVER_MODULES_LIBS=
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"
DRIVER_MODULES_LIBS="$DLOPEN_LIBS"
fi
AC_SUBST([DRIVER_MODULES_LDFLAGS])
AC_SUBST([DRIVER_MODULES_LIBS])
])
AC_DEFUN([LIBVIRT_RESULT_DRIVER_MODULES], [

View File

@ -439,7 +439,7 @@ libvirt_la_LDFLAGS += -Wl,-flat_namespace
endif WITH_MACOS
libvirt_la_LDFLAGS += $(NULL)
libvirt_la_LIBADD += \
$(DRIVER_MODULES_LIBS)
$(DLOPEN_LIBS)
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
# lose automake's automatic dependencies on an appropriate subset of