12008
12000
cat confdefs.h >>conftest.$ac_ext
12009
12001
cat >>conftest.$ac_ext <<_ACEOF
12010
12002
/* end confdefs.h. */
12011
#define _GNU_SOURCE
12012
#ifdef HAVE_STDLIB_H
12013
# include <cstdlib>
12023
rm -f conftest.$ac_objext conftest$ac_exeext
12024
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12025
(eval $ac_link) 2>conftest.er1
12027
grep -v '^ *+' conftest.er1 >conftest.err
12029
cat conftest.err >&5
12030
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031
(exit $ac_status); } &&
12032
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12033
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12034
(eval $ac_try) 2>&5
12036
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037
(exit $ac_status); }; } &&
12038
{ ac_try='test -s conftest$ac_exeext'
12039
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12040
(eval $ac_try) 2>&5
12042
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043
(exit $ac_status); }; }; then
12044
rxvt_cv_func_getpt=yes
12046
echo "$as_me: failed program was:" >&5
12047
sed 's/^/| /' conftest.$ac_ext >&5
12049
rxvt_cv_func_getpt=no
12051
rm -f conftest.err conftest.$ac_objext \
12052
conftest$ac_exeext conftest.$ac_ext
12054
echo "$as_me:$LINENO: result: $rxvt_cv_func_getpt" >&5
12055
echo "${ECHO_T}$rxvt_cv_func_getpt" >&6
12056
if test x$rxvt_cv_func_getpt = xyes; then
12058
cat >>confdefs.h <<\_ACEOF
12059
#define HAVE_GETPT 1
12003
/* Define openpty to an innocuous variant, in case <limits.h> declares openpty.
12004
For example, HP-UX 11i <limits.h> declares gettimeofday. */
12005
#define openpty innocuous_openpty
12007
/* System header to define __stub macros and hopefully few prototypes,
12008
which can conflict with char openpty (); below.
12009
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12010
<limits.h> exists even on freestanding compilers. */
12013
# include <limits.h>
12015
# include <assert.h>
12020
/* Override any gcc2 internal prototype to avoid an error. */
12025
/* We use char because int might match the return type of a gcc2
12026
builtin and then its argument prototype would still apply. */
12028
/* The GNU C library defines this for functions which it implements
12029
to always fail with ENOSYS. Some functions are actually named
12030
something starting with __ and the normal name is an alias. */
12031
#if defined (__stub_openpty) || defined (__stub___openpty)
12034
char (*f) () = openpty;
12043
return f != openpty;
12048
rm -f conftest.$ac_objext conftest$ac_exeext
12049
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12050
(eval $ac_link) 2>conftest.er1
12052
grep -v '^ *+' conftest.er1 >conftest.err
12054
cat conftest.err >&5
12055
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12056
(exit $ac_status); } &&
12057
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12058
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12059
(eval $ac_try) 2>&5
12061
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062
(exit $ac_status); }; } &&
12063
{ ac_try='test -s conftest$ac_exeext'
12064
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12065
(eval $ac_try) 2>&5
12067
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12068
(exit $ac_status); }; }; then
12069
ac_cv_func_openpty=yes
12071
echo "$as_me: failed program was:" >&5
12072
sed 's/^/| /' conftest.$ac_ext >&5
12074
ac_cv_func_openpty=no
12076
rm -f conftest.err conftest.$ac_objext \
12077
conftest$ac_exeext conftest.$ac_ext
12079
echo "$as_me:$LINENO: result: $ac_cv_func_openpty" >&5
12080
echo "${ECHO_T}$ac_cv_func_openpty" >&6
12081
if test $ac_cv_func_openpty = yes; then
12084
echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12085
echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12086
if test "${ac_cv_lib_util_openpty+set}" = set; then
12087
echo $ECHO_N "(cached) $ECHO_C" >&6
12089
ac_check_lib_save_LIBS=$LIBS
12090
LIBS="-lutil $LIBS"
12091
cat >conftest.$ac_ext <<_ACEOF
12094
cat confdefs.h >>conftest.$ac_ext
12095
cat >>conftest.$ac_ext <<_ACEOF
12096
/* end confdefs.h. */
12098
/* Override any gcc2 internal prototype to avoid an error. */
12102
/* We use char because int might match the return type of a gcc2
12103
builtin and then its argument prototype would still apply. */
12113
rm -f conftest.$ac_objext conftest$ac_exeext
12114
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12115
(eval $ac_link) 2>conftest.er1
12117
grep -v '^ *+' conftest.er1 >conftest.err
12119
cat conftest.err >&5
12120
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12121
(exit $ac_status); } &&
12122
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12123
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12124
(eval $ac_try) 2>&5
12126
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12127
(exit $ac_status); }; } &&
12128
{ ac_try='test -s conftest$ac_exeext'
12129
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12130
(eval $ac_try) 2>&5
12132
echo "$as_me:$LINENO: \$? = $ac_status" >&5
12133
(exit $ac_status); }; }; then
12134
ac_cv_lib_util_openpty=yes
12136
echo "$as_me: failed program was:" >&5
12137
sed 's/^/| /' conftest.$ac_ext >&5
12139
ac_cv_lib_util_openpty=no
12141
rm -f conftest.err conftest.$ac_objext \
12142
conftest$ac_exeext conftest.$ac_ext
12143
LIBS=$ac_check_lib_save_LIBS
12145
echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12146
echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12147
if test $ac_cv_lib_util_openpty = yes; then
12148
LIBS="$LIBS -lutil"