]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: dlopen
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 6 Jul 2023 12:08:53 +0000 (14:08 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:28 +0000 (13:28 +0100)
meson.build
meson/dlopen/meson.build [new file with mode: 0644]

index e5c67269d5a240545fb7ed45561cad9fe39388c2..6f92fa07d33709a14b26288e1c6094db89938987 100644 (file)
@@ -49,6 +49,7 @@ subdir('meson/reproducible')    # Reproducible Builds
 subdir('meson/fuzz-targets')    # Fuzzing Targets
 subdir('meson/python-venv')     # Python Venv
 subdir('meson/from-git')        # From Git
+subdir('meson/dlopen')          # dlopen
 
 # Find or generate pdns/dnslabeltext.cc
 if not ragel.found() and not fs.exists('pdns/dnslabeltext.cc')
diff --git a/meson/dlopen/meson.build b/meson/dlopen/meson.build
new file mode 100644 (file)
index 0000000..bc82c7e
--- /dev/null
@@ -0,0 +1,16 @@
+# dlopen
+# Inputs: cxx deps
+
+# dep_dlopen = dependency('dl', required: true) # TODO Meson 0.62
+# deps += dep_dlopen
+
+if cxx.has_function('dlopen')
+  subdir_done()
+endif
+
+dl = cxx.find_library('dl', required: true)
+if not cxx.has_function('dlopen', dependencies: dl)
+  error('Your system does not support dlopen')
+endif
+
+deps += dl