ref: ceac1b57d9d9a19d2edfec3aaf8cd21c6269ecef
parent: 2be672cd3039bd12e9be8ea9f7d05cc162765077
author: Tor Andersson <tor.andersson@artifex.com>
date: Fri Jun 15 11:03:08 EDT 2018
Allow enabling or disabling readline support by setting HAVE_READLINE.
--- a/Makefile
+++ b/Makefile
@@ -23,9 +23,8 @@
ifeq "$(shell uname)" "Linux"
CFLAGS += -ffunction-sections -fdata-sections
- CFLAGS += -DHAVE_READLINE
LDFLAGS += -Wl,--gc-sections
- LIBREADLINE += -lreadline
+ HAVE_READLINE := yes
endif
ifeq "$(build)" "debug"
@@ -36,6 +35,11 @@
else
CFLAGS += -Os
LDFLAGS += -Wl,-s
+endif
+
+ifeq "$(HAVE_READLINE)" "yes"
+ CFLAGS += -DHAVE_READLINE
+ LIBREADLINE += -lreadline
endif
CFLAGS += $(XCFLAGS)