diff --git a/meson.build b/meson.build index 27808d3..a072988 100644 --- a/meson.build +++ b/meson.build @@ -93,9 +93,7 @@ config.set('WITH_LIBIDN', enable_runtime == 'libidn') config.set('ENABLE_BUILTIN', enable_builtin) config.set('HAVE_UNISTD_H', cc.check_header('unistd.h')) config.set('HAVE_STDINT_H', cc.check_header('stdint.h')) -config.set('HAVE_ALLOCA_H', cc.check_header('alloca.h')) config.set('HAVE_DIRENT_H', cc.check_header('dirent.h')) -config.set('HAVE_ALLOCA', cc.has_function('alloca')) config.set('HAVE_STRNDUP', cc.has_function('strndup')) config.set('HAVE_CLOCK_GETTIME', cc.has_function('clock_gettime')) config.set('HAVE_FMEMOPEN', cc.has_function('fmemopen')) @@ -127,9 +125,6 @@ if cc.get_id() == 'msvc' add_project_arguments('-Dsnprintf=_snprintf', language: 'c') endif endif - if cc.has_header_symbol('malloc.h', '_alloca') - add_project_arguments('-Dalloca=_alloca', language: 'c') - endif endif subdir('include') diff --git a/tests/meson.build b/tests/meson.build index 1ab2d33..84955a2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -30,12 +30,15 @@ if enable_builtin tests += ['test-is-public-builtin', 'test-registrable-domain'] endif +libtestcommon = static_library('testcommon', 'common.c', + build_by_default: false) + foreach test_name : tests sources = [test_name + '.c', 'common.c', 'common.h'] exe = executable(test_name, sources, build_by_default: false, c_args : tests_cargs, - link_with : libpsl, + link_with : [libpsl, libtestcommon], include_directories : configinc, link_language : link_language, dependencies : [libpsl_dep, networking_deps])