support environments without libedit

This commit is contained in:
Yuichi Nishiwaki 2015-05-30 18:13:55 +09:00
parent 356643170a
commit bf0e388b3e
1 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,10 @@
CONTRIB_SRCS += contrib/10.readline/src/readline.c
CONTRIB_INITS += readline
libedit_exists := $(shell pkg-config libedit --exists; echo $$?)
LDFLAGS += `pkg-config libedit --libs`
ifeq ($(libedit_exists),0)
CONTRIB_SRCS += contrib/10.readline/src/readline.c
CONTRIB_INITS += readline
LDFLAGS += `pkg-config libedit --libs`
endif
contrib/src/readline.o: contrib/src/readline.c
$(CC) $(CFLAGS) -o $@ $< `pkg-config libedit --cflags`