Index: .fossil-settings/ignore-glob ================================================================== --- .fossil-settings/ignore-glob +++ .fossil-settings/ignore-glob @@ -1,9 +1,10 @@ .tmp Makefile aclocal.m4 autom4te.cache +build/work config.guess config.log config.status config.sub configure Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -15,10 +15,12 @@ tclpkcs11.o: $(srcdir)/tclpkcs11.c $(srcdir)/pkcs11.h $(srcdir)/pkcs11f.h $(srcdir)/pkcs11t.h $(CC) $(CPPFLAGS) $(CFLAGS) -o tclpkcs11.o -c $(srcdir)/tclpkcs11.c tclpkcs11.@SHOBJEXT@: tclpkcs11.o $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tclpkcs11.@SHOBJEXT@ tclpkcs11.o $(LIBS) + -@WEAKENSYMS@ @EXTENSION_TARGET@ + -@REMOVESYMS@ @EXTENSION_TARGET@ install: tclpkcs11.@SHOBJEXT@ pkgIndex.tcl $(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" $(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" $(INSTALL) -m 0755 tclpkcs11.@SHOBJEXT@ "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -9,11 +9,25 @@ dnl Determine system information DC_CHK_OS_INFO dnl Determine how to make shared objects -DC_GET_SHOBJFLAGS +if test "$TCLEXT_BUILD" != 'static'; then + dnl Determine how to make shared objects + DC_GET_SHOBJFLAGS + + EXTENSION_TARGET="tclpkcs11.${SHOBJEXT}" +else + dnl Hard-code the archive extension to be .a + AREXT='a' + AC_CHECK_TOOL([AR], [ar], [false]) + AC_CHECK_TOOL([RANLIB], [ranlib], [:]) + + EXTENSION_TARGET="tclpkcs11.${AREXT}" +fi +AC_SUBST(EXTENSION_TARGET) +AC_SUBST(TCLEXT_BUILD) dnl Find out if we have the functions needed to open shared objects AC_SEARCH_LIBS(dlopen, dl,, [ AC_SEARCH_LIBS(shl_load, dld dl) ]) @@ -23,7 +37,10 @@ AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h dlfcn.h dl.h) dnl Perform Tcl Extension required stuff TCLEXT_INIT +dnl Setup a stable ABI +DC_SETUP_STABLE_API([${srcdir}/tclpkcs11.vers], tclpkcs11.syms) + dnl Produce output -AC_OUTPUT(Makefile pkgIndex.tcl) +AC_OUTPUT(Makefile pkgIndex.tcl tclpkcs11.syms) ADDED tclpkcs11.syms.in Index: tclpkcs11.syms.in ================================================================== --- /dev/null +++ tclpkcs11.syms.in @@ -0,0 +1,1 @@ +@SYMPREFIX@Tclpkcs11_Init ADDED tclpkcs11.vers Index: tclpkcs11.vers ================================================================== --- /dev/null +++ tclpkcs11.vers @@ -0,0 +1,6 @@ +{ + global: + Tclpkcs11_Init; + local: + *; +};