623 |
AC_MSG_CHECKING(krb5 implementation) |
AC_MSG_CHECKING(krb5 implementation) |
624 |
AC_MSG_RESULT(${cached}$KRB5_IMPL) |
AC_MSG_RESULT(${cached}$KRB5_IMPL) |
625 |
]) |
]) |
626 |
|
|
627 |
|
dnl IU_CHECK_MEMBER(AGGREGATE.MEMBER, |
628 |
|
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], |
629 |
|
dnl [INCLUDES]) |
630 |
|
dnl AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos'. |
631 |
|
dnl The member itself can be of an aggregate type |
632 |
|
dnl Shell variables are not a valid argument. |
633 |
|
AC_DEFUN([IU_CHECK_MEMBER], |
634 |
|
[AS_LITERAL_IF([$1], [], |
635 |
|
[AC_FATAL([$0: requires literal arguments])])dnl |
636 |
|
m4_bmatch([$1], [\.], , |
637 |
|
[m4_fatal([$0: Did not see any dot in `$1'])])dnl |
638 |
|
AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl |
639 |
|
dnl Extract the aggregate name, and the member name |
640 |
|
AC_CACHE_CHECK([for $1], ac_Member, |
641 |
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], |
642 |
|
[dnl AGGREGATE ac_aggr; |
643 |
|
static m4_bpatsubst([$1], [\..*]) ac_aggr; |
644 |
|
dnl ac_aggr.MEMBER; |
645 |
|
if (sizeof(ac_aggr.m4_bpatsubst([$1], [^[^.]*\.]))) |
646 |
|
return 0;])], |
647 |
|
[AS_VAR_SET(ac_Member, yes)], |
648 |
|
[AS_VAR_SET(ac_Member, no)])]) |
649 |
|
AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl |
650 |
|
AS_VAR_POPDEF([ac_Member])dnl |
651 |
|
])dnl IU_CHECK_MEMBER |
652 |
|
|
653 |
|
|
654 |
|
dnl IU_CHECK_MEMBERS([AGGREGATE.MEMBER, ...], |
655 |
|
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] |
656 |
|
dnl [INCLUDES]) |
657 |
|
AC_DEFUN([IU_CHECK_MEMBERS], |
658 |
|
[m4_foreach([AC_Member], [$1], |
659 |
|
[IU_CHECK_MEMBER(AC_Member, |
660 |
|
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Member), 1, |
661 |
|
[Define to 1 if `]m4_bpatsubst(AC_Member, |
662 |
|
[^[^.]*\.])[' is |
663 |
|
member of `]m4_bpatsubst(AC_Member, [\..*])['.]) |
664 |
|
$2], |
665 |
|
[$3], |
666 |
|
[$4])])]) |