From: Ken Raeburn Date: Sat, 1 Apr 2006 01:20:24 +0000 (+0000) Subject: * aclocal.m4 (KRB5_SOCKADDR_SA_LEN): Use AC_CHECK_MEMBER. X-Git-Tag: krb5-1.5-alpha1~118 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ef9fb8d974698de81a1f8b31ceda6b9fb46ab91a;p=krb5.git * aclocal.m4 (KRB5_SOCKADDR_SA_LEN): Use AC_CHECK_MEMBER. (CHECK_UTMP): Use AC_CHECK_MEMBERS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17822 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 6ed7186ad..c5695adca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2006-03-31 Ken Raeburn + * aclocal.m4 (KRB5_SOCKADDR_SA_LEN): Use AC_CHECK_MEMBER. + (CHECK_UTMP): Use AC_CHECK_MEMBERS. + * configure.in: Don't test word sizes. Remove the #undef lines for the PACKAGE_ macros. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 940f0579c..72ee9b20d 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -727,68 +727,33 @@ dnl KRB5_SOCKADDR_SA_LEN: define HAVE_SA_LEN if sockaddr contains the sa_len dnl component dnl AC_DEFUN([KRB5_SOCKADDR_SA_LEN],[ dnl -AC_MSG_CHECKING(whether struct sockaddr contains sa_len) -AC_CACHE_VAL(krb5_cv_sockaddr_sa_len, -[AC_TRY_COMPILE([#include -#include -], -[struct sockaddr sa; -sa.sa_len;], -krb5_cv_sockaddr_sa_len=yes,krb5_cv_sockaddr_sa_len=no)]) -AC_MSG_RESULT([$]krb5_cv_sockaddr_sa_len) -if test $krb5_cv_sockaddr_sa_len = yes; then - AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]) - fi -]) +AC_CHECK_MEMBER(struct sockaddr.sa_len, + AC_DEFINE(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]) +,,[#include +#include ])]) dnl dnl dnl CHECK_UTMP: check utmp structure and functions dnl AC_DEFUN(CHECK_UTMP,[ -AC_MSG_CHECKING([ut_pid in struct utmp]) -AC_CACHE_VAL(krb5_cv_struct_ut_pid, -[AC_TRY_COMPILE( +AC_CHECK_MEMBERS([struct utmp.ut_pid, struct utmp.ut_type, struct utmp.ut_host, struct utmp.ut_exit],,, [#include -#include ], -[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 +#include ]) + +# Define the names actually used in the krb5 code currently: +if test $ac_cv_member_struct_utmp_ut_pid = no; then AC_DEFINE(NO_UT_PID,1,[Define if ut_pid field not found]) fi -AC_MSG_CHECKING([ut_type in struct utmp]) -AC_CACHE_VAL(krb5_cv_struct_ut_type, -[AC_TRY_COMPILE( -[#include -#include ], -[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 +if test $ac_cv_member_struct_utmp_ut_type = no; then AC_DEFINE(NO_UT_TYPE,1,[Define if ut_type field not found]) fi -AC_MSG_CHECKING([ut_host in struct utmp]) -AC_CACHE_VAL(krb5_cv_struct_ut_host, -[AC_TRY_COMPILE( -[#include -#include ], -[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 +if test $ac_cv_member_struct_utmp_ut_host = no; then AC_DEFINE(NO_UT_HOST,1,[Define if ut_host field not found]) fi -AC_MSG_CHECKING([ut_exit in struct utmp]) -AC_CACHE_VAL(krb5_cv_struct_ut_exit, -[AC_TRY_COMPILE( -[#include -#include ], -[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 +if test $ac_cv_member_struct_utmp_ut_exit = no; then AC_DEFINE(NO_UT_EXIT,1,[Define if ut_exit field not found]) fi + AC_CHECK_FUNCS(setutent setutxent updwtmp updwtmpx) ])dnl dnl