2 dnl Our readline heuristic. If we haven't been asked about readline, then
3 dnl try to compile with it. If we've been asked for it, then we fail
4 dnl if we cannot use it. If we were explicitly NOT asked for it, then
5 dnl don't even try to use it.
8 AC_DEFUN([NMH_READLINE],
9 [AC_ARG_WITH([readline],
10 AS_HELP_STRING([--with-readline],
11 [enable readline editing for whatnow (default=maybe)]),
12 [], [with_readline=maybe])
13 AS_IF([test x"$with_readline" = xyes -o x"$with_readline" = xmaybe],
16 AC_SEARCH_LIBS([readline], [readline editline],
18 AC_DEFINE([READLINE_SUPPORT], [1],
19 [Support for using readline() in whatnow])],
20 [AS_IF([test x"$with_readline" = xyes],
21 [AC_MSG_ERROR([Unable to find a readline library])])])
25 AC_SUBST([READLINELIB])