annotate m4/intlmacosx.m4 @ 13578:1e26f884665f

Modernize AC_TRY_LINK invocations.
author Bruno Haible <bruno@clisp.org>
date Mon, 19 Jul 2010 23:30:26 +0200
parents c2cbabec01dd
children 97fc9a21a8fb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13578
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
1 # intlmacosx.m4 serial 4 (gettext-0.18.2)
12559
c2cbabec01dd update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents: 11007
diff changeset
2 dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 dnl
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl This file can can be used in projects which are not available under
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 dnl the GNU General Public License or the GNU Library General Public
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 dnl License but which still want to provide support for the GNU gettext
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 dnl functionality.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 dnl Please note that the actual code of the GNU gettext library is covered
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 dnl by the GNU Library General Public License, and the rest of the GNU
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 dnl gettext package package is covered by the GNU General Public License.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 dnl They are *not* in the public domain.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 dnl Checks for special options needed on MacOS X.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 dnl Defines INTL_MACOSX_LIBS.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 AC_DEFUN([gt_INTL_MACOSX],
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 [
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 dnl Check for API introduced in MacOS X 10.2.
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
10979
03e819eea554 More systematic m4 argument quoting.
Bruno Haible <bruno@clisp.org>
parents: 9457
diff changeset
22 [gt_cv_func_CFPreferencesCopyAppValue],
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 [gt_save_LIBS="$LIBS"
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
13578
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
25 AC_LINK_IFELSE(
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
26 [AC_LANG_PROGRAM(
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
27 [[#include <CoreFoundation/CFPreferences.h>]],
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
28 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 [gt_cv_func_CFPreferencesCopyAppValue=yes],
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 [gt_cv_func_CFPreferencesCopyAppValue=no])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 LIBS="$gt_save_LIBS"])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10979
diff changeset
33 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 fi
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 dnl Check for API introduced in MacOS X 10.3.
10979
03e819eea554 More systematic m4 argument quoting.
Bruno Haible <bruno@clisp.org>
parents: 9457
diff changeset
37 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 [gt_save_LIBS="$LIBS"
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
13578
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
40 AC_LINK_IFELSE(
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
41 [AC_LANG_PROGRAM(
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
42 [[#include <CoreFoundation/CFLocale.h>]],
1e26f884665f Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
43 [[CFLocaleCopyCurrent();]])],
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 [gt_cv_func_CFLocaleCopyCurrent=yes],
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 [gt_cv_func_CFLocaleCopyCurrent=no])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 LIBS="$gt_save_LIBS"])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10979
diff changeset
48 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
8925
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 fi
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 INTL_MACOSX_LIBS=
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 fi
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 AC_SUBST([INTL_MACOSX_LIBS])
8cbef316a127 Move gt_INTL_MACOSX to file intlmacosx.m4.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 ])