[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2006-04-08 12:55:09
Message-ID: 1144500909.929136.31946.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 527491 by neundorf:

-fix dlopen() detection on FreeBSD... running KDE without plugins isn't very exciting...

Alex



 M  +18 -2     ConfigureChecks.cmake  
 M  +1 -1      kdecore/CMakeLists.txt  


--- trunk/KDE/kdelibs/ConfigureChecks.cmake #527490:527491
@@ -318,8 +318,24 @@
 #set(CMAKE_REQUIRED_LIBRARIES)
 
 #dlopen stuff
-check_library_exists(dl dlopen ""  HAVE_LIBDL)
-check_library_exists(dl dlerror ""  HAVE_DLERROR)
+set(LIBDL)
+set(HAVE_LIBDL)
+# on FreeBSD dlopen is in libc, on Linux it's in libdl
+check_library_exists(dl dlopen ""  DLOPEN_IN_LIBDL)
+check_function_exists(dlopen DLOPEN_IN_LIBC)
+
+if (DLOPEN_IN_LIBC)
+   set(LIBDL c)
+   set(HAVE_LIBDL TRUE)
+   check_function_exists(dlerror HAVE_DLERROR)
+endif (DLOPEN_IN_LIBC)
+
+if (DLOPEN_IN_LIBDL)
+   set(LIBDL dl)
+   set(HAVE_LIBDL TRUE)
+   check_library_exists(dl dlerror ""  HAVE_DLERROR)
+endif (DLOPEN_IN_LIBDL)
+
 check_function_exists(shl_load HAVE_SHL_LOAD)
 check_function_exists(dld_init HAVE_DLD)
 
--- trunk/KDE/kdelibs/kdecore/CMakeLists.txt #527490:527491
@@ -58,7 +58,7 @@
 endif(HAVE_IDNA_H)
 
 if(HAVE_LIBDL)
-   set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} dl)
+   set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${LIBDL})
 endif(HAVE_LIBDL)
 
 if(X11_XTest_FOUND)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic