--- rxvt-unicode/configure 2021/05/14 13:50:22 1.167 +++ rxvt-unicode/configure 2021/07/23 19:19:18 1.168 @@ -661,6 +661,8 @@ STARTUP_NOTIFICATION_CFLAGS PIXBUF_LIBS PIXBUF_CFLAGS +PTYTTY_LIBS +PTYTTY_CFLAGS PKG_CONFIG X_EXTRA_LIBS X_LIBS @@ -775,9 +777,6 @@ with_term with_terminfo with_x -enable_utmp -enable_wtmp -enable_lastlog ' ac_precious_vars='build_alias host_alias @@ -1449,9 +1448,6 @@ --enable-smart-resize enable smart growth/shrink behaviour --enable-text-blink enable blinking text --enable-pointer-blank enable pointer blanking when typing or inactive - --enable-utmp enable utmp (utmpx) support - --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp) - --enable-lastlog enable lastlog support (requires --enable-utmp) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -2043,66 +2039,6 @@ } # ac_fn_c_find_uintX_t -# ac_fn_cxx_check_member LINENO AGGR MEMBER VAR INCLUDES -# ------------------------------------------------------ -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_cxx_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main (void) -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main (void) -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$4=yes" -else $as_nop - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_cxx_check_member - # ac_fn_cxx_try_run LINENO # ------------------------ # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -6999,6 +6935,28 @@ fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libptytty" >&5 +printf %s "checking for libptytty... " >&6; } + if test $PKG_CONFIG != no && $PKG_CONFIG --exists libptytty; then + PTYTTY_CFLAGS="`$PKG_CONFIG --cflags libptytty`" + PTYTTY_LIBS="`$PKG_CONFIG --libs libptytty`" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } + : + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + + as_fn_error $? "unable to find libptytty" "$LINENO" 5 + + fi + + + + + image_lib=none PIXBUF_CFLAGS= @@ -7434,351 +7392,6 @@ -support_utmp=yes -support_wtmp=yes -support_lastlog=yes - -# Check whether --enable-utmp was given. -if test ${enable_utmp+y} -then : - enableval=$enable_utmp; if test x$enableval = xyes -o x$enableval = xno; then - support_utmp=$enableval - fi -fi - - -# Check whether --enable-wtmp was given. -if test ${enable_wtmp+y} -then : - enableval=$enable_wtmp; if test x$enableval = xyes -o x$enableval = xno; then - support_wtmp=$enableval - fi -fi - - -# Check whether --enable-lastlog was given. -if test ${enable_lastlog+y} -then : - enableval=$enable_lastlog; if test x$enableval = xyes -o x$enableval = xno; then - support_lastlog=$enableval - fi -fi - - -if test x$support_utmp = xyes; then - -printf "%s\n" "#define UTMP_SUPPORT 1" >>confdefs.h - -fi -if test x$support_wtmp = xyes; then - -printf "%s\n" "#define WTMP_SUPPORT 1" >>confdefs.h - -fi -if test x$support_lastlog = xyes; then - -printf "%s\n" "#define LASTLOG_SUPPORT 1" >>confdefs.h - -fi - -ac_fn_cxx_check_func "$LINENO" "updwtmp" "ac_cv_func_updwtmp" -if test "x$ac_cv_func_updwtmp" = xyes -then : - printf "%s\n" "#define HAVE_UPDWTMP 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "updwtmpx" "ac_cv_func_updwtmpx" -if test "x$ac_cv_func_updwtmpx" = xyes -then : - printf "%s\n" "#define HAVE_UPDWTMPX 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "updlastlogx" "ac_cv_func_updlastlogx" -if test "x$ac_cv_func_updlastlogx" = xyes -then : - printf "%s\n" "#define HAVE_UPDLASTLOGX 1" >>confdefs.h - -fi - - -ac_fn_cxx_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "$ac_includes_default" -if test "x$ac_cv_header_lastlog_h" = xyes -then : - printf "%s\n" "#define HAVE_LASTLOG_H 1" >>confdefs.h - -fi - - -case $host in - *-*-solaris*) - -printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - - ;; -esac - - - for ac_header in utmp.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default" -if test "x$ac_cv_header_utmp_h" = xyes -then : - printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h - -ac_fn_cxx_check_type "$LINENO" "struct utmp" "ac_cv_type_struct_utmp" " -#include -#include - -" -if test "x$ac_cv_type_struct_utmp" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_UTMP 1" >>confdefs.h - - -fi - - -ac_fn_cxx_check_member "$LINENO" "struct utmp" "ut_host" "ac_cv_member_struct_utmp_ut_host" " -#include -#include - -" -if test "x$ac_cv_member_struct_utmp_ut_host" = xyes -then : - -printf "%s\n" "#define HAVE_UTMP_HOST 1" >>confdefs.h - -fi - - -ac_fn_cxx_check_member "$LINENO" "struct utmp" "ut_pid" "ac_cv_member_struct_utmp_ut_pid" " -#include -#include - -" -if test "x$ac_cv_member_struct_utmp_ut_pid" = xyes -then : - -printf "%s\n" "#define HAVE_UTMP_PID 1" >>confdefs.h - -fi - - -fi - -done - - for ac_header in utmpx.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default" -if test "x$ac_cv_header_utmpx_h" = xyes -then : - printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h - -ac_fn_cxx_check_type "$LINENO" "struct utmpx" "ac_cv_type_struct_utmpx" " -#include -#include - -" -if test "x$ac_cv_type_struct_utmpx" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_UTMPX 1" >>confdefs.h - - -fi - - -ac_fn_cxx_check_member "$LINENO" "struct utmpx" "ut_host" "ac_cv_member_struct_utmpx_ut_host" " -#include -#include - -" -if test "x$ac_cv_member_struct_utmpx_ut_host" = xyes -then : - -printf "%s\n" "#define HAVE_UTMPX_HOST 1" >>confdefs.h - -fi - - -fi - -done -ac_fn_cxx_check_type "$LINENO" "struct lastlog" "ac_cv_type_struct_lastlog" " -#include -#include -#ifdef HAVE_LASTLOG_H -#include -#endif - -" -if test "x$ac_cv_type_struct_lastlog" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_LASTLOG 1" >>confdefs.h - - -fi - - -ac_fn_cxx_check_type "$LINENO" "struct lastlogx" "ac_cv_type_struct_lastlogx" " -#include -#include -#ifdef HAVE_LASTLOG_H -#include -#endif - -" -if test "x$ac_cv_type_struct_lastlogx" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_LASTLOGX 1" >>confdefs.h - - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback location of utmp" >&5 -printf %s "checking for a fallback location of utmp... " >&6; } -if test ${pt_cv_path_utmp+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" != yes; then - for file in "/var/run/utmp" "/var/adm/utmp" "/etc/utmp" "/usr/etc/utmp" "/usr/adm/utmp"; do - if test -f "$file"; then - pt_cv_path_utmp=$file - break - fi - done -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_utmp" >&5 -printf "%s\n" "$pt_cv_path_utmp" >&6; } -if test x$pt_cv_path_utmp != x; then - -printf "%s\n" "#define PT_UTMP_FILE \"$pt_cv_path_utmp\"" >>confdefs.h - -elif test "$cross_compiling" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_UTMP_FILE in config.h manually" >&5 -printf "%s\n" "$as_me: WARNING: Define PT_UTMP_FILE in config.h manually" >&2;} -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback location of wtmp" >&5 -printf %s "checking for a fallback location of wtmp... " >&6; } -if test ${pt_cv_path_wtmp+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" != yes; then - for file in "/var/log/wtmp" "/var/adm/wtmp" "/etc/wtmp" "/usr/etc/wtmp" "/usr/adm/wtmp"; do - if test -f "$file"; then - pt_cv_path_wtmp=$file - break - fi - done -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_wtmp" >&5 -printf "%s\n" "$pt_cv_path_wtmp" >&6; } -if test x$pt_cv_path_wtmp != x; then - -printf "%s\n" "#define PT_WTMP_FILE \"$pt_cv_path_wtmp\"" >>confdefs.h - -elif test "$cross_compiling" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_WTMP_FILE in config.h manually" >&5 -printf "%s\n" "$as_me: WARNING: Define PT_WTMP_FILE in config.h manually" >&2;} -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback location of wtmpx" >&5 -printf %s "checking for a fallback location of wtmpx... " >&6; } -if test ${pt_cv_path_wtmpx+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" != yes; then - for file in "/var/log/wtmpx" "/var/adm/wtmpx"; do - if test -f "$file"; then - pt_cv_path_wtmpx=$file - break - fi - done -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_wtmpx" >&5 -printf "%s\n" "$pt_cv_path_wtmpx" >&6; } -if test x$pt_cv_path_wtmpx != x; then - -printf "%s\n" "#define PT_WTMPX_FILE \"$pt_cv_path_wtmpx\"" >>confdefs.h - -elif test "$cross_compiling" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_WTMPX_FILE in config.h manually" >&5 -printf "%s\n" "$as_me: WARNING: Define PT_WTMPX_FILE in config.h manually" >&2;} -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback location of lastlog" >&5 -printf %s "checking for a fallback location of lastlog... " >&6; } -if test ${pt_cv_path_lastlog+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" != yes; then - for file in "/var/log/lastlog" "/var/adm/lastlog"; do - if test -f "$file"; then - pt_cv_path_lastlog=$file - break - fi - done -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_lastlog" >&5 -printf "%s\n" "$pt_cv_path_lastlog" >&6; } -if test x$pt_cv_path_lastlog != x; then - -printf "%s\n" "#define PT_LASTLOG_FILE \"$pt_cv_path_lastlog\"" >>confdefs.h - -elif test "$cross_compiling" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_LASTLOG_FILE in config.h manually" >&5 -printf "%s\n" "$as_me: WARNING: Define PT_LASTLOG_FILE in config.h manually" >&2;} -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback location of lastlogx" >&5 -printf %s "checking for a fallback location of lastlogx... " >&6; } -if test ${pt_cv_path_lastlogx+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" != yes; then - for file in "/var/log/lastlogx" "/var/adm/lastlogx"; do - if test -f "$file"; then - pt_cv_path_lastlogx=$file - break - fi - done -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_path_lastlogx" >&5 -printf "%s\n" "$pt_cv_path_lastlogx" >&6; } -if test x$pt_cv_path_lastlogx != x; then - -printf "%s\n" "#define PT_LASTLOGX_FILE \"$pt_cv_path_lastlogx\"" >>confdefs.h - -elif test "$cross_compiling" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Define PT_LASTLOGX_FILE in config.h manually" >&5 -printf "%s\n" "$as_me: WARNING: Define PT_LASTLOGX_FILE in config.h manually" >&2;} -fi - - - save_LIBS=$LIBS save_CXXFLAGS=$CXXFLAGS @@ -7935,396 +7548,6 @@ fi - - -case $host in - *-*-solaris*) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if __STDC_VERSION__ >= 199901L -error -#endif - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h - -else $as_nop - printf "%s\n" "#define _XOPEN_SOURCE 600" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sendmsg" >&5 -printf %s "checking for library containing sendmsg... " >&6; } -if test ${ac_cv_search_sendmsg+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -namespace conftest { - extern "C" int sendmsg (); -} -int -main (void) -{ -return conftest::sendmsg (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO" -then : - ac_cv_search_sendmsg=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_sendmsg+y} -then : - break -fi -done -if test ${ac_cv_search_sendmsg+y} -then : - -else $as_nop - ac_cv_search_sendmsg=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendmsg" >&5 -printf "%s\n" "$ac_cv_search_sendmsg" >&6; } -ac_res=$ac_cv_search_sendmsg -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - ;; -esac - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unix-compliant filehandle passing ability" >&5 -printf %s "checking for unix-compliant filehandle passing ability... " >&6; } -if test ${pt_cv_can_pass_fds+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include // broken bsds (is that redundant?) need this -#include -#include -#include - -int -main (void) -{ - -{ - msghdr msg; - iovec iov; - char buf [100]; - char data = 0; - - iov.iov_base = &data; - iov.iov_len = 1; - - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = buf; - msg.msg_controllen = sizeof buf; - - cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - cmsg->cmsg_len = 100; - - *(int *)CMSG_DATA (cmsg) = 5; - - return sendmsg (3, &msg, 0); -} - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - pt_cv_can_pass_fds=yes -else $as_nop - pt_cv_can_pass_fds=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_can_pass_fds" >&5 -printf "%s\n" "$pt_cv_can_pass_fds" >&6; } -if test x$pt_cv_can_pass_fds = xyes; then - -printf "%s\n" "#define HAVE_UNIX_FDPASS 1" >>confdefs.h - -else - as_fn_error $? "libptytty requires unix-compliant filehandle passing ability" "$LINENO" 5 -fi - - - -ac_fn_cxx_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default" -if test "x$ac_cv_header_pty_h" = xyes -then : - printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h - -fi -ac_fn_cxx_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default" -if test "x$ac_cv_header_util_h" = xyes -then : - printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h - -fi -ac_fn_cxx_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default" -if test "x$ac_cv_header_libutil_h" = xyes -then : - printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h - -fi -ac_fn_cxx_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ioctl_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h - -fi -ac_fn_cxx_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default" -if test "x$ac_cv_header_stropts_h" = xyes -then : - printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h - -fi - - -ac_fn_cxx_check_func "$LINENO" "revoke" "ac_cv_func_revoke" -if test "x$ac_cv_func_revoke" = xyes -then : - printf "%s\n" "#define HAVE_REVOKE 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "_getpty" "ac_cv_func__getpty" -if test "x$ac_cv_func__getpty" = xyes -then : - printf "%s\n" "#define HAVE__GETPTY 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = xyes -then : - printf "%s\n" "#define HAVE_GETPT 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt" -if test "x$ac_cv_func_posix_openpt" = xyes -then : - printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "isastream" "ac_cv_func_isastream" -if test "x$ac_cv_func_isastream" = xyes -then : - printf "%s\n" "#define HAVE_ISASTREAM 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "setuid" "ac_cv_func_setuid" -if test "x$ac_cv_func_setuid" = xyes -then : - printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid" -if test "x$ac_cv_func_seteuid" = xyes -then : - printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid" -if test "x$ac_cv_func_setreuid" = xyes -then : - printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h - -fi -ac_fn_cxx_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" -if test "x$ac_cv_func_setresuid" = xyes -then : - printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UNIX98 ptys" >&5 -printf %s "checking for UNIX98 ptys... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -grantpt(0);unlockpt(0);ptsname(0); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - unix98_pty=yes - -printf "%s\n" "#define UNIX98_PTY 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -if test -z "$unix98_pty"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5 -printf %s "checking for library containing openpty... " >&6; } -if test ${ac_cv_search_openpty+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -namespace conftest { - extern "C" int openpty (); -} -int -main (void) -{ -return conftest::openpty (); - ; - return 0; -} -_ACEOF -for ac_lib in '' util -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO" -then : - ac_cv_search_openpty=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_openpty+y} -then : - break -fi -done -if test ${ac_cv_search_openpty+y} -then : - -else $as_nop - ac_cv_search_openpty=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5 -printf "%s\n" "$ac_cv_search_openpty" >&6; } -ac_res=$ac_cv_search_openpty -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h - -fi - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tty group" >&5 -printf %s "checking for tty group... " >&6; } -if test ${pt_cv_tty_group+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - pt_cv_tty_group=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#include - -int main() -{ - struct stat st; - struct group *gr; - char *tty; - gr = getgrnam("tty"); - tty = ttyname(0); - if (gr != 0 - && tty != 0 - && (stat(tty, &st)) == 0 - && st.st_gid == gr->gr_gid) - return 0; - else - return 1; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : - pt_cv_tty_group=yes -else $as_nop - pt_cv_tty_group=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pt_cv_tty_group" >&5 -printf "%s\n" "$pt_cv_tty_group" >&6; } -if test x$pt_cv_tty_group = xyes; then - -printf "%s\n" "#define TTY_GID_SUPPORT 1" >>confdefs.h - -fi - support_image=no if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then support_image=yes