diff options
author | Simo Sorce <simo@redhat.com> | 2016-01-08 10:56:17 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-06-29 21:46:15 +0200 |
commit | b1ce544568eff89f2263ae180e323f263f1cff3a (patch) | |
tree | 2174bca11a3e866eb564ed9fbb401b69f67cad5b /src/conf_macros.m4 | |
parent | 052f8aa2034f7b091097dc5fdafc201b7d684525 (diff) | |
download | sssd-b1ce544568eff89f2263ae180e323f263f1cff3a.tar.gz sssd-b1ce544568eff89f2263ae180e323f263f1cff3a.tar.xz sssd-b1ce544568eff89f2263ae180e323f263f1cff3a.zip |
Secrets: Add autoconf macros to build with secrets
Prepares autoconf for the new Secrets Provider
Related:
https://fedorahosted.org/sssd/ticket/2913
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/conf_macros.m4')
-rw-r--r-- | src/conf_macros.m4 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index eed6508b1..bc295c5e7 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -861,3 +861,45 @@ AC_DEFUN([ENABLE_POLKIT_RULES_PATH], AM_CONDITIONAL([HAVE_POLKIT_RULES_D], [test x$HAVE_POLKIT_RULES_D != x]) ]) + +dnl Backwards compat for older autoconf +AC_DEFUN([SSSD_RUNSTATEDIR], + [ + if test x"$runstatedir" = x; then + AC_SUBST([runstatedir], + ["${localstatedir}/run"]) + fi + ]) + +AC_DEFUN([WITH_SECRETS], + [ AC_ARG_WITH([secrets], + [AC_HELP_STRING([--with-secrets], + [Whether to build with secrets support [yes]] + ) + ], + [with_secrets=$withval], + with_secrets=yes + ) + + if test x"$with_secrets" = xyes; then + AC_DEFINE(BUILD_SECRETS, 1, [whether to build with SECRETS support]) + fi + AM_CONDITIONAL([BUILD_SECRETS], [test x"$with_secrets" = xyes]) + ]) + +AC_DEFUN([WITH_SECRETS_DB_PATH], + [ AC_ARG_WITH([secrets-db-path], + [AC_HELP_STRING([--with-secrets-db-path=PATH], + [Path to the SSSD databases [/var/lib/sss/secrets]] + ) + ] + ) + config_secdbpath="\"SSS_STATEDIR\"/secrets" + secdbpath="${localstatedir}/lib/sss/secrets" + if test x"$with_secrets_db_path" != x; then + config_secdbpath=$with_secrets_db_path + secdbpath=$with_secrets_db_path + fi + AC_SUBST(secdbpath) + AC_DEFINE_UNQUOTED(SECRETS_DB_PATH, "$config_secdbpath", [Path to the SSSD Secrets databases]) + ]) |