From 94c2ed0ebe005aa6389b02a61e3c16d08035299c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 12 Jun 2017 15:57:22 -0400 Subject: [PATCH] Add ICU_CFLAGS to global CPPFLAGS The original code only added ICU_CFLAGS to the backend build. But it is also needed for building external modules that include pg_locale.h. So add it to the global CPPFLAGS. (This is only relevant if ICU is not in a compiler default path, so it apparently hasn't bitten many.) --- src/Makefile.global.in | 2 ++ src/backend/common.mk | 2 -- src/backend/snowball/Makefile | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 7af91e2d58..dc8a89af8e 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -232,6 +232,8 @@ PTHREAD_LIBS = @PTHREAD_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +override CPPFLAGS := $(CPPFLAGS) $(ICU_CFLAGS) + ifdef PGXS override CPPFLAGS := -I$(includedir_server) -I$(includedir_internal) $(CPPFLAGS) else # not PGXS diff --git a/src/backend/common.mk b/src/backend/common.mk index 0b57543bc4..5d599dbd0c 100644 --- a/src/backend/common.mk +++ b/src/backend/common.mk @@ -8,8 +8,6 @@ # this directory and SUBDIRS to subdirectories containing more things # to build. -override CPPFLAGS := $(CPPFLAGS) $(ICU_CFLAGS) - ifdef PARTIAL_LINKING # old style: linking using SUBSYS.o subsysfilename = SUBSYS.o diff --git a/src/backend/snowball/Makefile b/src/backend/snowball/Makefile index 518178ff39..50cbace41d 100644 --- a/src/backend/snowball/Makefile +++ b/src/backend/snowball/Makefile @@ -14,8 +14,7 @@ top_builddir = ../../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS := -I$(top_srcdir)/src/include/snowball \ - -I$(top_srcdir)/src/include/snowball/libstemmer $(CPPFLAGS) \ - $(ICU_CFLAGS) + -I$(top_srcdir)/src/include/snowball/libstemmer $(CPPFLAGS) OBJS= $(WIN32RES) dict_snowball.o api.o utilities.o \ stem_ISO_8859_1_danish.o \