]> granicus.if.org Git - p11-kit/commitdiff
Add a proper pkg-config file.
authorStef Walter <stefw@collabora.co.uk>
Thu, 17 Feb 2011 21:24:16 +0000 (22:24 +0100)
committerStef Walter <stefw@collabora.co.uk>
Thu, 17 Feb 2011 21:24:16 +0000 (22:24 +0100)
.gitignore
configure.ac
module/Makefile.am
module/p11-kit.pc.in [new file with mode: 0644]

index a4de91995364455cf84fb9270cb456a986cadf8b..3972c502e171aff59ceefe1d7b3486f09d630ea0 100644 (file)
@@ -34,6 +34,8 @@ missing
 stamp-h1
 temp.txt
 
+/module/p11-kit.pc
+
 /tests/coverage
 /tests/coverage.info
 /tests/hash-test
index 079a2c075a741cfbd0dcb1a2596d733ee0f2c654..dcb6a234137ca1af3a63bcd933c37791f797aa2c 100644 (file)
@@ -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
index 6103485e7fabbdeeda0c914040795bd37e346587..23589d231c3ae3205da0385177a541f98aba4e3c 100644 (file)
@@ -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 (file)
index 0000000..d80167e
--- /dev/null
@@ -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