The attached patch simplifies the Makefile.am support for building the
nsplugin. Beside removing the recursion inside npincludes (unneeded),
and avoiding entering the directory entirely when nsplugin is disabled,
it also avoids building the static copy of the plugin itself (see [1])
and at the same time installs it directly inside the nsplugin directory,
rather than sing a symlink (and “polluting” the main library path).

HTH,

[1]
http://www.flameeyes.eu/autotools-mythbuster/libtool/index.html#libtool.plugins.dlopen

-- 
Diego Elio Pettenò — “Flameeyes”
http://blog.flameeyes.eu/

If you found a .asc file in this mail and know not what it is,
it's a GnuPG digital signature: http://www.gnupg.org/

Index: opensc-0.11.10/configure.ac
===================================================================
--- opensc-0.11.10.orig/configure.ac
+++ opensc-0.11.10/configure.ac
@@ -724,7 +724,6 @@ AC_CONFIG_FILES([
 	src/pkcs15init/Makefile
 	src/scconf/Makefile
 	src/signer/Makefile
-	src/signer/npinclude/Makefile
 	src/tests/Makefile
 	src/tests/regression/Makefile
 	src/tools/Makefile
Index: opensc-0.11.10/src/Makefile.am
===================================================================
--- opensc-0.11.10.orig/src/Makefile.am
+++ opensc-0.11.10/src/Makefile.am
@@ -3,4 +3,8 @@ EXTRA_DIST = Makefile.mak
 
 # Order IS important
 SUBDIRS = common include scconf libopensc pkcs15init pkcs11 \
-	tests tools openssh signer 
+	tests tools openssh
+
+if ENABLE_NSPLUGIN
+SUBDIRS += signer
+endif
Index: opensc-0.11.10/src/signer/Makefile.am
===================================================================
--- opensc-0.11.10.orig/src/signer/Makefile.am
+++ opensc-0.11.10/src/signer/Makefile.am
@@ -1,27 +1,18 @@
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 
-SUBDIRS = npinclude
-if ENABLE_NSPLUGIN
-noinst_HEADERS = opensc-crypto.h opensc-support.h signer.h 
-lib_LTLIBRARIES = opensc-signer.la
-dist_noinst_DATA = testprog.c
-endif
+plugin_LTLIBRARIES = opensc-signer.la
+EXTRA_DIST = testprog.c
 
 AM_CFLAGS = $(OPENSSL_CFLAGS) $(LIBASSUAN_CFLAGS)
 INCLUDES = -I$(srcdir)/npinclude -I$(top_builddir)/src/include
 
 opensc_signer_la_CFLAGS = $(AM_CFLAGS) -DXP_UNIX
-opensc_signer_la_SOURCES = opensc-crypto.c opensc-support.c signer.c stubs.c dialog.c \
-	signer.exports
+opensc_signer_la_SOURCES = opensc-crypto.c opensc-support.c signer.c dialog.c \
+	signer.exports opensc-crypto.h opensc-support.h signer.h \
+	npinclude/jri.h npinclude/jri_md.h npinclude/jritypes.h npinclude/npapi.h \
+	npinclude/npunix.c npinclude/npupp.h
 opensc_signer_la_LIBADD = $(OPENSSL_LIBS) $(LIBASSUAN_LIBS) \
 	$(top_builddir)/src/libopensc/libopensc.la
 opensc_signer_la_LDFLAGS = $(AM_LDFLAGS) \
 	-export-symbols "$(srcdir)/signer.exports" \
-	-module -avoid-version -no-undefined
-
-if ENABLE_NSPLUGIN
-plugin_DATA=#Create directory
-install-exec-hook:	install-pluginDATA
-	-rm -f "$(DESTDIR)$(plugindir)/opensc-signer.so"
-	$(LN_S) "$(libdir)/opensc-signer.so" "$(DESTDIR)$(plugindir)"
-endif
+	-module -avoid-version -no-undefined -shared
Index: opensc-0.11.10/src/signer/npinclude/Makefile.am
===================================================================
--- opensc-0.11.10.orig/src/signer/npinclude/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-
-noinst_HEADERS = jri.h jri_md.h jritypes.h npapi.h npunix.c npupp.h
Index: opensc-0.11.10/src/signer/stubs.c
===================================================================
--- opensc-0.11.10.orig/src/signer/stubs.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: C; tab-width: 4; -*- */
-/*******************************************************************************
- * Simple LiveConnect Sample Plugin
- * Copyright (c) 1996 Netscape Communications. All rights reserved.
- ******************************************************************************/
-
-/*
-** Ok, so we don't usually include .c files (only .h files) but we're
-** doing it here to avoid some fancy make rules. First pull in the common
-** glue code:
-*/
-#ifdef XP_UNIX
-#include "npunix.c"
-#endif
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to