summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build25
1 files changed, 20 insertions, 5 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 0ac68a68..0692f7ef 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,13 +1,28 @@
-if conf_data.get('HAVE_FASTCGI_H') or conf_data.get('HAVE_FASTCGI_FASTCGI_H')
- libfcgi = compiler.find_library('fcgi', required: false)
- if libfcgi.found()
+libfcgi = compiler.find_library('fcgi', required: false)
+if libfcgi.found()
+ found_fcgi_header = false
+ libfcgi = [ libfcgi ]
+
+ if compiler.has_header('fcgi_stdio.h')
+ found_fcgi_header = true
+ libfcgi += [ declare_dependency(
+ compile_args: '-DHAVE_FCGI_STDIO_H'
+ ) ]
+ elif compiler.has_header('fastcgi/fcgi_stdio.h')
+ found_fcgi_header = true
+ libfcgi += [ declare_dependency(
+ compile_args: '-DHAVE_FASTCGI_FCGI_STDIO_H'
+ ) ]
+ endif
+
+ if found_fcgi_header
executable('fcgi-auth',
sources: 'fcgi-auth.c',
- dependencies: common_flags + [ libfcgi ],
+ dependencies: common_flags + libfcgi,
)
executable('fcgi-responder',
sources: 'fcgi-responder.c',
- dependencies: common_flags + [ libfcgi ],
+ dependencies: common_flags + libfcgi,
)
endif
endif