summaryrefslogtreecommitdiff
path: root/net/gnut/patches/patch-ad
blob: 4d226d702d1cf64d76638cbe7363a1752ec19f42 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
$NetBSD: patch-ad,v 1.2 2001/02/24 23:48:58 christos Exp $

--- configure.orig	Wed Feb  7 14:33:52 2001
+++ configure	Sat Feb 24 18:36:14 2001
@@ -1282,14 +1282,14 @@
 fi
 
 
-echo $ac_n "checking for readline in readline.h""... $ac_c" 1>&6
-echo "configure:1287: checking for readline in readline.h" >&5
+echo $ac_n "checking for readline in readline.h with libedit""... $ac_c" 1>&6
+echo "configure:1287: checking for readline in readline.h with libedit" >&5
 if eval "test \"\${g_cv_readline+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	save_LIBS="$LIBS"
-	LIBS="-lreadline $LIBS"
+	LIBS="-ledit $LIBS"
 	cat > conftest.$ac_ext <<EOF
 #line 1295 "configure"
 #include "confdefs.h"
@@ -1318,10 +1318,60 @@
 echo "$ac_t""$g_cv_readline" 1>&6
 	
 if test $g_cv_readline = yes ; then
-	LIBS="$LIBS -lreadline"
+	LIBS="$LIBS -ledit -ltermcap"
 	cat >> confdefs.h <<\EOF
 #define HAVE_READLINE 1
 EOF
+
+	cat >> confdefs.h <<\EOF
+#define HAVE_LIBEDIT 1
+EOF
+
+fi
+
+if test $g_cv_readline = no ; then
+	echo $ac_n "checking for readline in readline.h""... $ac_c" 1>&6
+echo "configure:1261: checking for readline in readline.h" >&5
+if eval "test \"`echo '$''{'g_cv_readline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+		save_LIBS="$LIBS"
+		LIBS="-lreadline $LIBS"
+		cat > conftest.$ac_ext <<EOF
+#line 1269 "configure"
+#include "confdefs.h"
+
+			#include <stdio.h>
+			#include <readline/readline.h>
+			
+int main() {
+readline(NULL);
+; return 0; }
+EOF
+if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  g_cv_readline=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  g_cv_readline=no
+fi
+rm -f conftest*
+		LIBS="$save_LIBS"
+	
+fi
+
+echo "$ac_t""$g_cv_readline" 1>&6
+		
+	if test $g_cv_readline = yes ; then
+		LIBS="$LIBS -lreadline"
+		cat >> confdefs.h <<\EOF
+#define HAVE_READLINE 1
+EOF
+
+	fi
 
 fi