diff options
author | Diego Elio Pettenò <flameeyes@gmail.com> | 2010-02-24 16:02:51 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gmail.com> | 2010-02-24 16:35:39 +0100 |
commit | 8d4583bd8ccc1a3500970c3a6ee4c8ed0b335ea6 (patch) | |
tree | b5daae74d334bdffb126ed273a71ac9e2adab6fb | |
parent | Use AC_SEARCH_LIBS to find the library to use for dlopen(). (diff) | |
download | libvirt-8d4583bd8ccc1a3500970c3a6ee4c8ed0b335ea6.tar.gz libvirt-8d4583bd8ccc1a3500970c3a6ee4c8ed0b335ea6.tar.bz2 libvirt-8d4583bd8ccc1a3500970c3a6ee4c8ed0b335ea6.zip |
Fix build of the VirtualBox driver when using --no-add-needed.foo
With the recent changes to the linking defaults in Fedora 13 (namely
enabling --no-add-needed behaviour by default), we have to pass the
dlopen()-providing libraries directly at the link of the module; use the
same AC_SEARCH_LIBS function as used before to look for it and add it to
the Makefile.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a3f28c4b7..d3d734094 100644 --- a/configure.ac +++ b/configure.ac @@ -303,6 +303,8 @@ fi AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"]) if test "x$with_vbox" = "xyes"; then + AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([Unable to find dlopen()])]) + AC_SUBST([DLOPEN_LIBS], [$ac_cv_search_dlopen]) AC_DEFINE_UNQUOTED([WITH_VBOX], 1, [whether VirtualBox driver is enabled]) fi AM_CONDITIONAL([WITH_VBOX], [test "$with_vbox" = "yes"]) diff --git a/src/Makefile.am b/src/Makefile.am index 46acb7d5a..87fe65c10 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -464,6 +464,7 @@ libvirt_driver_vbox_la_CFLAGS = \ if WITH_DRIVER_MODULES libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version endif +libvirt_driver_vbox_la_LIBADD = $(DLOPEN_LIBS) libvirt_driver_vbox_la_SOURCES = $(VBOX_DRIVER_SOURCES) endif |