[],
[$TERMLIBS])
+AC_CHECK_LIB(readline, add_history,
+ [AC_DEFINE(HAVE_ADD_HISTORY, 1, [Do we have add_history?])],
+ [],
+ [$TERMLIBS])
+
AC_MSG_CHECKING(whether to use extern readline)
if test x"$EXTERNAL_READLINE" = x"yes"; then
AC_MSG_RESULT(yes)
#include "auth/gensec/gensec.h"
#include "param/param.h"
+#if HAVE_READLINE_HISTORY_H
+#include <readline/history.h>
+#endif
static bool run_matching(struct torture_context *torture,
const char *prefix,
if (cline == NULL)
return;
-
+
+#if HAVE_ADD_HISTORY
+ add_history(cline);
+#endif
+
ret = poptParseArgvString(cline, &argc, &argv);
if (ret != 0) {
fprintf(stderr, "Error parsing line\n");