Installing libp11

Installation is quite easy:

wget http://www.opensc.org/files/libp11-0.1.tar.gz
tar xfvz libp11-0.1.tar.gz
cd libp11-0.1
./configure --prefix=/usr
make
make install

is all you need. Libp11 depends on pkg-config and openssl. If you don't have pkg-config installed, please do so and try again. If pkg-config is not found, please change your PATH environment setting. If openssl is not installed, please do so. If openssl is not found, please change your PKG_CONFIG_PATH environment setting to include the directory with "openssl.pc" file. Some linux distributions split openssl into a runtime package and a development package, you need to install both.

Using libp11

To use libp11 in your application: in the source code add

#include <libp11.h>

and in your Makefile add

CFLAGS=$(shell pkg-config --cflags libp11)
LDLFLAGS=$(shell pkg-config --libs libp11)

or if you are using autoconf/automake, you can add this to configure.ac

PKG_CHECK_MODULES([LIBP11], [libp11])

and edit your Makefile.am to include

myapplication_INCLUDES = @LIBP11_CFLAGS@
myapplication_LIBADD = @LIBP11_LIBS@