mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2025-12-25 15:00:03 +01:00
pkg-config doesn't use message translation, so there's no need to build it into the bundled glib. Furthermore, when not using glibc, this drags in extra dependencies on gettext, libintl and iconv. Remove their usage in two steps: 1. Don't include libintl.h directly from code. glibintl.h conditionalizes the include of libintl.h based on the ENABLE_NLS define and creates fallback macros when it's unwanted. 2. Remove the usage of the gettext macros in glib's configure.ac. This ensures that the unwanted dependencies aren't searched for. Two defines are kept around to keep the code happy.
42 lines
1 KiB
Diff
42 lines
1 KiB
Diff
diff --git a/glib/configure.ac b/glib/configure.ac
|
|
index a78d516..8ac9631 100644
|
|
--- a/glib/configure.ac
|
|
+++ b/glib/configure.ac
|
|
@@ -455,23 +455,12 @@ dnl
|
|
dnl gettext support
|
|
dnl
|
|
|
|
-GLIB_GNU_GETTEXT
|
|
-
|
|
-if test "$gt_cv_have_gettext" != "yes" ; then
|
|
- AC_MSG_ERROR([
|
|
-*** You must have either have gettext support in your C library, or use the
|
|
-*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
|
|
-])
|
|
-fi
|
|
-
|
|
-LIBS="$INTLLIBS $LIBS"
|
|
-
|
|
GETTEXT_PACKAGE=glib20
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"],
|
|
[Define the gettext package to be used])
|
|
|
|
-GLIB_DEFINE_LOCALEDIR(GLIB_LOCALE_DIR)
|
|
+AC_DEFINE_UNQUOTED([GLIB_LOCALE_DIR], [""], [Dummy catalog directory])
|
|
|
|
dnl
|
|
dnl Now we are done with gettext checks, figure out ICONV_LIBS
|
|
diff --git a/glib/glib/ggettext.c b/glib/glib/ggettext.c
|
|
index ff1bb6b..c2d1ad5 100644
|
|
--- a/glib/glib/ggettext.c
|
|
+++ b/glib/glib/ggettext.c
|
|
@@ -40,7 +40,7 @@
|
|
|
|
#include <string.h>
|
|
#include <locale.h>
|
|
-#include <libintl.h>
|
|
+#include "glibintl.h"
|
|
|
|
#ifdef G_OS_WIN32
|
|
|