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
49
50
51
52
53
54
55
56
57
58
|
$NetBSD: patch-ab,v 1.5 2005/05/23 08:44:37 rillig Exp $
--- configure.in.orig Wed Jun 9 02:26:28 1999
+++ configure.in Tue Jan 18 16:20:01 2000
@@ -59,6 +59,7 @@
AC_HEADER_TIME
dnl AC_PATH_XTRA
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h)
+AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
AC_HEADER_SYS_WAIT
dnl Check for typedefs, structures, and compiler characteristics.
@@ -74,7 +75,20 @@
AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])
AC_CHECK_LIB(nsl, t_accept, [LIBS="$LIBS -lnsl"])
-AC_CHECK_LIB(readline, readline, [RL_LIBS="-lreadline"])
+if test "$ac_cv_header_readline_h" = "yes" ||
+ test "$ac_cv_header_readline_readline_h" = "yes"; then
+ AC_CHECK_LIB(termcap, tputs,
+ [AC_CHECK_LIB(edit, readline,
+ [AC_DEFINE(HAVE_LIBEDIT)
+ AC_DEFINE(HAVE_READLINE)
+ RL_LIBS="-ledit -ltermcap"],
+ [AC_CHECK_LIB(readline, readline,
+ [AC_DEFINE(HAVE_LIBREADLINE)
+ AC_DEFINE(HAVE_READLINE)
+ RL_LIBS="-ledit -ltermcap"], -ltermcap)
+ ], -ltermcap)
+ ])
+fi
AC_SUBST(RL_LIBS)
AC_CHECK_LIB(gsm, gsm_decode, [HAVE_GSM="yes"])
@@ -209,6 +223,24 @@
AC_MSG_RESULT($is_freebsd)
if test $is_freebsd = "yes"; then
RPLAY_TARGET="FreeBSD"
+fi
+fi
+
+
+dnl
+dnl Check for NetBSD
+dnl
+if test -z "$RPLAY_TARGET"; then
+AC_MSG_CHECKING(for NetBSD)
+AC_EGREP_CPP(yes,
+[
+#ifdef __NetBSD__
+ yes
+#endif
+], is_netbsd=yes, is_netbsd=no)
+AC_MSG_RESULT($is_netbsd)
+if test $is_netbsd = "yes"; then
+ RPLAY_TARGET="NetBSD"
fi
fi
|