summaryrefslogtreecommitdiff
path: root/passes/cmds/show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'passes/cmds/show.cc')
-rw-r--r--passes/cmds/show.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc
index 4f6b811b..fc6e972e 100644
--- a/passes/cmds/show.cc
+++ b/passes/cmds/show.cc
@@ -22,7 +22,10 @@
#include "kernel/log.h"
#include <string.h>
#include <dirent.h>
-#include <readline/readline.h>
+
+#ifdef YOSYS_ENABLE_READLINE
+# include <readline/readline.h>
+#endif
using RTLIL::id2cstr;
@@ -770,6 +773,7 @@ struct ShowPass : public Pass {
}
if (flag_pause) {
+ #ifdef YOSYS_ENABLE_READLINE
char *input = NULL;
while ((input = readline("Press ENTER to continue (or type 'shell' to open a shell)> ")) != NULL) {
if (input[strspn(input, " \t\r\n")] == 0)
@@ -780,6 +784,9 @@ struct ShowPass : public Pass {
break;
}
}
+ #else
+ log_cmd_error("This version of yosys is built without readline support => 'show -pause' is not available.\n");
+ #endif
}
log_pop();