diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-02-17 22:24:16 +0100 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-02-17 22:24:16 +0100 |
commit | 80fe1806941d555433f3a1c97ab116dd281041e0 (patch) | |
tree | 4f0e5ab650f4396a8af67bf66cbaba0331773f81 | |
parent | c03b1023835887569315fbec6295be3cc0f4cf42 (diff) |
Add a proper pkg-config file.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | configure.ac | 25 | ||||
-rw-r--r-- | module/Makefile.am | 10 | ||||
-rw-r--r-- | module/p11-kit.pc.in | 17 |
4 files changed, 38 insertions, 16 deletions
@@ -34,6 +34,8 @@ missing stamp-h1 temp.txt +/module/p11-kit.pc + /tests/coverage /tests/coverage.info /tests/hash-test diff --git a/configure.ac b/configure.ac index 079a2c0..dcb6a23 100644 --- a/configure.ac +++ b/configure.ac @@ -29,20 +29,22 @@ dnl Checks for typedefs, structures, and compiler characteristics. AC_CHECK_MEMBERS([struct dirent.d_type],,,[#include <dirent.h>]) # -------------------------------------------------------------------- -# PAM Module Directory +# PKCS#11 Directories -AC_ARG_WITH([pkcs11-dir], - [AC_HELP_STRING([--with-pkcs11-dir=DIR], - [directory which holds pkcs11 modules])], - [], [with_pkcs11_dir='${libdir}/pkcs11']) -PKCS11_MODULE_PATH="$with_pkcs11_dir" -AC_SUBST(PKCS11_MODULE_PATH) +p11_system_conf="$sysconfdir/pkcs11/pkcs11.conf" +p11_system_modules="$sysconfdir/pkcs11/modules" +p11_user_conf="~/.pkcs11/pkcs11.conf" +p11_user_modules="~/.pkcs11/modules" -AM_CONDITIONAL(WITH_PAM, test "$have_pam" = "yes") +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]) -if test "$have_pam" = "yes"; then - pam_status="yes ($with_pam_dir)" -fi +AC_SUBST(p11_system_conf) +AC_SUBST(p11_system_modules) +AC_SUBST(p11_user_conf) +AC_SUBST(p11_user_modules) # -------------------------------------------------------------------- # Warnings to show if using GCC @@ -130,6 +132,7 @@ fi AC_CONFIG_FILES([Makefile module/Makefile + module/p11-kit.pc tests/Makefile ]) AC_OUTPUT diff --git a/module/Makefile.am b/module/Makefile.am index 6103485..23589d2 100644 --- a/module/Makefile.am +++ b/module/Makefile.am @@ -1,8 +1,4 @@ -INCLUDES = \ - -DPKCS11_CONFIG_FILE=\"$(sysconfdir)/pkcs11.conf\" \ - -DPKCS11_CONFIG_LIBS=\"$(sysconfdir)/pkcs11/libs\" - MODULE_SRCS = \ conf.c conf.h \ hash.c hash.h \ @@ -26,5 +22,9 @@ libp11_kit_testable_la_LDFLAGS = \ libp11_kit_testable_la_SOURCES = $(MODULE_SRCS) +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = p11-kit.pc + EXTRA_DIST = \ - pkcs11.h
\ No newline at end of file + pkcs11.h \ + p11-kit.pc.in
\ No newline at end of file diff --git a/module/p11-kit.pc.in b/module/p11-kit.pc.in new file mode 100644 index 0000000..d80167e --- /dev/null +++ b/module/p11-kit.pc.in @@ -0,0 +1,17 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +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@ + +Name: p11-kit +Description: Library and proxy module for properly loading and sharing PKCS#11 modules. +Version: @VERSION@ +Libs: -L${libdir} -lp11-kit +Cflags: -I${includedir}/p11-kit |