Skip to content

Commit 4d9fbb4

Browse files
author
ripley
committed
update
git-svn-id: https://svn.r-project.org/R/trunk@87917 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 0281af9 commit 4d9fbb4

File tree

5 files changed

+43
-17
lines changed

5 files changed

+43
-17
lines changed

configure

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63493,8 +63493,10 @@ esac
6349363493
fi
6349463494
rm -f core conftest.err conftest.$ac_objext conftest.beam \
6349563495
conftest$ac_exeext conftest.$ac_ext
63496-
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
63497-
LIBS="$LIBS $LIBICONV"
63496+
gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS"
63497+
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \
63498+
&& { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then
63499+
LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA"
6349863500
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6349963501
/* end confdefs.h. */
6350063502
#include <libintl.h>

doc/NEWS.Rd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@
279279
\item There is now support for installing the debug symbols for
280280
recommended packages on macOS: see \samp{REC_INSTALL_OPT} in file
281281
\file{config.site}.
282+
283+
\item \command{configure} is now able to find an external
284+
\code{libintl} on macOS (it failed to try linking with the macOS
285+
Core Foundation framework).
282286
}
283287
}
284288

doc/manual/R-admin.texi

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3296,11 +3296,12 @@ Those distributing binary versions of @R{} may need to be aware of the
32963296
licences of the external libraries it is linked to (including `useful'
32973297
libraries from the next section). The @code{liblzma} library is in the
32983298
public domain and X11, @code{libbzip2}, @code{libcurl} and @code{zlib}
3299-
have MIT-style licences. PCRE and PCRE2 have a BSD-style licence which
3299+
have MIT-style licences. PCRE1 and PCRE2 have a BSD-style licence which
33003300
requires distribution of the licence (included in @R{}'s
33013301
@file{COPYRIGHTS} file) in binary distributions. GNU @code{readline} is
33023302
licensed under GPL (which version(s) of GPL depends on the
3303-
@code{readline} version).
3303+
@code{readline} version). @code{libzstd} is dual-licensed with either a
3304+
BSD or GPL licence and used in @R{} under the latter.
33043305

33053306

33063307
@node Useful libraries and programs
@@ -3398,25 +3399,34 @@ headers@footnote{@R{} uses @file{rpc/xdr.h} but that includes
33983399
@file{netconfig.h} from the top @file{tirpc} directory.} need to be on
33993400
the C include path or under @file{/usr/include/tirpc}.
34003401

3402+
Thr @R{} sources contain an older copy of @code{libintl} from GNU
3403+
@code{gettext} which is used if this is not part of @code{libc} (as it is
3404+
when using @code{glibc}) nor found as an external library. This is
3405+
desirable and is planned to be required in future.
3406+
34013407
Library @code{libdeflate} (@url{https://github.com/ebiggers/libdeflate})
34023408
is used by @code{memCompress()} and @code{memDecompress()} if available.
34033409

3410+
The compresson library for @code{zstd} is used if available. It might
3411+
be named @code{libzstd} or be part of a package including the
3412+
@command{zstd} utilities.
3413+
34043414
Use of the X11 clipboard selection requires the @code{Xmu} headers and
34053415
libraries. These are normally part of an X11 installation (e.g.@: the
34063416
Debian meta-package @samp{xorg-dev}), but some distributions have split
34073417
this into smaller parts, so for example recent versions of Fedora
34083418
require the @samp{libXmu} and @samp{libXmu-devel} @abbr{RPM}s.
34093419

3410-
Some systems (notably macOS and at least some FreeBSD systems) have
3420+
Some systems (notably macOS and some FreeBSD systems) have had
34113421
inadequate support for collation in multibyte locales. It is possible
34123422
to replace the OS's collation support by that from ICU (International
34133423
Components for Unicode, @uref{https://icu.unicode.org/}), and this
34143424
provides much more precise control over collation on all systems. ICU
34153425
is available as sources and as binary distributions for (at least) most
3416-
Linux distributions, FreeBSD, macOS and @abbr{AIX}, usually as @code{libicu} or
3417-
@code{icu4c}. It will be used by default where available: should a very
3418-
old or broken version of ICU be found this can be suppressed by
3419-
@option{--without-ICU}.
3426+
Linux distributions, FreeBSD, macOS and @abbr{AIX}, usually as
3427+
@code{libicu} or @code{icu4c}. It will be used by default where
3428+
available: should a very old or broken version of ICU be found this can
3429+
be suppressed by @option{--without-ICU}.
34203430

34213431
The @code{bitmap} and @code{dev2bitmap} devices and function
34223432
@code{embedFonts()} use @I{Ghostscript}
@@ -3431,7 +3441,7 @@ a useful checklist for other systems:
34313441
@example
34323442
bzip2 cairo fontconfig freetype fribidi gcc gcc-gfortran gcc-c++ glib2
34333443
glibc harfbuzz lapack libX11 libXext libXt libcurl libdeflate libicu
3434-
libjpeg libpng libtiff libtirpc libxcrypt ncurses pango
3444+
libjpeg libpng libtiff libtirpc libxcrypt libzstd ncurses pango
34353445
pkgconf-pkg-config pcre2 readline tcl tk xz zlib
34363446
@end example
34373447
@noindent
@@ -5171,11 +5181,12 @@ the full range of bitmapped graphics devices. (Some builds of
51715181
@code{tiff} may require @code{libwebp} and/or @code{openjpeg}.)
51725182

51735183
@item
5174-
Component @code{libdeflate} for faster internal (de)compression.
5184+
Component @code{libdeflate} for faster internal (de)compression and
5185+
@code{zstd} for support for that type of compression.
51755186

5176-
@c @item
5177-
@c Component @code{gettext} for @code{libintl}, an updated version of that
5178-
@c in the @R{} sources.
5187+
@item
5188+
Component @code{gettext} for @code{libintl}, an updated version of that
5189+
in the @R{} sources.
51795190

51805191
@item
51815192
An X sub-system unless configuring using @option{--without-x}: see

m4/gettext.m4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
## wchar_t.m4 wint_t.m4 xsize.m4 > .../m4/gettext.m4
77

88
## 2022-09-28 modify to have prototypes, for clang 15.
9+
## 2025-03-09 test with macOS libs for external libiconv too.
910

1011
## Then disable testing for libiconv prefix
1112

@@ -199,8 +200,11 @@ extern
199200
const char *_nl_expand_alias (const char *);]], [[bindtextdomain ("", "");
200201
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")]])],[eval "$gt_func_gnugettext_libintl=yes"],[eval "$gt_func_gnugettext_libintl=no"])
201202
dnl Now see whether libintl exists and depends on libiconv.
202-
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
203-
LIBS="$LIBS $LIBICONV"
203+
dnl OS dependent libraries, specifically on macOS.
204+
gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS"
205+
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \
206+
&& { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then
207+
LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA"
204208
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libintl.h>
205209
$gt_revision_test_code
206210
extern int _nl_msg_cat_cntr;

src/extra/intl/R_changes

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@ Various small changes were made to avoid warnings.
1818

1919
BDR
2020

21-
One more change for macOS: the locale detection is simply off-loaded
21+
One more change for macOS: the charset detection is simply off-loaded
2222
to locale2charset, because the built-in detection in gettext doesn't work.
2323
This also ensures that R and gettext are in sync wrt the charset used.
2424

2525
SU
2626

27+
2025-03-09: m4/gattext.m4 was modified using ideas from gettext-0.24
28+
to correctly detected an external libintl on macOS.
29+
langorefs.c updated to that from gettext-0.24 for allegedly improved
30+
behaviour on macOS.
31+
2732
diff -ru intl/dcigettext.c ../extra/intl/dcigettext.c
2833
--- intl/dcigettext.c 2007-10-21 19:41:41.000000000 +0100
2934
+++ ../extra/intl/dcigettext.c 2008-01-13 14:39:54.703125000 +0000

0 commit comments

Comments
 (0)