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

index 503dbcb3716a38fa89c67f933cbb0054d1a7e35e..a2404773ea19493989e4f255837e0f3f6859cb11 100644 (file)
@@ -11,6 +11,9 @@ project(
   ],
 )
 
+# Setup some modules
+fs = import('fs')
+
 # Create the configuration object and dependencies list.
 conf = configuration_data()
 deps = []
@@ -38,6 +41,13 @@ subdir('meson/libssl')          # OpenSSL libssl
 subdir('meson/gnutls')          # GnuTLS
 subdir('meson/dot')             # DNS over TLS
 subdir('meson/ipcipher')        # IPCipher
+subdir('meson/ragel')           # Find Ragel
+
+# Find or generate pdns/dnslabeltext.cc
+if not ragel.found() and not fs.exists('pdns/dnslabeltext.cc')
+  error('Ragel is missing and `pdns/dnslabeltext.cc` cannot be found. ' +
+        'Install Ragel or download the sources from www.powerdns.com')
+endif
 
 # Generate config.h ----------------------------------------------------------------------
 config_h = configure_file(configuration: conf, output: 'config.h')
diff --git a/meson/ragel/meson.build b/meson/ragel/meson.build
new file mode 100644 (file)
index 0000000..09d0b2e
--- /dev/null
@@ -0,0 +1,6 @@
+# Find Ragel
+# Outputs: ragel
+
+ragel = find_program('ragel', required: false)
+
+summary('Ragel', ragel.found(), bool_yn: ragel.found(), section: 'Programs')