diff options
-rw-r--r-- | configure.ac | 50 | ||||
-rw-r--r-- | p11-kit/Makefile.am | 2 | ||||
-rw-r--r-- | p11-kit/modules.c | 5 | ||||
-rw-r--r-- | p11-kit/p11-kit-1.pc.in | 10 | ||||
-rw-r--r-- | p11-kit/pkcs11.conf.example.in | 2 |
5 files changed, 37 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac index 10e35d7..eb2dba0 100644 --- a/configure.ac +++ b/configure.ac @@ -54,28 +54,30 @@ GTK_DOC_CHECK([1.15]) # -------------------------------------------------------------------- # PKCS#11 Directories -AC_ARG_WITH([pkcs11-dir], - [AS_HELP_STRING([--with-pkcs11-dir], [Change PKCS#11 system config directory])], - [pkcs11_dir=$withval], - [pkcs11_dir=$sysconfdir/pkcs11]) +AC_ARG_WITH([system-config], + [AS_HELP_STRING([--with-system-config], [Change PKCS#11 system config directory])], + [system_config_dir=$withval], + [system_config_dir=$sysconfdir/pkcs11]) # We expand these so we have concrete paths -p11_system_dir=$(eval echo $pkcs11_dir) -p11_system_conf=$(eval echo $p11_system_dir/pkcs11.conf) -p11_system_modules=$(eval echo $p11_system_dir/modules) -p11_user_conf="~/.pkcs11/pkcs11.conf" -p11_user_modules="~/.pkcs11/modules" - -AC_DEFINE_UNQUOTED(P11_SYSTEM_CONF, "$p11_system_conf", [System configuration file]) -AC_DEFINE_UNQUOTED(P11_SYSTEM_MODULES, "$p11_system_modules", [System modules dir]) -AC_DEFINE_UNQUOTED(P11_USER_CONF, "$p11_user_conf", [User configuration file]) -AC_DEFINE_UNQUOTED(P11_USER_MODULES, "$p11_user_modules", [User modules dir]) - -AC_SUBST(p11_system_dir) -AC_SUBST(p11_system_conf) -AC_SUBST(p11_system_modules) -AC_SUBST(p11_user_conf) -AC_SUBST(p11_user_modules) +p11_system_config=$(eval echo $system_config_dir) +p11_system_config_file=$(eval echo $p11_system_config/pkcs11.conf) +p11_system_config_modules=$(eval echo $p11_system_config/modules) +p11_user_config="~/.pkcs11" +p11_user_config_file="$p11_user_config/pkcs11.conf" +p11_user_config_modules="$p11_user_config/modules" + +AC_DEFINE_UNQUOTED(P11_SYSTEM_CONFIG_FILE, "$p11_system_config_file", [System configuration file]) +AC_DEFINE_UNQUOTED(P11_SYSTEM_CONFIG_MODULES, "$p11_system_config_modules", [System modules configuration dir]) +AC_DEFINE_UNQUOTED(P11_USER_CONFIG_FILE, "$p11_user_config_file", [User configuration file]) +AC_DEFINE_UNQUOTED(P11_USER_CONFIG_MODULES, "$p11_user_config_modules", [User modules configuration dir]) + +AC_SUBST(p11_system_config) +AC_SUBST(p11_system_config_file) +AC_SUBST(p11_system_config_modules) +AC_SUBST(p11_user_config) +AC_SUBST(p11_user_config_file) +AC_SUBST(p11_user_config_modules) # -------------------------------------------------------------------- # Warnings to show if using GCC @@ -188,8 +190,8 @@ AC_OUTPUT AC_MSG_NOTICE([build options: - System Global Config: $p11_system_conf - User Global Config: $p11_user_conf - System Module Directory: $p11_system_modules - User Module Directory: $p11_user_modules + System Global Config: $p11_system_config_file + System Module Config Directory: $p11_system_config_modules + User Global Config: $p11_user_config_file + User Module Config Directory: $p11_user_config_modules ]) diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am index 9d28b5e..dc9f8ab 100644 --- a/p11-kit/Makefile.am +++ b/p11-kit/Makefile.am @@ -46,7 +46,7 @@ libp11_kit_testable_la_SOURCES = $(MODULE_SRCS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = p11-kit-1.pc -exampledir = $(p11_system_dir) +exampledir = $(p11_system_config) example_DATA = pkcs11.conf.example EXTRA_DIST = \ diff --git a/p11-kit/modules.c b/p11-kit/modules.c index e683c46..1e2095b 100644 --- a/p11-kit/modules.c +++ b/p11-kit/modules.c @@ -395,13 +395,14 @@ load_registered_modules_unlocked (void) return CKR_OK; /* Load the global configuration files */ - config = _p11_conf_load_globals (P11_SYSTEM_CONF, P11_USER_CONF, &mode); + config = _p11_conf_load_globals (P11_SYSTEM_CONFIG_FILE, P11_USER_CONFIG_FILE, &mode); if (config == NULL) return (errno == ENOMEM) ? CKR_HOST_MEMORY : CKR_GENERAL_ERROR; assert (mode != CONF_USER_INVALID); - configs = _p11_conf_load_modules (mode, P11_SYSTEM_MODULES, P11_USER_MODULES); + configs = _p11_conf_load_modules (mode, P11_SYSTEM_CONFIG_MODULES, + P11_USER_CONFIG_MODULES); if (configs == NULL) { rv = (errno == ENOMEM) ? CKR_HOST_MEMORY : CKR_GENERAL_ERROR; hash_free (config); diff --git a/p11-kit/p11-kit-1.pc.in b/p11-kit/p11-kit-1.pc.in index 9ef67a3..0f596fa 100644 --- a/p11-kit/p11-kit-1.pc.in +++ b/p11-kit/p11-kit-1.pc.in @@ -5,10 +5,12 @@ includedir=@includedir@ datarootdir=@datarootdir@ datadir=@datadir@ sysconfdir=@sysconfdir@ -p11_system_conf=@p11_system_conf@ -p11_system_modules=@p11_system_modules@ -p11_user_conf=@p11_user_conf@ -p11_user_modules=@p11_user_modules@ +p11_system_config=@p11_system_config@ +p11_system_config_file=@p11_system_config_file@ +p11_system_config_modules=@p11_system_config_modules@ +p11_user_config=@p11_user_config@ +p11_user_config_file=@p11_user_config_file@ +p11_user_config_modules=@p11_user_config_modules@ proxy_module=@libdir@/p11-kit-proxy.so Name: p11-kit diff --git a/p11-kit/pkcs11.conf.example.in b/p11-kit/pkcs11.conf.example.in index bfc2cb3..ec01b14 100644 --- a/p11-kit/pkcs11.conf.example.in +++ b/p11-kit/pkcs11.conf.example.in @@ -1,4 +1,4 @@ -# This is an example @p11_system_conf@ file. Copy it into +# This is an example @p11_system_config_file@ file. Copy it into # place before use. # This setting controls whether to load user configuration from the |