]> 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)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 4 Oct 2013 14:13:59 +0000 (07:13 -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

Reviewed-on: http://gerrit.openafs.org/10244
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 8e32b11be6ce0517f75588360a3ca8c333358ca3)

Change-Id: I567959b6d26ece9606086f4d82c5be40b11d7ea8
Reviewed-on: http://gerrit.openafs.org/10275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
configure.ac
src/aklog/aklog.c

index 86ff65bfbbae8e52e526782450a853223743c464..3adced81d798af3d71ff608cd184bc4b6983c60f 100644 (file)
@@ -1310,7 +1310,6 @@ AC_HEADER_DIRENT
 AC_CHECK_HEADERS([ \
        curses.h \
        direct.h \
-       et/com_err.h \
        fcntl.h \
        grp.h \
        mntent.h \
index 38ac6f256dc979901a8ae3196947e285f6277dfe..d0b329ddfebdbf52c2bf2c46919f0188cdc0137c 100644 (file)
@@ -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,
index 89f73d80b75e3f875fc3f1e12b922f1843fd1fd6..aac7e3352c2c3ae3c90c6840c189e9a89d8fbe06 100644 (file)
 
 #include <afs/stds.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