Blame m4/intlmacosx.m4

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