The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/intlmacosx.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # intlmacosx.m4 serial 6 (gettext-0.20)
    2 dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc.
    3 dnl This file is free software; the Free Software Foundation
    4 dnl gives unlimited permission to copy and/or distribute it,
    5 dnl with or without modifications, as long as this notice is preserved.
    6 dnl
    7 dnl This file can be used in projects which are not available under
    8 dnl the GNU General Public License or the GNU Library General Public
    9 dnl License but which still want to provide support for the GNU gettext
   10 dnl functionality.
   11 dnl Please note that the actual code of the GNU gettext library is covered
   12 dnl by the GNU Library General Public License, and the rest of the GNU
   13 dnl gettext package is covered by the GNU General Public License.
   14 dnl They are *not* in the public domain.
   15 
   16 dnl Checks for special options needed on Mac OS X.
   17 dnl Defines INTL_MACOSX_LIBS.
   18 AC_DEFUN([gt_INTL_MACOSX],
   19 [
   20   dnl Check for API introduced in Mac OS X 10.4.
   21   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
   22     [gt_cv_func_CFPreferencesCopyAppValue],
   23     [gt_save_LIBS="$LIBS"
   24      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
   25      AC_LINK_IFELSE(
   26        [AC_LANG_PROGRAM(
   27           [[#include <CoreFoundation/CFPreferences.h>]],
   28           [[CFPreferencesCopyAppValue(NULL, NULL)]])],
   29        [gt_cv_func_CFPreferencesCopyAppValue=yes],
   30        [gt_cv_func_CFPreferencesCopyAppValue=no])
   31      LIBS="$gt_save_LIBS"])
   32   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
   33     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
   34       [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
   35   fi
   36   dnl Check for API introduced in Mac OS X 10.5.
   37   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
   38     [gt_save_LIBS="$LIBS"
   39      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
   40      AC_LINK_IFELSE(
   41        [AC_LANG_PROGRAM(
   42           [[#include <CoreFoundation/CFLocale.h>]],
   43           [[CFLocaleCopyCurrent();]])],
   44        [gt_cv_func_CFLocaleCopyCurrent=yes],
   45        [gt_cv_func_CFLocaleCopyCurrent=no])
   46      LIBS="$gt_save_LIBS"])
   47   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
   48     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
   49       [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
   50   fi
   51   AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
   52     [gt_save_LIBS="$LIBS"
   53      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
   54      AC_LINK_IFELSE(
   55        [AC_LANG_PROGRAM(
   56           [[#include <CoreFoundation/CFLocale.h>]],
   57           [[CFLocaleCopyPreferredLanguages();]])],
   58        [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
   59        [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
   60      LIBS="$gt_save_LIBS"])
   61   if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
   62     AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
   63       [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
   64   fi
   65   INTL_MACOSX_LIBS=
   66   if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
   67      || test $gt_cv_func_CFLocaleCopyCurrent = yes \
   68      || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
   69     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
   70   fi
   71   AC_SUBST([INTL_MACOSX_LIBS])
   72 ])

Cache object: e372c273a3b857ca64c32d43e06434ba


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.