]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Probe directly for com_err.h
authorAndrew Deason <adeason@sinenomine.net>
Wed, 11 Sep 2013 16:22:20 +0000 (11:22 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 25 Sep 2013 17:25:52 +0000 (10:25 -0700)
com_err.h can be in com_err.h, et/com_err.h, or krb5/com_err.h (for
netbsd 6.1 and possibly other netbsd). aklog currently only includes
either com_err.h or et/com_err.h, depending on autoconf probes
performed by the krb5.m4 macros.

So, also look for krb5/com_err.h. The krb5.m4 macros currently only
look for com_err.h at all if certain other libkrb5 tests return
certain results, so just look for all of them directly in some of our
openafs-specific krb5 probing logic in configure.ac.

Also remove the duplicate check for et/com_err.h in acinclude.m4 while
we're here. We only use et/com_err.h if krb5 support is enabled, so
only check for it in the second of krb5 probes.

FIXES 131716

Change-Id: Ic454b9bf7043f91654dcd1c262ab3790bf2ad272
Reviewed-on: http://gerrit.openafs.org/10244
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
acinclude.m4
configure.ac
src/aklog/aklog.c

index 7ebb50bc23f9b87dedb9d07fba548d9bce64d921..1c8fb1a4f8856df7901b2533dfa1b0035d1b4276 100644 (file)
@@ -1335,7 +1335,6 @@ AC_CHECK_HEADERS([ \
                   arpa/nameser.h \
                   curses.h\
                   direct.h \
-                  et/com_err.h \
                   errno.h \
                   fcntl.h \
                   grp.h \
index aed59c105a4cf683da0607b4d01481284e6a797f..cf1931b9a777dda8983e5f8647df90497f8a0b60 100644 (file)
@@ -87,6 +87,11 @@ AS_IF([test x"$KRB5_LIBS" != x],
      ])
      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_prompt.type], [], [], [#include <krb5.h>])
 dnl If we have krb5_creds.session, we are using heimdal
index b5c0108ef8abd46cac7cf77da965afe39c4ca50d..a23792bd78d1f55288d08bc983d13270e2afafe5 100644 (file)
 #include <afs/token.h>
 
 #include <krb5.h>
-#if defined(HAVE_ET_COM_ERR_H)
-#include <et/com_err.h>
+#ifdef HAVE_COM_ERR_H
+# include <com_err.h>
+#elif HAVE_ET_COM_ERR_H
+# include <et/com_err.h>
+#elif HAVE_KRB5_COM_ERR_H
+# include <krb5/com_err.h>
 #else
-#include <com_err.h>
+# error No com_err.h? We need some kind of com_err.h
 #endif
 
 #ifndef HAVE_KERBEROSV_HEIM_ERR_H