summaryrefslogtreecommitdiff
path: root/m4macros
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-05-19 09:26:07 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-05-19 09:26:09 +0900
commit3b9d5fe4d5e9f77c1c6431426d070f6fb2692873 (patch)
tree9bd4b77b6eb291b35926b66bcf3f075ff62a27f4 /m4macros
parent745c4646f8ed29f2769ff7bdea08436eceaa32cd (diff)
downloadglib-3b9d5fe4d5e9f77c1c6431426d070f6fb2692873.tar.gz
glib-3b9d5fe4d5e9f77c1c6431426d070f6fb2692873.tar.bz2
glib-3b9d5fe4d5e9f77c1c6431426d070f6fb2692873.zip
Imported Upstream version 2.52.1
Change-Id: Idca68df633e439e8492a9e0d40f78b49d689d84b Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'm4macros')
-rw-r--r--m4macros/glib-gettext.m449
1 files changed, 48 insertions, 1 deletions
diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
index 155b1d83d..dc17a98db 100644
--- a/m4macros/glib-gettext.m4
+++ b/m4macros/glib-gettext.m4
@@ -97,6 +97,51 @@ fi
AC_SUBST($1)dnl
])
+dnl Checks for special options needed on Mac OS X.
+dnl Defines INTL_MACOSX_LIBS.
+dnl
+dnl Copied from intlmacosx.m4 in gettext, GPL.
+dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
+glib_DEFUN([glib_gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in Mac OS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFPreferences.h>]],
+ [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in Mac OS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyCurrent();]])],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+
# GLIB_WITH_NLS
#-----------------
glib_DEFUN([GLIB_WITH_NLS],
@@ -110,6 +155,8 @@ glib_DEFUN([GLIB_WITH_NLS],
XGETTEXT=:
INTLLIBS=
+ glib_gt_INTL_MACOSX
+
AC_CHECK_HEADER(libintl.h,
[gt_cv_func_dgettext_libintl="no"
libintl_extra_libs=""
@@ -193,7 +240,7 @@ glib_DEFUN([GLIB_WITH_NLS],
fi
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
- INTLLIBS="-lintl $libintl_extra_libs"
+ INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
fi
if test "$gt_cv_have_gettext" = "yes"; then