* meson.build: Support `FT_DEBUG_LOGGING` option.
If this option is set, we need threads support.
diff --git a/ChangeLog b/ChangeLog
index 347d976..34ed7cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-07-04 Werner Lemberg <wl@gnu.org>
+
+ * meson.build: Support `FT_DEBUG_LOGGING` option.
+
+ If this option is set, we need threads support.
+
2021-07-03 Werner Lemberg <wl@gnu.org>
* meson_options.txt: Sort alphabetically; no final full stops.
diff --git a/meson.build b/meson.build
index 13142bc..6ddadc1 100644
--- a/meson.build
+++ b/meson.build
@@ -73,6 +73,7 @@
ft2_sources += files([
'src/base/ftbase.c',
'src/base/ftinit.c',
+ 'src/dlg/dlgwrap.c',
])
foreach mod: ft_main_modules
@@ -231,6 +232,15 @@
ft2_deps = []
+# Check whether threads support is needed and available.
+if cc.has_header_symbol('freetype/config/ftoption.h', 'FT_DEBUG_LOGGING',
+ include_directories: ft2_includes)
+ thread_dep = dependency('threads',
+ required: true)
+ ft2_deps += [thread_dep]
+endif
+
+
# Generate `ftoption.h` based on available dependencies.
process_header_command = [python_exe,