PKG_DEPENDS += readline
endif
else
-ifeq "$(GhcLibsWithReadline)" "YES"
+-include $(FPTOOLS_TOP)/libraries/readline/config.mk
+# readline's config.mk sets PACKAGE, which we don't want here
+PACKAGE=
+ifeq "$(READLINE_BUILD_PACKAGE)" "yes"
SRC_HC_OPTS += -package readline -DUSE_READLINE
PKG_DEPENDS += readline
endif