summaryrefslogtreecommitdiff
path: root/m4/gssapi.m4
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2008-04-24 02:02:49 +0000
committerRuss Allbery <rra@stanford.edu>2008-04-24 02:02:49 +0000
commit92ff7f21ad0b167f8d742a9d7b5f93704a57619c (patch)
tree7adae5f227b6463e07d5cd0f1dab82b7f1c6be47 /m4/gssapi.m4
parent34c58f9471b3df4fa8b719b3c3534940ba5cfe1b (diff)
Major coding style cleanup. Updated all shared code from my other
projects. The configure option requesting AFS kaserver support (and thus building kasetkey) is now --with-kaserver instead of --with-afs. If KRB5_CONFIG was explicitly set in the environment, don't use a different krb5-config based on --with-krb4 or --with-krb5. If krb5-config isn't executable, don't use it. This allows one to force library probing by setting KRB5_CONFIG to point to a nonexistent file. Sanity-check the results of krb5-config before proceeding and error out in configure if they don't work. Stop setting Stanford-specific compile-time defaults for the wallet server and port.
Diffstat (limited to 'm4/gssapi.m4')
-rw-r--r--m4/gssapi.m411
1 files changed, 10 insertions, 1 deletions
diff --git a/m4/gssapi.m4 b/m4/gssapi.m4
index 2d36e43..5c0d9e7 100644
--- a/m4/gssapi.m4
+++ b/m4/gssapi.m4
@@ -97,6 +97,14 @@ AC_DEFUN([_RRA_LIB_GSSAPI_MANUAL],
[-lkrb5 -lasn1 -lroken -lcrypto -lcom_err $rra_gssapi_extra])
RRA_LIB_GSSAPI_RESTORE])
+dnl Sanity-check the results of krb5-config and be sure we can really link a
+dnl GSS-API program.
+AC_DEFUN([_RRA_LIB_GSSAPI_CHECK],
+[RRA_LIB_GSSAPI_SWITCH
+ AC_CHECK_FUNC([gss_import_name], ,
+ [AC_MSG_FAILURE([krb5-config results fail for GSS-API])])
+ RRA_LIB_GSSAPI_RESTORE])
+
dnl The main macro.
AC_DEFUN([RRA_LIB_GSSAPI],
[AC_REQUIRE([RRA_ENABLE_REDUCED_DEPENDS])
@@ -132,6 +140,7 @@ AC_DEFUN([RRA_LIB_GSSAPI],
[GSSAPI_CPPFLAGS=`"$KRB5_CONFIG" --cflags`
GSSAPI_LIBS=`"$KRB5_CONFIG" --libs`])
GSSAPI_CPPFLAGS=`echo "$GSSAPI_CPPFLAGS" \
- | sed 's%-I/usr/include ?%%'`],
+ | sed 's%-I/usr/include ?%%'`
+ _RRA_LIB_GSSAPI_CHECK],
[_RRA_LIB_GSSAPI_PATHS
_RRA_LIB_GSSAPI_MANUAL])])])