[959] in Kerberos-V5-bugs
Caching of utmp structures for configure....
daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Tue Nov 15 07:50:16 1994
From: epeisach@MIT.EDU
Date: Tue, 15 Nov 1994 07:50:07 -0500
To: krb5-bugs@MIT.EDU
I noticed that the appl/bsd and kadmin/kpasswd shared some common checks
so I rolled up smoe new definitions for aclocal.m4 and provide them
below as well as the changes to configure.in for them....
Of course caching of the results is included....
Ezra
*** 1.6 1994/11/15 12:28:04
--- aclocal.m4 1994/11/15 12:45:16
***************
*** 544,547 ****
define(V5_AC_OUTPUT_MAKEFILE,
[AC_OUTPUT(pre.out:[$]ac_prepend Makefile.out:Makefile.in post.out:[$]ac_postpend,[EXTRA_RULES], cat pre.out Makefile.out post.out > Makefile)])dnl
dnl
!
--- 544,609 ----
define(V5_AC_OUTPUT_MAKEFILE,
[AC_OUTPUT(pre.out:[$]ac_prepend Makefile.out:Makefile.in post.out:[$]ac_postpend,[EXTRA_RULES], cat pre.out Makefile.out post.out > Makefile)])dnl
dnl
! dnl
! dnl utmp structure checks (used by appl/bsd and kadmin/kpasswd)
! dnl
! dnl check for ut_pid in struct utmp
! define(KRB5_UTPID,[
! AC_MSG_CHECKING([ut_pid in struct utmp])
! AC_CACHE_VAL(krb5_cv_struct_ut_pid,
! [AC_TRY_LINK(
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_pid;],
! krb5_cv_struct_ut_pid=yes, krb5_cv_struct_ut_pid=no)])
! AC_MSG_RESULT($krb5_cv_struct_ut_pid)
! if test $krb5_cv_struct_ut_pid = no; then
! AC_DEFINE(NO_UT_PID)
! fi
! ])dnl
! dnl
! dnl check for ut_type in struct utmp
! dnl
! define(KRB5_UTTYPE,[
! AC_MSG_CHECKING([ut_type in struct utmp])
! AC_CACHE_VAL(krb5_cv_struct_ut_type,
! [AC_TRY_LINK(
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_type;],
! krb5_cv_struct_ut_type=yes, krb5_cv_struct_ut_type=no)])
! AC_MSG_RESULT($krb5_cv_struct_ut_type)
! if test $krb5_cv_struct_ut_type = no; then
! AC_DEFINE(NO_UT_TYPE)
! fi
! ])dnl
! dnl
! dnl check for ut_host in struct utmp
! dnl
! define(KRB5_UTHOST,[
! AC_MSG_CHECKING([ut_host in struct utmp])
! AC_CACHE_VAL(krb5_cv_struct_ut_host,
! [AC_TRY_LINK(
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_host;],
! krb5_cv_struct_ut_host=yes, krb5_cv_struct_ut_host=no)])
! AC_MSG_RESULT($krb5_cv_struct_ut_host)
! if test $krb5_cv_struct_ut_host = no; then
! AC_DEFINE(NO_UT_HOST)
! fi
! ])dnl
! dnl
! dnl
! dnl check for ut_exit in struct utmp
! dnl
! define(KRB5_UTEXIT,[
! AC_MSG_CHECKING([ut_exit in struct utmp])
! AC_CACHE_VAL(krb5_cv_struct_ut_exit,
! [AC_TRY_LINK(
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_exit;],
! krb5_cv_struct_ut_exit=yes, krb5_cv_struct_ut_exit=no)])
! AC_MSG_RESULT($krb5_cv_struct_ut_exit)
! if test $krb5_cv_struct_ut_exit = no; then
! AC_DEFINE(NO_UT_EXIT)
! fi
! ])dnl
! dnl
===================================================================
RCS file: /mit/krb5/.cvsroot/src/kadmin/kpasswd/configure.in,v
retrieving revision 1.10
diff -c -r1.10 configure.in
*** 1.10 1994/10/26 05:44:16
--- configure.in 1994/11/15 12:42:00
***************
*** 6,26 ****
AC_CHECK_LIB(socket,main)
AC_CHECK_LIB(nsl,main)
AC_HAVE_HEADERS(unistd.h)
! AC_COMPILE_CHECK([ut_pid in struct utmp],
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_pid;],
! ,
! AC_DEFINE(NO_UT_PID))
! AC_COMPILE_CHECK([ut_type in struct utmp],
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_type;],
! ,
! AC_DEFINE(NO_UT_TYPE))
! AC_COMPILE_CHECK([ut_host in struct utmp],
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_host;],
! ,
! AC_DEFINE(NO_UT_HOST))
AC_FUNC_CHECK(getutent,AC_DEFINE(HAVE_GETUTENT))
ET_RULES
KRB_INCLUDE
--- 6,14 ----
AC_CHECK_LIB(socket,main)
AC_CHECK_LIB(nsl,main)
AC_HAVE_HEADERS(unistd.h)
! KRB5_UTPID
! KRB5_UTTYPE
! KRB5_UTHOST
AC_FUNC_CHECK(getutent,AC_DEFINE(HAVE_GETUTENT))
ET_RULES
KRB_INCLUDE
===================================================================
RCS file: /mit/krb5/.cvsroot/src/appl/bsd/configure.in,v
retrieving revision 5.30
diff -c -r5.30 configure.in
*** 5.30 1994/11/11 05:53:36
--- configure.in 1994/11/15 12:45:13
***************
*** 52,72 ****
#include <fcntl.h>],
[1+F_SETOWN;],
AC_DEFINE(HAVE_SETOWN))
! AC_COMPILE_CHECK([ut_host in struct utmp],
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_host;],
! ,
! AC_DEFINE(NO_UT_HOST))
! AC_COMPILE_CHECK([ut_exit in struct utmp],
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_exit;],
! ,
! AC_DEFINE(NO_UT_EXIT))
! AC_COMPILE_CHECK([ut_pid in struct utmp],
! [#include <utmp.h>],
! [struct utmp ut; ut.ut_pid;],
! ,
! AC_DEFINE(NO_UT_PID))
KRB_INCLUDE
WITH_KRB5ROOT
WITH_KRB4
--- 52,60 ----
#include <fcntl.h>],
[1+F_SETOWN;],
AC_DEFINE(HAVE_SETOWN))
! KRB5_UTHOST
! KRB5_UTEXIT
! KRB5_UTPID
KRB_INCLUDE
WITH_KRB5ROOT
WITH_KRB4