]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Simplify the MacOS X support.
authorBruno Haible <bruno@clisp.org>
Wed, 4 May 2005 10:48:06 +0000 (10:48 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:33 +0000 (12:12 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/langprefs.c
gettext-runtime/intl/localename.c
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/gettext.m4

index 0c6ef59a963edd0a3026c70f176f2d557e30144c..6cc57faa12f3a4d6fb10470285e0858494ef83c5 100644 (file)
@@ -1,3 +1,18 @@
+2005-04-30  Bruno Haible  <bruno@clisp.org>
+
+       * langprefs.c: Use #include <CoreFoundation/...> syntax. It's a
+       special Apple syntax implemented in the C compiler, but since
+       <CFString.h> already uses it, all compilers usable on MacOS X must
+       support it.
+       * localename.c: Likewise.
+
+2005-05-03  Bruno Haible  <bruno@clisp.org>
+
+       * dcigettext.c: Include langinfo.h.
+       (HAVE_PER_THREAD_LOCALE): Define also if HAVE_NL_LOCALE_NAME.
+       (DCIGETTEXT): Support retrieving the locale name through nl_langinfo
+       and NL_LOCALE_NAME.
+
 2005-03-20  Bruno Haible  <bruno@clisp.org>
 
        Make it possible for multiple threads to use gettext() in different
index 416398ded7bd5869dc0395644e9d373d739e969a..40cfaada01d841fa0e3ee249524098b8f4a63d60 100644 (file)
 
 #if HAVE_CFPREFERENCESCOPYAPPVALUE
 # include <string.h>
-# include <CFPreferences.h>
-# include <CFPropertyList.h>
-# include <CFArray.h>
-# include <CFString.h>
+# include <CoreFoundation/CFPreferences.h>
+# include <CoreFoundation/CFPropertyList.h>
+# include <CoreFoundation/CFArray.h>
+# include <CoreFoundation/CFString.h>
 extern void _nl_locale_name_canonicalize (char *name);
 #endif
 
index 323c7323cbdd765fb25f40c55f27993a054776cd..697f6e247401a009bcc1a1d7044da20d9496e8fe 100644 (file)
 
 #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
 # include <string.h>
-# include <CFString.h>
+# include <CoreFoundation/CFString.h>
 # if HAVE_CFLOCALECOPYCURRENT
-#  include <CFLocale.h>
+#  include <CoreFoundation/CFLocale.h>
 # elif HAVE_CFPREFERENCESCOPYAPPVALUE
-#  include <CFPreferences.h>
+#  include <CoreFoundation/CFPreferences.h>
 # endif
 #endif
 
index ea0b267ee3ff34b89b91e7232a8186afe8de7253..00db8f0ab370d4765b64f11065249c1a83fa9e86 100644 (file)
@@ -1,3 +1,16 @@
+2005-04-30  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.m4 (AM_INTL_SUBDIR): Remove CPPFLAGS addition for
+       CoreFoundation on MacOS X.
+       (gt_INTL_MACOSX): Likewise. Use #include <CoreFoundation/...> syntax.
+       It's a special Apple syntax implemented in the C compiler, but since
+       <CFString.h> already uses it, all compilers usable on MacOS X must
+       support it. In LIBS, use -Wl prefix for -framework option.
+
+2005-05-03  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.m4 (AM_INTL_SUBDIR): Also test for NL_LOCALE_NAME macro.
+
 2005-04-11  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.4 released.
index c0caa41b4cca0ede6cbf8d193fdcd0c8962e500c..dc6274338744b911c67aa1431bf6e96f45813eef 100644 (file)
@@ -1,4 +1,4 @@
-# gettext.m4 serial 38 (gettext-0.15)
+# gettext.m4 serial 39 (gettext-0.15)
 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -457,10 +457,6 @@ __fsetlocking])
       [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOUURCE is defined.])
   fi
 
-  if test -n "$INTL_MACOSX_LIBS"; then
-    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
-  fi
-
   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
   dnl because plural.y uses bison specific features. It requires at least
   dnl bison-1.26 because earlier versions generate a plural.c that doesn't
@@ -501,15 +497,12 @@ AC_DEFUN([gt_INTL_MACOSX],
   dnl Check for API introduced in MacOS X 10.2.
   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
     gt_cv_func_CFPreferencesCopyAppValue,
-    [gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
-     gt_save_LIBS="$LIBS"
-     LIBS="$LIBS -framework CoreFoundation"
-     AC_TRY_LINK([#include <CFPreferences.h>],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
        [CFPreferencesCopyAppValue(NULL, NULL)],
        [gt_cv_func_CFPreferencesCopyAppValue=yes],
        [gt_cv_func_CFPreferencesCopyAppValue=no])
-     CPPFLAGS="$gt_save_CPPFLAGS"
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
@@ -517,14 +510,11 @@ AC_DEFUN([gt_INTL_MACOSX],
   fi
   dnl Check for API introduced in MacOS X 10.3.
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
-    [gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
-     gt_save_LIBS="$LIBS"
-     LIBS="$LIBS -framework CoreFoundation"
-     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
        [gt_cv_func_CFLocaleCopyCurrent=yes],
        [gt_cv_func_CFLocaleCopyCurrent=no])
-     CPPFLAGS="$gt_save_CPPFLAGS"
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,