meson: link libintl if it's not provided by libc

This fixes the build on musl with external gettext
This commit is contained in:
Rasmus Thomsen 2019-09-15 14:22:49 +02:00 committed by Tanu Kaskinen
parent d72a3a5eca
commit bff163089c
12 changed files with 22 additions and 14 deletions

View file

@ -296,6 +296,12 @@ if cc.has_function('SYS_memfd_create', prefix : '#include <sys/syscall.h>')
cdata.set('HAVE_MEMFD', 1)
endif
if cc.has_function('dgettext')
libintl_dep = []
else
libintl_dep = cc.find_library('intl')
endif
# Symbols
if cc.has_header_symbol('signal.h', 'SIGXCPU')