Просмотр исходного кода

Revert change re default HAVE_GETTEXT on macOS

* Makefile: Add commentary about this.
* private.h (HAVE_GETTEXT): Revert previous change in this area.
Paul Eggert 3 лет назад
Родитель
Сommit
377e31128e
2 измененных файлов с 3 добавлено и 5 удалено
  1. 2 0
      Makefile
  2. 1 5
      private.h

+ 2 - 0
Makefile

@@ -196,6 +196,7 @@ PACKRATLIST=
 UTF8_LOCALE=	en_US.utf8
 
 # Non-default libraries needed to link.
+# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
 LDLIBS=
 
 # Add the following to the end of the "CFLAGS=" line as needed to override
@@ -213,6 +214,7 @@ LDLIBS=
 #  -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux),
 #	-DHAVE_GETRANDOM=0 to avoid using getrandom
 #  -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
+#	where LDLIBS also needs to contain -lintl on some hosts;
 #	-DHAVE_GETTEXT=0 to avoid using gettext
 #  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
 #	ctime_r and asctime_r incompatibly with the POSIX standard

+ 1 - 5
private.h

@@ -63,11 +63,7 @@
 # define HAVE_GENERIC (201112 <= __STDC_VERSION__)
 #endif
 
-/* Disable gettext by default on macOS, because too many macOS
-   installations are so messed up that '#include <libintl.h>' compiles
-   but 'gettext ("hello")' does not link.  */
-#if (!defined HAVE_GETTEXT && defined __has_include \
-     && ! (defined __APPLE__ && defined __MACH__))
+#if !defined HAVE_GETTEXT && defined __has_include
 # if __has_include(<libintl.h>)
 #  define HAVE_GETTEXT true
 # endif