INN commit: trunk/m4 (krb5.m4)

INN Commit rra at isc.org
Mon Jun 25 20:41:19 UTC 2018


    Date: Monday, June 25, 2018 @ 13:41:18
  Author: iulius
Revision: 10293

Update to latest rra-c-util upstream version

Fix INN_LIB_KRB5_OPTIONAL probing in the --enable-reduced-depends case
when linking with libkrb5 is not possible but libcom_err is present.
The probes for com_err were previously not skipped, resulting in a
non-empty KRB5_LIBS containing only -lcom_err, which incorrectly
caused the macro to indicate that Kerberos libraries were present.

Modified:
  trunk/m4/krb5.m4

---------+
 krb5.m4 |   39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

Modified: krb5.m4
===================================================================
--- krb5.m4	2018-06-05 14:54:06 UTC (rev 10292)
+++ krb5.m4	2018-06-25 20:41:18 UTC (rev 10293)
@@ -51,7 +51,7 @@
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle at eyrie.org>
-dnl Copyright 2005-2011, 2013-2014
+dnl Copyright 2005-2011, 2013-2014, 2018
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
@@ -140,26 +140,27 @@
 dnl be found.
 AC_DEFUN([_INN_LIB_KRB5_REDUCED],
 [INN_LIB_KRB5_SWITCH
- AC_CHECK_LIB([krb5], [krb5_init_context], [KRB5_LIBS="-lkrb5"],
+ AC_CHECK_LIB([krb5], [krb5_init_context],
+    [KRB5_LIBS="-lkrb5"
+     LIBS="$KRB5_LIBS $LIBS"
+     _INN_LIB_KRB5_CHECK_HEADER_KRB5
+     AC_CHECK_FUNCS([krb5_get_error_message],
+        [AC_CHECK_FUNCS([krb5_free_error_message])],
+        [AC_CHECK_FUNCS([krb5_get_error_string], [],
+            [AC_CHECK_FUNCS([krb5_get_err_txt], [],
+                [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
+                    [KRB5_LIBS="$KRB5_LIBS -lksvc"
+                     AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
+                     AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
+                        [INN_INCLUDES_KRB5])],
+                    [AC_CHECK_LIB([com_err], [com_err],
+                        [KRB5_LIBS="$KRB5_LIBS -lcom_err"],
+                        [AS_IF([test x"$1" = xtrue],
+                            [AC_MSG_ERROR([cannot find usable com_err library])],
+                            [KRB5_LIBS=""])])
+                     _INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])],
      [AS_IF([test x"$1" = xtrue],
          [AC_MSG_ERROR([cannot find usable Kerberos library])])])
- LIBS="$KRB5_LIBS $LIBS"
- _INN_LIB_KRB5_CHECK_HEADER_KRB5
- AC_CHECK_FUNCS([krb5_get_error_message],
-     [AC_CHECK_FUNCS([krb5_free_error_message])],
-     [AC_CHECK_FUNCS([krb5_get_error_string], [],
-         [AC_CHECK_FUNCS([krb5_get_err_txt], [],
-             [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
-                 [KRB5_LIBS="$KRB5_LIBS -lksvc"
-                  AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
-                  AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
-                     [INN_INCLUDES_KRB5])],
-                 [AC_CHECK_LIB([com_err], [com_err],
-                     [KRB5_LIBS="$KRB5_LIBS -lcom_err"],
-                     [AS_IF([test x"$1" = xtrue],
-                         [AC_MSG_ERROR([cannot find usable com_err library])],
-                         [KRB5_LIBS=""])])
-                  _INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
  INN_LIB_KRB5_RESTORE])
 
 dnl Does the appropriate library checks for Kerberos linkage when we don't



More information about the inn-committers mailing list