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