Factor and simplify Makefile's and mpconfig.
diff --git a/py/repl.c b/py/repl.c
index 4241ef0..473313c 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -1,6 +1,9 @@
 #include "misc.h"
+#include "mpconfig.h"
 #include "repl.h"
 
+#if MICROPY_ENABLE_REPL_HELPERS
+
 bool str_startswith_word(const char *str, const char *head) {
     int i;
     for (i = 0; str[i] && head[i]; i++) {
@@ -42,3 +45,5 @@
     }
     return n_paren > 0 || n_brack > 0 || n_brace > 0;
 }
+
+#endif // MICROPY_ENABLE_REPL_HELPERS