Skip to content
Snippets Groups Projects
Commit bbd392d5 authored by Simon McVittie's avatar Simon McVittie
Browse files

Define HAVE_DECL_FOO to 0 if foo isn't declared


This matches what Autotools would do, and what our header is expecting.
It silences -Wundef.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 07b10460
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ check_functions = [
]
conf = configuration_data()
foreach check_function : check_functions
if cc.compiles('''
have_it = cc.compiles('''
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
......@@ -32,8 +32,7 @@ foreach check_function : check_functions
args : '-D_GNU_SOURCE',
name : check_function + '() is declared',
)
conf.set('HAVE_DECL_' + check_function.underscorify().to_upper(), 1)
endif
conf.set10('HAVE_DECL_' + check_function.underscorify().to_upper(), have_it)
endforeach
config_h = configure_file(
output : 'config.h',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment