# -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro.
# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
+# -DBUILDING_DLL: Change expansion of DLL_EXPORTED macro. We're compiling
+# a library. Exporting the relevant symbols is desired.
AM_CPPFLAGS = \
-Ignulib-lib -I$(srcdir)/gnulib-lib \
-DLOCALEDIR=$(localedir_c_make) -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
- -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL
+ -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL
if WOE32
# On mingw, disable the declarations of *printf functions as aliases to the
-/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
- Library.
+/* Redirections from public function names to GNU libintl functions.
Copyright (C) 1995, 2000-2003, 2005, 2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* @@ end of prolog @@ */
+
/* This file redirects the gettext functions (without prefix) to those
defined in the included GNU libintl library (with "libintl_" prefix).
- It is compiled into libintl in order to make the AM_GNU_GETTEXT test
- of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
- has the redirections primarily in the <libintl.h> include file.
- It is also compiled into libgnuintl so that libgnuintl.so can be used
- as LD_PRELOADable library on glibc systems, to provide the extra
- features that the functions in the libc don't have (namely, logging). */
-
+ It is compiled into libintl for three purposes:
+ * Packages that bind libintl into other programming languages
+ (Python, Perl, PHP, OCaml, Free Pascal Compiler, mailfromd's mail
+ filtering language, and many others) bind to the symbols without
+ prefix and at the linker level, i.e. without '#include <libintl.h>'.
+ Only few packages bind to the symbols with "libintl_" prefix.
+ * On glibc systems, we want that existing and future features of
+ GNU gettext (such as the logging to $GETTEXT_LOG_UNTRANSLATED)
+ become available when the program is linked against -lintl or
+ when libintl.so is used LD_PRELOADable library.
+ * In order to make the AM_GNU_GETTEXT test of gettext <= 0.11.2 work
+ with the libintl library >= 0.11.3 which has the redirections
+ primarily in the <libintl.h> include file.
+ */
#undef gettext
#undef dgettext