Sync usage with man page.
[netbsd-mini2440.git] / crypto / dist / heimdal / cf / krb-readline.m4
blob6509461b278472b78143ad77e5e013165c796514
1 dnl $Heimdal: krb-readline.m4 14166 2004-08-26 12:35:42Z joda $
2 dnl $NetBSD$
3 dnl
4 dnl Tests for readline functions
5 dnl
7 dnl el_init
9 AC_DEFUN([KRB_READLINE],[
10 AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
11 if test "$ac_cv_func_el_init" = yes ; then
12         AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[
13                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
14                         #include <histedit.h>]],
15                         [[el_init("", NULL, NULL, NULL);]])],
16                         [ac_cv_func_el_init_four=yes],
17                         [ac_cv_func_el_init_four=no])])
18         if test "$ac_cv_func_el_init_four" = yes; then
19                 AC_DEFINE(HAVE_FOUR_VALUED_EL_INIT, 1, [Define if el_init takes four arguments.])
20         fi
23 dnl readline
25 ac_foo=no
26 if test "$with_readline" = yes; then
27         :
28 elif test "$ac_cv_func_readline" = yes; then
29         :
30 elif test "$ac_cv_func_el_init" = yes; then
31         ac_foo=yes
32         LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)"
33 else
34         LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)"
36 AM_CONDITIONAL(el_compat, test "$ac_foo" = yes)
37 AC_DEFINE(HAVE_READLINE, 1, 
38         [Define if you have a readline compatible library.])dnl