conf = configuration_data()
cpp = meson.get_compiler('cpp')

conf.set('RESTC_CPP_WITH_UNIT_TESTS', boost_test_dep.found())
conf.set('RESTC_CPP_WITH_TLS', get_option('restc_cpp_with_tls') ? 1 : false)
conf.set('RESTC_CPP_LOG_WITH_BOOST_LOG', get_option('restc_cpp_log_with_boost_log') ? 1 : false)
conf.set('RESTC_CPP_WITH_ZLIB', get_option('restc_cpp_with_zlib') ? 1 : false)
conf.set('RESTC_CPP_HAVE_BOOST_TYPEINDEX', cpp.has_header('boost/type_index.hpp') ? 1 : false)
conf.set('RESTC_CPP_LOG_JSON_SERIALIZATION', get_option('restc_cpp_log_json_serialization') ? 1 : false)
if get_option('cpp_std') == 'gnu++17' or get_option('cpp_std') == 'c++17'
  conf.set('RESTC_CPP_USE_CPP17', 1)
else
  conf.set('RESTC_CPP_USE_CPP17', false)
endif
conf.set('RESTC_CPP_MAX_INPUT_BUFFER_LENGTH', get_option('restc_cpp_max_input_buffer_length'))

project_config_file = configure_file(
	input: config_template,
	output: 'config.h',
	configuration: conf,
	format: 'cmake',
)
