2N/A# intlmacosx.m4 serial 4 (gettext-0.18.2)
2N/Adnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
2N/Adnl This file is free software; the Free Software Foundation
2N/Adnl gives unlimited permission to copy and/or distribute it,
2N/Adnl with or without modifications, as long as this notice is preserved.
2N/Adnl
2N/Adnl This file can can be used in projects which are not available under
2N/Adnl the GNU General Public License or the GNU Library General Public
2N/Adnl License but which still want to provide support for the GNU gettext
2N/Adnl functionality.
2N/Adnl Please note that the actual code of the GNU gettext library is covered
2N/Adnl by the GNU Library General Public License, and the rest of the GNU
2N/Adnl gettext package package is covered by the GNU General Public License.
2N/Adnl They are *not* in the public domain.
2N/A
2N/Adnl Checks for special options needed on MacOS X.
2N/Adnl Defines INTL_MACOSX_LIBS.
2N/AAC_DEFUN([gt_INTL_MACOSX],
2N/A[
2N/A dnl Check for API introduced in MacOS X 10.2.
2N/A AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
2N/A [gt_cv_func_CFPreferencesCopyAppValue],
2N/A [gt_save_LIBS="$LIBS"
2N/A LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
2N/A AC_LINK_IFELSE(
2N/A [AC_LANG_PROGRAM(
2N/A [[#include <CoreFoundation/CFPreferences.h>]],
2N/A [[CFPreferencesCopyAppValue(NULL, NULL)]])],
2N/A [gt_cv_func_CFPreferencesCopyAppValue=yes],
2N/A [gt_cv_func_CFPreferencesCopyAppValue=no])
2N/A LIBS="$gt_save_LIBS"])
2N/A if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
2N/A AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
2N/A [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
2N/A fi
2N/A dnl Check for API introduced in MacOS X 10.3.
2N/A AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
2N/A [gt_save_LIBS="$LIBS"
2N/A LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
2N/A AC_LINK_IFELSE(
2N/A [AC_LANG_PROGRAM(
2N/A [[#include <CoreFoundation/CFLocale.h>]],
2N/A [[CFLocaleCopyCurrent();]])],
2N/A [gt_cv_func_CFLocaleCopyCurrent=yes],
2N/A [gt_cv_func_CFLocaleCopyCurrent=no])
2N/A LIBS="$gt_save_LIBS"])
2N/A if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
2N/A AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
2N/A [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
2N/A fi
2N/A INTL_MACOSX_LIBS=
2N/A if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
2N/A INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
2N/A fi
2N/A AC_SUBST([INTL_MACOSX_LIBS])
2N/A])