File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,13 @@ AC_ARG_WITH(
149149 ]
150150)
151151
152+ AC_ARG_ENABLE (
153+ [ static-engine] ,
154+ [ AS_HELP_STRING ( [ --enable-static-engine] , [ enable static engine (libpkcs11.a) build @<:@ disabled@:>@ ] ) ] ,
155+ ,
156+ [ enable_static_engine="no"]
157+ )
158+
152159AC_ARG_WITH (
153160 [ pkcs11-module] ,
154161 [ AS_HELP_STRING ( [ --with-pkcs11-module] , [ default PKCS11 module] ) ] ,
@@ -226,6 +233,7 @@ AC_SUBST([SHARED_EXT], $(eval echo "${shrext_cmds}"))
226233AM_CONDITIONAL([ WIN32] , [ test "${WIN32}" = "yes"] )
227234AM_CONDITIONAL([ CYGWIN] , [ test "${CYGWIN}" = "yes"] )
228235AM_CONDITIONAL([ ENABLE_API_DOC] , [ test "${enable_api_doc}" = "yes"] )
236+ AM_CONDITIONAL([ ENABLE_STATIC_ENGINE] , [ test "${enable_static_engine}" = "yes"] )
229237
230238if test "${enable_pedantic}" = "yes"; then
231239 enable_strict="yes";
@@ -283,6 +291,7 @@ libp11 directory: $(eval eval eval echo "${libdir}")
283291Engine directory: ${enginesexecdir}
284292Default PKCS11 module: ${pkcs11_module}
285293API doc support: ${enable_api_doc}
294+ Static PKCS# 11 engine ${enable_static_engine}
286295
287296Host: ${host}
288297Compiler: ${CC}
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ EXTRA_DIST = Makefile.mak libp11.rc.in pkcs11.rc.in
66
77noinst_HEADERS = libp11-int.h pkcs11.h p11_pthread.h
88include_HEADERS = libp11.h p11_err.h
9+ if ENABLE_STATIC_ENGINE
910lib_LTLIBRARIES = libp11.la libpkcs11.la
11+ else
12+ lib_LTLIBRARIES = libp11.la
13+ endif
1014enginesexec_LTLIBRARIES = pkcs11.la
1115pkgconfig_DATA = libp11.pc
1216
@@ -49,12 +53,13 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS) $(OPENSSL_LIBS)
4953pkcs11_la_LDFLAGS = $(AM_LDFLAGS ) -module -shared -shrext $(SHARED_EXT ) \
5054 -avoid-version -export-symbols "$(srcdir ) /pkcs11.exports"
5155
56+ if ENABLE_STATIC_ENGINE
5257# Create a static version of the engine as well to allow applications
5358# to statically link into it.
54-
5559libpkcs11_la_SOURCES = $(pkcs11_la_SOURCES )
5660libpkcs11_la_CFLAGS = $(pkcs11_la_CFLAGS )
5761libpkcs11_la_LIBADD = $(pkcs11_la_LIBADD )
62+ endif
5863
5964# OpenSSL older than 1.1.0 expected libpkcs11.so instead of pkcs11.so
6065check-local : $(LTLIBRARIES )
You can’t perform that action at this time.
0 commit comments