From: Fred Morcos Date: Wed, 16 Aug 2023 13:20:09 +0000 (+0200) Subject: Meson: Cleanup dlopen module X-Git-Tag: rec-5.1.0-alpha1~80^2~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=081fd10fd0b49ad979214767d0caef072a4ae4b4;p=thirdparty%2Fpdns.git Meson: Cleanup dlopen module --- diff --git a/meson.build b/meson.build index fffd80aff8..7be9c68451 100644 --- a/meson.build +++ b/meson.build @@ -199,6 +199,7 @@ deps = [ dep_gss_tsig, dep_unittests, dep_backend_unittests, + dep_dlopen, dep_pkcs11, dep_yahttp, dep_json11, diff --git a/meson/dlopen/meson.build b/meson/dlopen/meson.build index bc82c7e350..7737e842b2 100644 --- a/meson/dlopen/meson.build +++ b/meson/dlopen/meson.build @@ -1,16 +1,15 @@ -# dlopen -# Inputs: cxx deps +dep_dlopen = declare_dependency(variables: {'name': 'fooooo'}, version: 'system') -# dep_dlopen = dependency('dl', required: true) # TODO Meson 0.62 -# deps += dep_dlopen +if not cxx.has_function('dlopen') + dep_dlopen = dependency('dl', required: false) -if cxx.has_function('dlopen') - subdir_done() -endif + if not dep_dlopen.found() + dep_dlopen = cxx.find_library('dl', required: true) -dl = cxx.find_library('dl', required: true) -if not cxx.has_function('dlopen', dependencies: dl) - error('Your system does not support dlopen') + if not cxx.has_function('dlopen', dependencies: dep_dlopen) + error('Your system does not support dlopen') + endif + endif endif -deps += dl +summary('dlopen', dep_dlopen.found(), bool_yn: true, section: 'System')