subdir('meson' / 'summary') # Print a system/project summary
subdir('meson' / 'sysconfdir') # Sysconfdir
subdir('meson' / 'libdir') # Libdir
+subdir('meson' / 'platform') # Platform detection
subdir('meson' / 'timet-size') # Check the size of time_t
subdir('meson' / 'timet-sign') # Check the sign of time_t
subdir('meson' / 'flex') # Find flex and create generator
subdir('meson' / 'bison') # Find bison and create generator
subdir('meson' / 'ragel') # Find ragel and create generator
-subdir('meson' / 'platform') # Platform detection
subdir('meson' / 'atomics') # Check atomics support
subdir('meson' / 'pthread-headers') # Check pthread headers
subdir('meson' / 'pthread-setname') # Pthread setname madness
deps = [
dep_pdns,
+ dep_platform,
dep_atomic,
dep_lua,
dep_lua_records,
-# Platform detection
-# Inputs: deps conf system
-
platforms = [
- ['linux', [['HAVE_LINUX', 'We are on Linux']], [], []],
- ['darwin', [['HAVE_DARWIN', 'We are on Darwin/MacOS']], [], ['__APPLE_USE_RFC_3542', '_XOPEN_SOURCE', '_DARWIN_C_SOURCE'], []],
- ['openbsd', [['HAVE_OPENBSD', 'We are on OpenBSD']], [], []],
- ['freebsd', [['HAVE_FREEBSD', 'We are on FreeBSD']], [], []],
- ['sunos', [['HAVE_SOLARIS', 'We are on Solaris/SunOS'],
+ ['linux', [['HAVE_LINUX', 'On Linux']], [], []],
+ ['darwin', [['HAVE_DARWIN', 'On Darwin/MacOS']], [], ['__APPLE_USE_RFC_3542', '_XOPEN_SOURCE', '_DARWIN_C_SOURCE'], []],
+ ['openbsd', [['HAVE_OPENBSD', 'On OpenBSD']], [], []],
+ ['freebsd', [['HAVE_FREEBSD', 'On FreeBSD']], [], []],
+ ['sunos', [['HAVE_SOLARIS', 'On Solaris/SunOS'],
['NEED_POSIX_TYPEDEF', 'POSIX typedefs need to be defined'],
['NEED_INET_NTOP_PROTO', 'OS is so broken that it needs an additional prototype']],
['_REENTRANT'], ['posix4']],
]
+platform_deps = []
foreach platform: platforms
name = platform[0]
defines = platform[1]
foreach define: defines
define_name = define[0]
define_desc = define[1]
- conf.set10(define_name, true, description: define_desc)
+ conf.set(define_name, true, description: define_desc)
platform_defines += define[0]
endforeach
endforeach
foreach lib: libs
- deps += cxx.find_library(lib, required: true)
+ platform_deps += cxx.find_library(lib, required: true)
endforeach
- summary('Defines', ' '.join(platform_defines), section: 'System')
+ summary('Platform Defines', platform_defines, section: 'System')
break
endif
endforeach
+
+dep_platform = declare_dependency(
+ dependencies: platform_deps,
+)