77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
$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
|