From ebb36d56c732ffe9cdb8d2ea53d00e1d4ece8f97 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 8 Dec 2013 11:07:46 -0800 Subject: ao-tools: Allow building without stlink and readline This adds --without-stlink and --without-readline options to configure to disable these features, and adjusts the build process and code to handle that. Signed-off-by: Keith Packard --- ao-tools/ao-dbg/ao-dbg-main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ao-tools/ao-dbg/ao-dbg-main.c') diff --git a/ao-tools/ao-dbg/ao-dbg-main.c b/ao-tools/ao-dbg/ao-dbg-main.c index 21b83a3d..25eca54b 100644 --- a/ao-tools/ao-dbg/ao-dbg-main.c +++ b/ao-tools/ao-dbg/ao-dbg-main.c @@ -16,6 +16,10 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "ao-dbg.h" #include #include @@ -204,13 +208,16 @@ s51_putc(int c) putc(c, s51_output); } +#if HAVE_LIBREADLINE #include #include +#endif int s51_read_line(char *line, int len) { int ret; +#if HAVE_LIBREADLINE if (s51_output == stdout && s51_input == stdin && s51_prompt) { char *r; @@ -221,7 +228,9 @@ s51_read_line(char *line, int len) line[len-1] = '\0'; add_history(r); return 1; - } else { + } else +#endif + { if (s51_prompt) s51_printf("%s", s51_prompt); else -- cgit v1.2.3