[libvirt] [PATCH 1/2] Use AC_SEARCH_LIBS to find the library to use for dlopen().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of using AC_CHECK_LIB and hardcoding -ldl, search for the library
needed to get dlopen() and then use the cached value.
---
 configure.ac |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b1eb5f..a3f28c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1705,7 +1705,7 @@ if test "x$with_driver_modules" = "xyes" ; then
   old_libs="$LIBS"
   fail=0
   AC_CHECK_HEADER([dlfcn.h],[],[fail=1])
-  AC_CHECK_LIB([dl], [dlopen],[],[fail=1])
+  AC_SEARCH_LIBS([dlopen], [dl], [], [fail=1])
   test $fail = 1 &&
       AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
 
@@ -1714,7 +1714,7 @@ if test "x$with_driver_modules" = "xyes" ; then
 fi
 if test "$with_driver_modules" = "yes"; then
   DRIVER_MODULES_CFLAGS="-export-dynamic"
-  DRIVER_MODULES_LIBS="-ldl"
+  DRIVER_MODULES_LIBS="$ac_cv_search_dlopen"
   AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
 fi
 AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
-- 
1.7.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]