[gimp] Issue #8604: NetBSD does not provide libdl.



commit 646bc3e43ba6cd2f909c9e836fb75f7b70b765c9
Author: Jehan <jehan girinstud io>
Date:   Sat Sep 10 17:42:28 2022 +0200

    Issue #8604: NetBSD does not provide libdl.
    
    The dl*() functions are in libc directly. This probably applies to all
    *BSD too. And from what I read, it should even apply to macOS, even
    though a libdl is present there (is it bogus?).
    
    So let's make the libdl check proper by only make it mandatory on Linux
    (on Windows it was already unchecked too).

 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 57a25411f1..6f5a504344 100644
--- a/meson.build
+++ b/meson.build
@@ -328,7 +328,11 @@ conf.set('ENABLE_RELOCATABLE_RESOURCES', relocatable_bundle)
 
 
 math              = cc.find_library('m')
-dl                = platform_windows ? no_dep : cc.find_library('dl')
+# libdl is only required on Linux. On Windows and some (all?) BSD, it
+# doesn't exist, but the API exists in libc by default (see #8604). On
+# macOS, it apparently exists but linking it explicitly is actually
+# unneeded as well.
+dl                = cc.find_library('dl', required: platform_linux)
 rpc               = platform_windows ? cc.find_library('rpcrt4') : no_dep
 dbghelp           = platform_windows ? cc.find_library('dbghelp') : no_dep
 winsock           = platform_windows ? cc.find_library('ws2_32') : no_dep


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