--- rxvt-unicode/configure 2006/01/10 18:09:22 1.64 +++ rxvt-unicode/configure 2006/01/16 14:35:23 1.70 @@ -891,10 +891,8 @@ --disable-backspace-key disable handling of the backspace key --disable-delete-key disable handling of the delete key --disable-resources disable all resource checking - --enable-xgetdefault enable resources via X instead of our small version --enable-8bitctrls enable 8 bit control sequences (not recommended) --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt) - --enable-strings enable some replacement system functions --disable-swapscreen disable swap screen support --enable-iso14755 enable support for extended ISO 14755 modes --enable-frills enable support for rarely used features @@ -4320,7 +4318,6 @@ MALLOC_TYPE=S -support_addstrings=no support_frills=yes support_inheritpixmap=yes support_tinting=yes @@ -4641,18 +4638,6 @@ fi fi; -# Check whether --enable-xgetdefault or --disable-xgetdefault was given. -if test "${enable_xgetdefault+set}" = set; then - enableval="$enable_xgetdefault" - if test x$enableval = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define USE_XGETDEFAULT 1 -_ACEOF - - fi -fi; - # Check whether --enable-8bitctrls or --disable-8bitctrls was given. if test "${enable_8bitctrls+set}" = set; then enableval="$enable_8bitctrls" @@ -4722,14 +4707,6 @@ RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"` -# Check whether --enable-strings or --disable-strings was given. -if test "${enable_strings+set}" = set; then - enableval="$enable_strings" - if test x$enableval = xyes -o x$enableval = xno; then - support_addstrings=$enableval - fi -fi; - # Check whether --enable-swapscreen or --disable-swapscreen was given. if test "${enable_swapscreen+set}" = set; then enableval="$enable_swapscreen" @@ -10209,8 +10186,8 @@ setsid \ setpgrp \ setpgid \ - openpty \ _getpty \ + posix_openpt \ grantpt \ unlockpt \ isastream \ @@ -12001,9 +11978,10 @@ fi -echo "$as_me:$LINENO: checking for getpt" >&5 -echo $ECHO_N "checking for getpt... $ECHO_C" >&6 -if test "${rxvt_cv_func_getpt+set}" = set; then +if test x$ac_cv_func_posix_openpt = 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 @@ -12012,14 +11990,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _GNU_SOURCE -#ifdef HAVE_STDLIB_H -# include +/* Define openpty to an innocuous variant, in case declares openpty. + For example, HP-UX 11i declares gettimeofday. */ +#define openpty innocuous_openpty + +/* 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 () { -(void)getpt(); +return f != openpty; ; return 0; } @@ -12045,23 +12056,89 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rxvt_cv_func_getpt=yes + ac_cv_func_openpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -rxvt_cv_func_getpt=no +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: $rxvt_cv_func_getpt" >&5 -echo "${ECHO_T}$rxvt_cv_func_getpt" >&6 -if test x$rxvt_cv_func_getpt = xyes; then +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. */ -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPT 1 +/* 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 @@ -12070,16 +12147,16 @@ 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_posix_openpt = xyes; then + rxvt_cv_ptys=POSIX else if test x$ac_cv_func__getpty = xyes; then rxvt_cv_ptys=SGI4 else if test -c /dev/ttyp20; then rxvt_cv_ptys=SCO else if test -c /dev/ptym/clone; then rxvt_cv_ptys=HPUX - else if test x$rxvt_cv_func_getpt = xyes; then - rxvt_cv_ptys=GLIBC else if test -c /dev/ptc -a -c /dev/pts; then rxvt_cv_ptys=PTC else if test -c /dev/ptc -a -d /dev/pts; then @@ -12104,6 +12181,13 @@ echo "$as_me:$LINENO: result: $rxvt_cv_ptys" >&5 echo "${ECHO_T}$rxvt_cv_ptys" >&6 +if test x$rxvt_cv_ptys = xPOSIX; then + +cat >>confdefs.h <<\_ACEOF +#define PTYS_ARE_POSIX 1 +_ACEOF + +fi if test x$rxvt_cv_ptys = xOPENPTY; then cat >>confdefs.h <<\_ACEOF @@ -12139,20 +12223,6 @@ _ACEOF fi -if test x$rxvt_cv_ptys = xCONVEX; then - -cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_GETPTY 1 -_ACEOF - -fi -if test x$rxvt_cv_ptys = xGLIBC; then - -cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_GETPT 1 -_ACEOF - -fi if test x$rxvt_cv_ptys = xHPUX; then cat >>confdefs.h <<\_ACEOF @@ -12160,7 +12230,7 @@ _ACEOF fi -if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then +if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xPOSIX; then cat >>confdefs.h <<\_ACEOF #define PTYS_ARE_SEARCHED 1 @@ -12834,7 +12904,7 @@ -if text x$support_perl = xyes; then +if test x$support_perl = xyes; then support_frills=yes fi @@ -12862,14 +12932,6 @@ -if test x$support_addstrings = xno; then - -cat >>confdefs.h <<\_ACEOF -#define NO_STRINGS 1 -_ACEOF - -fi - MCOMMON=./autoconf/Make.common