aboutsummaryrefslogtreecommitdiffstats
path: root/m4/readline.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/readline.m4')
-rw-r--r--m4/readline.m49
1 files changed, 8 insertions, 1 deletions
diff --git a/m4/readline.m4 b/m4/readline.m4
index 76605af8..af2745db 100644
--- a/m4/readline.m4
+++ b/m4/readline.m4
@@ -53,7 +53,8 @@ int main(int argc, char **argv)
dup(fd);
line = readline("giveittome> ");
- printf("got <%s>\n", line);
+ /* some printfs don't handle NULL for %s */
+ printf("got <%s>\n", line ? line : "(NULL)");
return 0;
}]]),
dnl action if true:
@@ -72,6 +73,12 @@ dnl action if cross compiling:
AC_DEFINE(HAVE_LIBREADLINE,1,
[Define to 1 if you have a fully functional readline library.])
AC_SUBST(LIBREADLINE,$_combo)
+
+ AC_CHECK_LIB(readline, history_list,
+ [AC_DEFINE(HAVE_HISTORY_LIST, 1, [Do we have history_list?])],
+ [],
+ [$_combo])
+
break
fi
done