summaryrefslogtreecommitdiffstats
path: root/src/configure.in
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-07-24 16:26:28 -0400
committerGreg Hudson <ghudson@mit.edu>2012-07-24 16:26:28 -0400
commit688a2702d2045abf5f99acfb59f3f372391e5be4 (patch)
tree191c3f0e11012369929598a1f6e16951e4561aab /src/configure.in
parent4a788fb072b06ab25fb39c7720e2fe7bb79fd7f4 (diff)
downloadkrb5-688a2702d2045abf5f99acfb59f3f372391e5be4.tar.gz
krb5-688a2702d2045abf5f99acfb59f3f372391e5be4.tar.xz
krb5-688a2702d2045abf5f99acfb59f3f372391e5be4.zip
Support changing the built-in ccache/keytab names
* Add DEFCCNAME, DEFKTNAME, and DEFCKTNAME configure variables to change the built-in ccache and keytab names. * Add krb5-config options to display the built-in ccache and keytab names. * In the default build, use krb5-config to discover the system's built-in ccache and keytab names and use them (if not overridden). This can be controlled with the --with-krb5-config=PATH or --without-krb5-config configure options. * Make the built-in ccache name subject to parameter expansion. ticket: 7221 (new)
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/configure.in b/src/configure.in
index b1661f08b2..c7c92d923d 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1251,6 +1251,41 @@ if test "${localedir+set}" != set; then
fi
AC_SUBST(localedir)
+# Build-time default ccache, keytab, and client keytab names. These
+# can be given as variable arguments DEFCCNAME, DEFKTNAME, and
+# DEFCKTNAME. Otherwise, we try to get the OS defaults from
+# krb5-config if we can, or fall back to hardcoded defaults.
+AC_ARG_VAR(DEFCCNAME, [Default ccache name])
+AC_ARG_VAR(DEFKTNAME, [Default keytab name])
+AC_ARG_VAR(DEFCKTNAME, [Default client keytab name])
+AC_ARG_WITH([krb5-config],
+ AC_HELP_STRING([--with-krb5-config=PATH],
+ [path to existing krb5-config program for defaults]), ,
+ [with_krb5_config=krb5-config])
+if test "x$with_krb5_config" != xno; then
+ if test "x$with_krb5_config" = xyes; then
+ with_krb5_config=krb5-config
+ fi
+ if $with_krb5_config --help 2>&1 | grep -q defccname; then
+ AC_MSG_NOTICE([Using $with_krb5_config for build defaults])
+ : "${DEFCCNAME=`$with_krb5_config --defccname`}"
+ : "${DEFKTNAME=`$with_krb5_config --defktname`}"
+ : "${DEFCKTNAME=`$with_krb5_config --defcktname`}"
+ fi
+fi
+if test "${DEFCCNAME+set}" != set; then
+ DEFCCNAME=FILE:/tmp/krb5cc_%{uid}
+fi
+: "${DEFKTNAME=FILE:/etc/krb5.keytab}"
+: "${DEFCKTNAME=FILE:/etc/krb5.client-keytab}"
+AC_MSG_NOTICE([Default ccache name: $DEFCCNAME])
+AC_MSG_NOTICE([Default keytab name: $DEFKTNAME])
+AC_MSG_NOTICE([Default client keytab name: $DEFCKTNAME])
+AC_DEFINE_UNQUOTED(DEFCCNAME, ["$DEFCCNAME"], [Define to default ccache name])
+AC_DEFINE_UNQUOTED(DEFKTNAME, ["$DEFKTNAME"], [Define to default keytab name])
+AC_DEFINE_UNQUOTED(DEFCKTNAME, ["$DEFCKTNAME"],
+ [Define to default client keytab name])
+
AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config])
V5_AC_OUTPUT_MAKEFILE(.