1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
$NetBSD: patch-ad,v 1.3 2003/07/29 13:21:57 jmmv Exp $
--- configure.in.orig 2000-01-02 05:05:50.000000000 +0100
+++ configure.in
@@ -47,22 +47,26 @@ AC_CHECK_LIB(gmp, mpf_get_str,
AC_SUBST(GMP_SUBDIRS)
AC_SUBST(GMP_LIBS)
-AC_CHECK_LIB(ncurses, tgetent, LIBS="-lncurses $LIBS" termcap=yes,
- AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes,
- termcap=no))
+AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes,
+ termcap=no)
if test "$termcap" = yes; then
AC_CHECK_HEADERS(termcap.h)
AC_DEFINE(HAVE_LIBTERMCAP)
fi
-AC_CHECK_LIB(readline, readline)
-if test "$ac_cv_lib_readline_readline" = yes; then
- AC_CHECK_HEADERS(readline/readline.h)
- AC_CHECK_LIB(readline, add_history, history=yes,
+AC_CHECK_LIB(edit, readline, readlinelib=edit have_readline=yes,
+ AC_CHECK_LIB(readline, readline, readlinelib=readline have_readline=yes,
+ readline=no))
+if test "$have_readline" = yes; then
+ LIBS="-l$readlinelib $LIBS"
+ AC_CHECK_HEADERS(readline.h readline/readline.h)
+ AC_DEFINE(HAVE_LIBREADLINE)
+ AC_CHECK_LIB($readlinelib, tilde_expand, AC_DEFINE(HAVE_TILDE_EXPAND))
+ AC_CHECK_LIB($readlinelib, add_history, history=yes,
AC_CHECK_LIB(history, add_history, LIBS="-lhistory" history=yes,
history=no))
if test "$history" = yes; then
- AC_CHECK_HEADERS(readline/history.h)
+ AC_CHECK_HEADERS(history.h readline/history.h)
AC_DEFINE(HAVE_LIBHISTORY)
fi
fi
@@ -201,7 +205,7 @@ AC_PROG_LN_S
dnl This must be after other tests so warnings don't provoke errors above.
if test "$ac_cv_prog_gcc" = yes; then
- CFLAGS="-g -Wall -W -Wno-uninitialized -Wwrite-strings \
+ CFLAGS="$CFLAGS -g -Wall -W -Wno-uninitialized -Wwrite-strings \
-Wstrict-prototypes -Wpointer-arith"
if test "$CC_OPTIONS" != ""; then
CFLAGS="$CFLAGS $CC_OPTIONS"
|