1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl This macro will check for the presence of the readline library.
14 dnl To get it into the aclocal.m4 dnl file, do this:
15 dnl aclocal -I . --verbose
17 dnl The --verbose will show all of the files that are searched
20 AC_DEFUN([wi_LIB_READLINE], [
21 dnl check for the readline.h header file
22 AC_CHECK_HEADER(readline/readline.h)
24 if test "$ac_cv_header_readline_readline_h" = yes; then
25 dnl check for the readline library
28 # Note: $LIBCURSES is permitted to be empty.
30 for LIBREADLINE in "-lreadline.dll" "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses"
32 AC_MSG_CHECKING([for GNU Readline library])
34 LIBS="$ac_save_LIBS $LIBREADLINE"
39 #include <readline/readline.h>
43 rl_function_of_keyseq(NULL, NULL, NULL);
45 wi_cv_lib_readline=yes
46 wi_cv_lib_readline_result="$LIBREADLINE"
49 wi_cv_lib_readline_result=no
52 if test "$wi_cv_lib_readline" = yes; then
53 AC_MSG_RESULT($wi_cv_lib_readline_result)
55 AC_DEFINE_UNQUOTED(HAVE_LIBREADLINE, 1, [Readline])