X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=meson.build;h=39907709f71d608744391dafe9aac013e0f0273c;hb=b30589cbd3dd61a8bb27757fecd536cb559732ad;hp=796b628e5ebe73551869fc9b6e0344058f1d8b78;hpb=4d5cde1fffc4f1c61a58164a619466371948b704;p=mesa.git diff --git a/meson.build b/meson.build index 796b628e5eb..39907709f71 100644 --- a/meson.build +++ b/meson.build @@ -1149,7 +1149,7 @@ foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h' endif endforeach -foreach f : ['strtof', 'mkostemp', 'timespec_get', 'memfd_create', 'random_r', 'flock'] +foreach f : ['strtof', 'mkostemp', 'timespec_get', 'memfd_create', 'random_r', 'flock', 'strtok_r'] if cc.has_function(f) pre_args += '-DHAVE_@0@'.format(f.to_upper()) endif @@ -1251,6 +1251,17 @@ endif # TODO: some of these may be conditional dep_zlib = dependency('zlib', version : '>= 1.2.3', fallback : ['zlib', 'zlib_dep']) pre_args += '-DHAVE_ZLIB' + +_zstd = get_option('zstd') +if _zstd != 'false' + dep_zstd = dependency('libzstd', required : _zstd == 'true') + if dep_zstd.found() + pre_args += '-DHAVE_ZSTD' + endif +else + dep_zstd = null_dep +endif + dep_thread = dependency('threads') if dep_thread.found() and host_machine.system() != 'windows' pre_args += '-DHAVE_PTHREAD' @@ -1685,8 +1696,8 @@ if host_machine.system() == 'windows' with_symbols_check = prog_dumpbin.found() and with_tests symbols_check_args = ['--dumpbin', prog_dumpbin.path()] else - prog_nm = find_program('nm', required : false) - with_symbols_check = prog_nm.found() and with_tests + prog_nm = find_program('nm') + with_symbols_check = with_tests symbols_check_args = ['--nm', prog_nm.path()] endif