aboutsummaryrefslogtreecommitdiff
path: root/test cases/frameworks
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-06-15 21:31:30 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-06-17 13:22:25 -0400
commit471c05d57dec7a6f59dcf9c80c9ed963d052320d (patch)
treebd037d064ec309ad93c317da98d37633140af7c8 /test cases/frameworks
parent2c6ccfe4c40741ae1f15f073f7d7bc8c398a1648 (diff)
downloadmeson-471c05d57dec7a6f59dcf9c80c9ed963d052320d.zip
meson-471c05d57dec7a6f59dcf9c80c9ed963d052320d.tar.gz
meson-471c05d57dec7a6f59dcf9c80c9ed963d052320d.tar.bz2
update gettext test to use new intl dependency
Tests that we find something sensible for intl, capable of producing binaries using gettext() to translate stuff. No more need to manually check headers and *maybe* include the intl library, which we were doing before; the new dependency actually simplifies the existing test, and should simplify users' build files too...
Diffstat (limited to 'test cases/frameworks')
-rw-r--r--test cases/frameworks/6 gettext/meson.build5
-rw-r--r--test cases/frameworks/6 gettext/src/meson.build2
2 files changed, 4 insertions, 3 deletions
diff --git a/test cases/frameworks/6 gettext/meson.build b/test cases/frameworks/6 gettext/meson.build
index afa24b1..9856341 100644
--- a/test cases/frameworks/6 gettext/meson.build
+++ b/test cases/frameworks/6 gettext/meson.build
@@ -10,8 +10,9 @@ if not xgettext.found()
error('MESON_SKIP_TEST xgettext not found.')
endif
-if not meson.get_compiler('c').has_header('libintl.h')
- error('MESON_SKIP_TEST libintl.h not found.')
+intl = dependency('intl', required: false)
+if not intl.found()
+ error('MESON_SKIP_TEST libintl/gettext functions not found.')
endif
i18n = import('i18n')
diff --git a/test cases/frameworks/6 gettext/src/meson.build b/test cases/frameworks/6 gettext/src/meson.build
index 2c10027..cda3ea4 100644
--- a/test cases/frameworks/6 gettext/src/meson.build
+++ b/test cases/frameworks/6 gettext/src/meson.build
@@ -1,2 +1,2 @@
executable('intlprog', 'intlmain.c', install : true,
- dependencies : meson.get_compiler('c').find_library('intl', required : false))
+ dependencies : intl)