Now pac from christian passes since we make hmac checksums always use the raw key
[heimdal.git] / cf / krb-readline.m4
blobb5b32feebd1072ec4b51dca4ed835554903bc2f0
1 dnl $Id$
2 dnl
3 dnl Tests for readline functions
4 dnl
6 dnl el_init
8 AC_DEFUN([KRB_READLINE],[
9 AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
10 if test "$ac_cv_func_el_init" = yes ; then
11         AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[
12                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
13                         #include <histedit.h>]],
14                         [[el_init("", NULL, NULL, NULL);]])],
15                         [ac_cv_func_el_init_four=yes],
16                         [ac_cv_func_el_init_four=no])])
17         if test "$ac_cv_func_el_init_four" = yes; then
18                 AC_DEFINE(HAVE_FOUR_VALUED_EL_INIT, 1, [Define if el_init takes four arguments.])
19         fi
22 dnl readline
24 ac_foo=no
25 build_editline=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         build_editline=yes
33         LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)"
34 else
35         build_editline=yes
36         LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)"
38 AM_CONDITIONAL(EDITLINE, test "$build_editline" = yes)
39 AM_CONDITIONAL(el_compat, test "$ac_foo" = yes)
40 AC_DEFINE(HAVE_READLINE, 1, 
41         [Define if you have a readline compatible library.])dnl