From 0c627b22f215462a24f744416a5a81a3b9a357d9 Mon Sep 17 00:00:00 2001 From: Craig Leres Date: Sat, 28 Jul 2018 09:19:41 -0700 Subject: [PATCH] When building kconfig set -L and -I flags based on where libintl.a is found rather than keying off OS/OSNAME. This unbreaks building on FreeBSD (but is untested for Windows). --- tools/kconfig/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index 2454e47af..2af544605 100644 --- a/tools/kconfig/Makefile +++ b/tools/kconfig/Makefile @@ -230,12 +230,20 @@ LOADLIBES_nconf = $(shell \ || pkg-config --libs menu panel ncurses 2>/dev/null \ || echo "-lmenu -lpanel -lncurses" ) -ifeq ("$(OS)","Windows_NT") -# Windows toolchains don't seem to count libintl -# as a system library +# Sometimes libintl is in a separate library (Windows, FreeBSD) +ifneq ($(wildcard /usr/local/lib/libintl.a),) +LOADLIBES_mconf += -L/usr/local/lib -lintl +LOADLIBES_nconf += -L/usr/local/lib -lintl + +ifneq ($(wildcard /usr/local/include/libintl.h),) +CFLAGS += -I/usr/local/include +endif +else +ifneq ($(wildcard /usr/lib/libintl.a),) LOADLIBES_mconf += -lintl LOADLIBES_nconf += -lintl endif +endif qconf.o: .tmp_qtcheck