This fix was originally provided by Johannes. This replaces
the linker adhoc fix to match more with what we do upstream
without requiring the use of HOSTLOADLIBES.
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
conf: conf.o zconf.tab.o
-mconf: LDFLAGS = -Wl,--add-needed $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
-mconf: CFLAGS += -DCURSES_LOC="<ncurses.h>" -DLOCALE
+mconf_CFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ccflags) -DLOCALE
+mconf_LDFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
+mconf: CFLAGS += $(mconf_CFLAGS)
+
mconf: mconf.o zconf.tab.o $(LXDIALOG)
+ $(CC) -o mconf $^ $(mconf_LDFLAGS)
.PHONY: clean
clean: