File openssl_tpm_engine-somodule.patch of Package openssl_tpm_engine

--- Makefile.in.orig
+++ Makefile.in
@@ -208,6 +208,7 @@ openssl_enginedir = @libdir@/openssl/eng
 libtpm_la_LIBADD = -L@OPENSSL_LIB_DIR@ -lcrypto -lc
 libtpm_la_CFLAGS = -I@OPENSSL_INCLUDE_DIR@
 libtpm_la_SOURCES = e_tpm.c e_tpm.h e_tpm_err.c
+libtpm_la_LDFLAGS=-avoid-version -module
 create_tpm_key_SOURCES = create_tpm_key.c
 create_tpm_key_LDADD = -ltspi
 all: all-recursive
--- Makefile.am.orig
+++ Makefile.am
@@ -1,14 +1,17 @@
+ACLOCAL_AMFLAGS = -I m4
 SUBDIRS=. test
 
 EXTRA_DIST = README  openssl.cnf.sample
 
 openssl_engine_LTLIBRARIES=libtpm.la
 bin_PROGRAMS=create_tpm_key
-openssl_enginedir=@libdir@/openssl/engines
+openssl_enginedir=@libdir@/engines
 
-libtpm_la_LIBADD=-L@OPENSSL_LIB_DIR@ -lcrypto -lc
+libtpm_la_LDFLAGS= -no-undefined -avoid-version
+libtpm_la_LIBADD= -lcrypto
 libtpm_la_CFLAGS=-I@OPENSSL_INCLUDE_DIR@
 libtpm_la_SOURCES=e_tpm.c e_tpm.h e_tpm_err.c
 
 create_tpm_key_SOURCES=create_tpm_key.c
-create_tpm_key_LDADD=-ltspi
+create_tpm_key_LDADD=-ltspi -lcrypto
+
--- configure.in.orig
+++ configure.in
@@ -3,7 +3,8 @@
 #
 
 AC_INIT(openssl-tpm-engine, 0.4.1, trousers-users@lists.sf.net)
-AM_INIT_AUTOMAKE(1.6.3)
+AM_INIT_AUTOMAKE(1.6.3 foreign)
+AC_CONFIG_MACRO_DIR([m4])
 
 # Debugging support
 AC_ARG_ENABLE(debug,
@@ -45,7 +46,10 @@ AC_ARG_WITH(openssl,
 	 AC_SUBST(OPENSSL_INCLUDE_DIR)])
 
 AC_DISABLE_STATIC
-AC_PROG_CC
+AC_PROG_CC_STDC
+AM_PROG_CC_C_O
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 AC_PROG_LIBTOOL
 
 CFLAGS="$CFLAGS -Wall"