Interactive support depends on curses lib.
authorAndre Noll <maan@systemlinux.org>
Mon, 19 Nov 2012 21:31:27 +0000 (22:31 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 19 Nov 2012 21:31:27 +0000 (22:31 +0100)
If libreadline was detected, but no curses lib was found, we currently
try to activate interactive support, and compilation fails.

This patch deactivates interactive support in this case.

configure.ac

index 661081c..444f9ed 100644 (file)
@@ -480,7 +480,7 @@ if test "$have_curses" = "yes"; then
        extras="$extras gui"
        executables="$executables gui"
 else
-       AC_MSG_WARN([cannot build para_gui])
+       AC_MSG_WARN([no curses lib, cannot build para_gui])
 fi
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
@@ -1061,6 +1061,13 @@ AC_CHECK_HEADERS([readline/readline.h], [
        have_readline="no"
        AC_MSG_WARN([readline/readline.h not found, $msg])
 ])
+
+if test "$have_curses" != "yes"; then
+       have_readline="no"
+       AC_MSG_WARN([interactive cli support depends on curses,])
+       AC_MSG_WARN([but no curses lib was detected, $msg])
+fi
+
 if test "$have_readline" = "yes"; then
        readline_libs="$readline_libs -lreadline"
        AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])