From: Bruno Haible Date: Wed, 4 May 2005 10:48:06 +0000 (+0000) Subject: Simplify the MacOS X support. X-Git-Tag: v0.15~532 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad586f8101d89bd0a014415e84af3716fa5acbb1;p=thirdparty%2Fgettext.git Simplify the MacOS X support. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 0c6ef59a9..6cc57faa1 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,18 @@ +2005-04-30 Bruno Haible + + * langprefs.c: Use #include syntax. It's a + special Apple syntax implemented in the C compiler, but since + already uses it, all compilers usable on MacOS X must + support it. + * localename.c: Likewise. + +2005-05-03 Bruno Haible + + * 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 Make it possible for multiple threads to use gettext() in different diff --git a/gettext-runtime/intl/langprefs.c b/gettext-runtime/intl/langprefs.c index 416398ded..40cfaada0 100644 --- a/gettext-runtime/intl/langprefs.c +++ b/gettext-runtime/intl/langprefs.c @@ -26,10 +26,10 @@ #if HAVE_CFPREFERENCESCOPYAPPVALUE # include -# include -# include -# include -# include +# include +# include +# include +# include extern void _nl_locale_name_canonicalize (char *name); #endif diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c index 323c7323c..697f6e247 100644 --- a/gettext-runtime/intl/localename.c +++ b/gettext-runtime/intl/localename.c @@ -29,11 +29,11 @@ #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE # include -# include +# include # if HAVE_CFLOCALECOPYCURRENT -# include +# include # elif HAVE_CFPREFERENCESCOPYAPPVALUE -# include +# include # endif #endif diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index ea0b267ee..00db8f0ab 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,16 @@ +2005-04-30 Bruno Haible + + * gettext.m4 (AM_INTL_SUBDIR): Remove CPPFLAGS addition for + CoreFoundation on MacOS X. + (gt_INTL_MACOSX): Likewise. Use #include syntax. + It's a special Apple syntax implemented in the C compiler, but since + 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 + + * gettext.m4 (AM_INTL_SUBDIR): Also test for NL_LOCALE_NAME macro. + 2005-04-11 Bruno Haible * gettext-0.14.4 released. diff --git a/gettext-runtime/m4/gettext.m4 b/gettext-runtime/m4/gettext.m4 index c0caa41b4..dc6274338 100644 --- a/gettext-runtime/m4/gettext.m4 +++ b/gettext-runtime/m4/gettext.m4 @@ -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 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 ], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [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 ], [CFLocaleCopyCurrent();], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [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,