diff --git a/contrib/10.readline/nitro.mk b/contrib/10.readline/nitro.mk index 91d210b6..280d6f52 100644 --- a/contrib/10.readline/nitro.mk +++ b/contrib/10.readline/nitro.mk @@ -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`