blob: 07be0d61f83b5430b7160c5f07f1a8652b666ad1 (
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
|
$NetBSD: patch-canuum_configure,v 1.1 2015/10/18 03:58:31 tsutsui Exp $
Check openpty(3), posix_openpt(3), and ptsname(3).
--- canuum/configure.orig 2004-05-19 15:48:55.000000000 +0000
+++ canuum/configure
@@ -1001,6 +1001,46 @@ fi
+echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
+echo "configure:1006: checking for openpty in -lutil" >&5
+ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lutil $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1014 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char openpty();
+
+int main() {
+openpty()
+; return 0; }
+EOF
+if { (eval echo configure:1025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ HAVE_LIBUTIL='have_libutil'
+else
+ echo "$ac_t""no" 1>&6
+fi
+
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
@@ -1421,7 +1461,7 @@ for ac_hdr in fcntl.h sgtty.h syslog.h u
sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h \
malloc.h strings.h memory.h \
curses.h ncurses.h term.h termio.h \
- termcap.h sgtty.h sys/termio.h termios.h
+ termcap.h sgtty.h sys/termio.h termios.h libutil.h util.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
@@ -2079,10 +2119,11 @@ fi
for ac_func in random drand48 fchmod getopt \
gethostname select socket closesocket setsockopt send recv \
FD_SET \
- getdtablesize getrlimit syslog vsyslog setenv snprintf
+ getdtablesize getrlimit syslog vsyslog setenv snprintf \
+ ptsname posix_openpt openpty
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2086: checking for $ac_func" >&5
+echo "configure:2127: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
|