summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--unix/Makefile2
-rw-r--r--unix/main.c4
-rw-r--r--unix/mpconfigport.h5
3 files changed, 8 insertions, 3 deletions
diff --git a/unix/Makefile b/unix/Makefile
index a5c6ddcc04..c7be62e999 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -2,7 +2,7 @@ PYSRC=../py
BUILD=build
CC = gcc
-CFLAGS = -I. -I$(PYSRC) -Wall -Werror -ansi -std=gnu99 -Os -DUSE_READLINE #-DNDEBUG
+CFLAGS = -I. -I$(PYSRC) -Wall -Werror -ansi -std=gnu99 -Os #-DNDEBUG
LDFLAGS = -lm
SRC_C = \
diff --git a/unix/main.c b/unix/main.c
index e73f69ee24..ecb2fa338e 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -15,7 +15,7 @@
#include "runtime.h"
#include "repl.h"
-#ifdef USE_READLINE
+#if MICROPY_USE_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
@@ -35,7 +35,7 @@ static char *str_join(const char *s1, int sep_char, const char *s2) {
}
static char *prompt(char *p) {
-#ifdef USE_READLINE
+#if MICROPY_USE_READLINE
char *line = readline(p);
if (line) {
add_history(line);
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index 36cf138c17..7a4622b8b6 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -1,5 +1,10 @@
// options to control how Micro Python is built
+// Linking with GNU readline causes binary to be licensed under GPL
+#ifndef MICROPY_USE_READLINE
+#define MICROPY_USE_READLINE (1)
+#endif
+
#define MICROPY_ENABLE_FLOAT (1)
#define MICROPY_EMIT_CPYTHON (0)
#define MICROPY_EMIT_X64 (1)