+2004-11-19 Tom Yu <tlyu@mit.edu>
+
+ * aclocal.m4 (KRB5_AC_PRIOCNTL_HACK): Check for Solaris patch
+ 117171-11 (sparc) or 117172-11 (x86), which fixes the Solaris 9
+ bug which can cause final pty output to be on close.
+
2004-11-18 Tom Yu <tlyu@mit.edu>
* Makefile.in (install-headers-mkdirs): Create KRB5_INCDIR/gssrpc.
dnl
dnl
AC_DEFUN([KRB5_AC_PRIOCNTL_HACK],
+[AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_LANG_COMPILER_REQUIRE])dnl
+AC_CACHE_CHECK([whether to use priocntl hack], [krb5_cv_priocntl_hack],
[case $krb5_cv_host in
*-*-solaris2.9*)
- PRIOCNTL_HACK=1
+ if test "$cross_compiling" = yes; then
+ krb5_cv_priocntl_hack=yes
+ else
+ # Solaris patch 117171-11 (sparc) or 117172-11 (x86)
+ # fixes the Solaris 9 bug where final pty output
+ # gets lost on close.
+ if showrev -p | $AWK 'BEGIN { e = 1 }
+/Patch: 11717[[12]]/ { x = index[]([$]2, "-");
+if (substr[]([$]2, x + 1, length([$]2) - x) >= 11)
+{ e = 0 } else { e = 1 } }
+END { exit e; }'; then
+ krb5_cv_priocntl_hack=no
+ else
+ krb5_cv_priocntl_hack=yes
+ fi
+ fi
;;
*)
- PRIOCNTL_HACK=0
+ krb5_cv_priocntl_hack=no
;;
-esac
+esac])
+if test "$krb5_cv_priocntl_hack" = yes; then
+ PRIOCNTL_HACK=1
+else
+ PRIOCNTL_HACK=0
+fi
AC_SUBST(PRIOCNTL_HACK)])
dnl
dnl