From 1f9fa480a0705ab74d25df7a3496de0d0cd56565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Piotr=20C=C5=82apa?= Date: Fri, 8 Nov 2019 12:23:30 +0100 Subject: [PATCH] configure: on darwin add CoreFoundation to flags before checking for gettext macOS needs to link to CoreFoundation for gettext to work. We reorder the autoconf tests so CoreFoundation is added to LIBS earlier and the -lintl test does not fail (which would exclude it from the final set of flags). --- configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 0b28dda44cd..ff523867e77 100644 --- a/configure.ac +++ b/configure.ac @@ -2839,6 +2839,11 @@ void *x = uuid_enc_be # pthread (first!) on Linux AC_SEARCH_LIBS(sem_init, pthread rt posix4) +if test $ac_sys_system = Darwin +then + LIBS="$LIBS -framework CoreFoundation" +fi + # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, [AC_DEFINE(WITH_LIBINTL, 1, @@ -5169,11 +5174,6 @@ if test "x$ac_cv_file__dev_ptc" = xyes; then [Define to 1 if you have the /dev/ptc device file.]) fi -if test $ac_sys_system = Darwin -then - LIBS="$LIBS -framework CoreFoundation" -fi - AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include