Blame m4/intlmacosx.m4

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