forked from lix-project/nix-eval-jobs
make sure we also define HAVE_STRUCT_DIRENT_D_TYPE outside of autotools
This commit is contained in:
parent
8daea338f3
commit
89927c434c
1
src/autotools-config.h.in
Normal file
1
src/autotools-config.h.in
Normal file
|
@ -0,0 +1 @@
|
|||
#mesondefine HAVE_STRUCT_DIRENT_D_TYPE
|
|
@ -6,6 +6,20 @@ src = [
|
|||
'worker.cc'
|
||||
]
|
||||
|
||||
cc = meson.get_compiler('cpp')
|
||||
|
||||
autotool_config = configuration_data()
|
||||
# nix defines this with autotools
|
||||
if cc.has_member('struct dirent', 'd_type', prefix: '#include <dirent.h>')
|
||||
autotool_config.set('HAVE_STRUCT_DIRENT_D_TYPE', 1)
|
||||
endif
|
||||
|
||||
configure_file(
|
||||
input: 'autotools-config.h.in',
|
||||
output: 'autotools-config.h',
|
||||
configuration: autotool_config
|
||||
)
|
||||
|
||||
executable('nix-eval-jobs', src,
|
||||
dependencies : [
|
||||
nix_main_dep,
|
||||
|
@ -17,4 +31,4 @@ executable('nix-eval-jobs', src,
|
|||
threads_dep
|
||||
],
|
||||
install: true,
|
||||
cpp_args: ['-std=c++2a', '-fvisibility=hidden'])
|
||||
cpp_args: ['-std=c++2a', '-fvisibility=hidden', '--include', 'autotools-config.h'])
|
||||
|
|
Loading…
Reference in a new issue