+2005-01-29 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (libintl.la, libgnuintl.la): Use INTL_MACOSX_LIBS
+ instead of INTL_MACOSX_LDFLAGS.
+
2004-09-08 Bruno Haible <bruno@clisp.org>
* vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting length
# Makefile for directory with message catalog handling library of GNU gettext
-# Copyright (C) 1995-1998, 2000-2004 Free Software Foundation, Inc.
+# Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
libintl.la libgnuintl.la: $(OBJECTS)
$(LIBTOOL) --mode=link \
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
- $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LDFLAGS@ $(LIBS) -lc \
+ $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) -lc \
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-rpath $(libdir) \
-no-undefined
+2005-01-29 Bruno Haible <bruno@clisp.org>
+
+ * gettext.m4 (gt_INTL_MACOSX): New macro, extracted from
+ AM_INTL_SUBDIR. Set INTL_MACOSX_LIBS instead of INTL_MACOSX_LDFLAGS.
+ (AM_GNU_GETTEXT): Invoke it. Add the INTL_MACOSX_LIBS contents to
+ LIBINTL and LTLIBINTL.
+ (AM_INTL_SUBDIR): Require gt_INTL_MACOSX.
+
2005-01-19 Bruno Haible <bruno@clisp.org>
* ansi-c++.m4, codeset.m4, gettext.m4, glibc21.m4, glibc2.m4, iconv.m4:
-# gettext.m4 serial 33 (gettext-0.14.2)
+# gettext.m4 serial 34 (gettext-0.14.2)
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,
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
dnl Set USE_NLS.
AM_NLS
fi
])
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1,
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
AC_REQUIRE([gt_INTTYPES_PRI])dnl
AC_REQUIRE([gl_XSIZE])dnl
+ AC_REQUIRE([gt_INTL_MACOSX])dnl
AC_CHECK_TYPE([ptrdiff_t], ,
[AC_DEFINE([ptrdiff_t], [long],
gt_LC_MESSAGES
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
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
- INTL_MACOSX_LDFLAGS=
+ INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
- CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
- INTL_MACOSX_LDFLAGS="-Wl,-framework -Wl,CoreFoundation"
- fi
- AC_SUBST([INTL_MACOSX_LDFLAGS])
-
- 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
- dnl compile.
- dnl bison is only needed for the maintainer (who touches plural.y). But in
- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
- dnl the rule in general Makefile. Now, some people carelessly touch the
- dnl files or have a broken "make" program, hence the plural.c rule will
- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
- dnl present or too old.
- AC_CHECK_PROGS([INTLBISON], [bison])
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- dnl Found it, now check the version.
- AC_MSG_CHECKING([version of bison])
-changequote(<<,>>)dnl
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-changequote([,])dnl
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- esac
- AC_MSG_RESULT([$ac_prog_version])
- fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
+ AC_SUBST([INTL_MACOSX_LIBS])
])
+2005-01-29 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (test_names_LDADD): Add INTL_MACOSX_LIBS.
+
2004-01-29 Bruno Haible <bruno@clisp.org>
* gettext-0.14.1 released.
## Makefile for libuniname directory in GNU gettext package.
-## Copyright (C) 2002-2003 Free Software Foundation, Inc.
+## Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) $(SHELL)
noinst_PROGRAMS = test-names
-test_names_LDADD = libuniname.a ../lib/libgettextlib.la
+# INTL_MACOSX_LIBS is needed because libgettextlib.la depends on libintl.la
+# but libtool doesn't put -Wl,-framework options into .la files.
+test_names_LDADD = libuniname.a ../lib/libgettextlib.la @INTL_MACOSX_LIBS@
EXTRA_DIST += $(TESTS) UnicodeDataNames.txt
+2005-01-29 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (msgcmp_LDADD, msgfmt_LDADD, msgmerge_LDADD,
+ msgunfmt_LDADD, xgettext_LDADD, msgattrib_LDADD, msgcat_LDADD,
+ msgcomm_LDADD, msgconv_LDADD, msgen_LDADD, msgexec_LDADD,
+ msgfilter_LDADD, msggrep_LDADD, msguniq_LDADD): Add INTL_MACOSX_LIBS.
+
2005-01-27 Bruno Haible <bruno@clisp.org>
* msgfmt.c (formatstring_error_logger): Cast the fprrintf argument,
libgettextpo_la_DEPENDENCIES = libgettextsrc.la
# Link dependencies.
-msgcmp_LDADD = libgettextsrc.la
-msgfmt_LDADD = libgettextsrc.la
-msgmerge_LDADD = libgettextsrc.la
-msgunfmt_LDADD = libgettextsrc.la
-xgettext_LDADD = $(LIBUNINAME) libgettextsrc.la @LTLIBEXPAT@
-msgattrib_LDADD = libgettextsrc.la
-msgcat_LDADD = libgettextsrc.la
-msgcomm_LDADD = libgettextsrc.la
-msgconv_LDADD = libgettextsrc.la
-msgen_LDADD = libgettextsrc.la
-msgexec_LDADD = libgettextsrc.la
-msgfilter_LDADD = libgettextsrc.la
-msggrep_LDADD = $(LIBGREP) libgettextsrc.la
+# INTL_MACOSX_LIBS is needed because the programs depend on libintl.la
+# but libtool doesn't put -Wl,-framework options into .la files.
+# For msginit, it is also needed because of localename.c.
+msgcmp_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgfmt_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgmerge_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgunfmt_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+xgettext_LDADD = $(LIBUNINAME) libgettextsrc.la @INTL_MACOSX_LIBS@ @LTLIBEXPAT@
+msgattrib_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgcat_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgcomm_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgconv_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgen_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgexec_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msgfilter_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
+msggrep_LDADD = $(LIBGREP) libgettextsrc.la @INTL_MACOSX_LIBS@
msginit_LDADD = ../intl/localename.@INTL_LIBTOOL_SUFFIX_PREFIX@o \
- @INTL_MACOSX_LDFLAGS@ libgettextsrc.la
-msguniq_LDADD = libgettextsrc.la
+ libgettextsrc.la @INTL_MACOSX_LIBS@
+msguniq_LDADD = libgettextsrc.la @INTL_MACOSX_LIBS@
# Specify installation directory, for --enable-relocatable.
msgcmp_CFLAGS = -DINSTALLDIR=\"$(bindir)\"
+2005-01-29 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (LDADD_yes): Add INTL_MACOSX_LIBS.
+
2005-01-20 Bruno Haible <bruno@clisp.org>
* lang-guile: Make it work.
-I../lib -I$(top_srcdir)/lib \
-I../intl
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+# INTL_MACOSX_LIBS is needed because the programs depend on libintl.la
+# but libtool doesn't put -Wl,-framework options into .la files.
LDADD = $(LDADD_@USE_INCLUDED_LIBINTL@)
-LDADD_yes = ../intl/libintl.la
+LDADD_yes = ../intl/libintl.la @INTL_MACOSX_LIBS@
LDADD_no = ../intl/libgnuintl.la @LTLIBINTL@
noinst_PROGRAMS = tstgettext tstngettext testlocale cake fc3 fc4 fc5
tstgettext_SOURCES = tstgettext.c setlocale.c