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).
This commit is contained in:
Craig Leres 2018-07-28 09:19:41 -07:00
parent 0fb2019f2b
commit 0c627b22f2

View file

@ -230,12 +230,20 @@ LOADLIBES_nconf = $(shell \
|| pkg-config --libs menu panel ncurses 2>/dev/null \ || pkg-config --libs menu panel ncurses 2>/dev/null \
|| echo "-lmenu -lpanel -lncurses" ) || echo "-lmenu -lpanel -lncurses" )
ifeq ("$(OS)","Windows_NT") # Sometimes libintl is in a separate library (Windows, FreeBSD)
# Windows toolchains don't seem to count libintl ifneq ($(wildcard /usr/local/lib/libintl.a),)
# as a system library 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_mconf += -lintl
LOADLIBES_nconf += -lintl LOADLIBES_nconf += -lintl
endif endif
endif
qconf.o: .tmp_qtcheck qconf.o: .tmp_qtcheck