--- rxvt-unicode/configure 2006/01/11 00:59:58 1.65 +++ rxvt-unicode/configure 2006/01/11 19:55:33 1.66 @@ -10185,7 +10185,6 @@ - for ac_func in \ atexit \ revoke \ @@ -10196,7 +10195,6 @@ setsid \ setpgrp \ setpgid \ - openpty \ _getpty \ grantpt \ unlockpt \ @@ -12044,11 +12042,167 @@ fi echo "$as_me:$LINENO: result: $rxvt_cv_func_getpt" >&5 echo "${ECHO_T}$rxvt_cv_func_getpt" >&6 -if test x$rxvt_cv_func_getpt = xyes; then +if test x$rxvt_cv_func_getpt = xno; then + echo "$as_me:$LINENO: checking for openpty" >&5 +echo $ECHO_N "checking for openpty... $ECHO_C" >&6 +if test "${ac_cv_func_openpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define openpty to an innocuous variant, in case declares openpty. + For example, HP-UX 11i declares gettimeofday. */ +#define openpty innocuous_openpty -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPT 1 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char openpty (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef openpty + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char openpty (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_openpty) || defined (__stub___openpty) +choke me +#else +char (*f) () = openpty; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != openpty; + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_openpty=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_openpty=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_openpty" >&5 +echo "${ECHO_T}$ac_cv_func_openpty" >&6 +if test $ac_cv_func_openpty = yes; then + : +else + echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 +if test "${ac_cv_lib_util_openpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* 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; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_openpty=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_util_openpty=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 +if test $ac_cv_lib_util_openpty = yes; then + LIBS="$LIBS -lutil" +fi + +fi fi @@ -12057,7 +12211,7 @@ if test "${rxvt_cv_ptys+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test x$ac_cv_func_openpty = xyes; then + if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then rxvt_cv_ptys=OPENPTY else if test x$ac_cv_func__getpty = xyes; then rxvt_cv_ptys=SGI4 @@ -12821,7 +12975,7 @@ -if text x$support_perl = xyes; then +if test x$support_perl = xyes; then support_frills=yes fi