Changed msg_style and msg_delim to be file static to m_getfld.c
[mmh] / m4 / readline.m4
1 dnl
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.
6 dnl
7
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],
14     [save_LIBS="$LIBS"
15     LIBS=
16     AC_SEARCH_LIBS([readline], [readline editline],
17                    [READLINELIB="$LIBS"
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])])])
22     LIBS="$save_LIBS"])
23 ])
24
25 AC_SUBST([READLINELIB])