summaryrefslogtreecommitdiff
path: root/audio/rplay/patches/patch-ab
blob: 51222897b7c41dfb5f8da79111fb7ef6b899c372 (plain)
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
$NetBSD: patch-ab,v 1.3 2000/01/26 22:11:36 jlam 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"])