Skip to content

Commit

Permalink
build-sys: add missing ninfod checks
Browse files Browse the repository at this point in the history
After noticing nanosleep() check being missing I went through old
ninfod/config.h.in file and verified all the things that could have been
used in pre-processor conditionals.  Couple more things were missing that
are added in this commit.

Reference: 2f565a5
Signed-off-by: Sami Kerola <[email protected]>
  • Loading branch information
kerolasa committed Feb 16, 2019
1 parent 6dd4bdc commit 8af4193
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ conf.set('_GNU_SOURCE', 1, description : 'Enable GNU extensions on systems that
# Check functions.
foreach f : '''
__fpending
nanosleep
'''.split()
if cc.has_function(f, args : '-D_GNU_SOURCE')
conf.set('HAVE_' + f.to_upper(), 1,
Expand Down Expand Up @@ -157,6 +158,8 @@ if build_ninfod == true
'netinet/ip6.h',
'openssl/md5.h',
'pwd.h',
'stdint.h',
'stdlib.h',
'string.h',
'strings.h',
'sys/capability.h',
Expand All @@ -172,11 +175,19 @@ if build_ninfod == true
description : 'Define if ' + h + ' can be included.')
endif
endforeach
if cc.has_header('stdio.h') and cc.has_header('stdlib.h') and cc.has_header('stddef.h') and cc.has_header('stdarg.h')
conf.set('STDC_HEADERS', 1,
description : 'Define to 1 if you have the ANSI C header files.')
endif
threads = dependency('threads')
if threads.found()
conf.set('ENABLE_THREADS', 1,
description : 'Defined if libpthread is found.')
endif
if host_machine.endian() == 'big'
conf.set('WORDS_BIGENDIAN', 1,
description : 'Defined if processor stores words with the most significant byte first.')
endif
opt = get_option('NINFOD_MESSAGES')
if opt == true
conf.set('ENABLE_DEBUG', 1, description : 'Enable ninfod syslog messages.')
Expand Down

0 comments on commit 8af4193

Please sign in to comment.