Blame m4/intlmacosx.m4

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