diff --git a/acinclude.m4 b/acinclude.m4 index 86ff65bfbb..3adced81d7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1310,7 +1310,6 @@ AC_HEADER_DIRENT AC_CHECK_HEADERS([ \ curses.h \ direct.h \ - et/com_err.h \ fcntl.h \ grp.h \ mntent.h \ diff --git a/configure.ac b/configure.ac index 38ac6f256d..d0b329ddfe 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,11 @@ AS_IF([test x"$KRB5_LIBS" != x], [Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])]) AC_CHECK_HEADERS([kerberosIV/krb.h]) AC_CHECK_HEADERS([kerberosV/heim_err.h]) + AC_CHECK_HEADERS([com_err.h et/com_err.h krb5/com_err.h]) + AS_IF([test x"$ac_cv_header_com_err_h" != xyes \ + && test x"$ac_cv_header_et_com_err_h" != xyes \ + && test x"$ac_cv_header_krb5_com_err_h" != xyes], + [AC_MSG_ERROR([Cannot find a usable com_err.h])]) AC_CHECK_MEMBERS([krb5_creds.keyblock, krb5_creds.keyblock.enctype, krb5_creds.session, krb5_keytab_entry.key, krb5_keytab_entry.keyblock, krb5_keyblock.enctype, diff --git a/src/aklog/aklog.c b/src/aklog/aklog.c index 89f73d80b7..aac7e3352c 100644 --- a/src/aklog/aklog.c +++ b/src/aklog/aklog.c @@ -64,10 +64,14 @@ #include #include -#if defined(HAVE_ET_COM_ERR_H) -#include +#ifdef HAVE_COM_ERR_H +# include +#elif HAVE_ET_COM_ERR_H +# include +#elif HAVE_KRB5_COM_ERR_H +# include #else -#include +# error No com_err.h? We need some kind of com_err.h #endif #ifndef HAVE_KERBEROSV_HEIM_ERR_H