diff --git a/.gitignore b/.gitignore index 7d7b256e..f206a21e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ doc/qpdf.1 doc/zlib-flate.1 examples/build/ external-libs +libqpdf.map libqpdf.pc libqpdf/build/ libqpdf/qpdf/qpdf-config.h diff --git a/Makefile b/Makefile index e882672b..5de0c05f 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ distclean: clean $(RM) manual/html.xsl $(RM) manual/print.xsl $(RM) doc/*.1 - $(RM) libqpdf.pc + $(RM) libqpdf.pc libqpdf.map maintainer-clean: distclean $(RM) configure doc/qpdf-manual.* libqpdf/qpdf/qpdf-config.h.in diff --git a/autoconf.mk.in b/autoconf.mk.in index 9d7a65e8..3fd75082 100644 --- a/autoconf.mk.in +++ b/autoconf.mk.in @@ -1,5 +1,8 @@ PACKAGE_TARNAME=@PACKAGE_TARNAME@ PACKAGE_VERSION=@PACKAGE_VERSION@ +LT_CURRENT=@LT_CURRENT@ +LT_REVISION=@LT_REVISION@ +LT_AGE=@LT_AGE@ top_builddir=@top_builddir@ prefix=@prefix@ exec_prefix=@exec_prefix@ diff --git a/configure.ac b/configure.ac index fd271214..36119999 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_FILES([autoconf.mk]) AC_CONFIG_FILES([manual/html.xsl manual/print.xsl]) AC_CONFIG_FILES([libqpdf.pc]) +AC_CONFIG_FILES([libqpdf.map]) AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h]) AC_PROG_CC @@ -16,6 +17,25 @@ AC_PROG_CXX AC_HEADER_STDC LT_INIT([win32-dll]) +# * If any interfaces have been removed or changed, or if any private +# member variables or virtual functions have been added to any +# class, we are not binary compatible. Increment LT_CURRENT, and set +# LT_AGE and LT_REVISION to 0. +# +# * Otherwise, if any interfaces have been added since the last public +# release, then increment LT_CURRENT and LT_AGE, and set LT_REVISION +# to 0. +# +# * Otherwise, increment LT_REVISION + +# LT = libtool +LT_CURRENT=17 +LT_REVISION=0 +LT_AGE=0 +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) + AC_ARG_ENABLE(insecure-random, AS_HELP_STRING([--enable-insecure-random], [whether to use stdlib's random number generator (default is no)]), diff --git a/libqpdf.map b/libqpdf.map deleted file mode 100644 index 548dcb4d..00000000 --- a/libqpdf.map +++ /dev/null @@ -1,4 +0,0 @@ -LIBQPDF_17 { - global: - *; -}; diff --git a/libqpdf.map.in b/libqpdf.map.in new file mode 100644 index 00000000..68ab12cb --- /dev/null +++ b/libqpdf.map.in @@ -0,0 +1,4 @@ +LIBQPDF_@LT_CURRENT@ { + global: + *; +}; diff --git a/libqpdf/build.mk b/libqpdf/build.mk index e8561128..b8cf1dbc 100644 --- a/libqpdf/build.mk +++ b/libqpdf/build.mk @@ -81,36 +81,5 @@ $(CCOBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.cc $(COBJS_libqpdf): libqpdf/$(OUTPUT_DIR)/%.$(LOBJ): libqpdf/%.c $(call c_libcompile,$<,$(INCLUDES_libqpdf)) -# Last three arguments to makelib are CURRENT,REVISION,AGE. -# -# * If any interfaces have been removed or changed, we are not binary -# compatible. Increment CURRENT, and set AGE and REVISION to 0. -# Also update libqpdf.map, changing the numeric portion to match -# CURRENT. -# -# * Otherwise, if any interfaces have been added since the last -# public release, then increment CURRENT and AGE, and set REVISION -# to 0. -# -# * Otherwise, increment REVISION - -CURRENT := 17 -REVISION := 0 -AGE := 0 -$(TARGETS_libqpdf): $(OBJS_libqpdf) libqpdf/$(OUTPUT_DIR)/checkmap_libqpdf-$(CURRENT).stamp - $(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(CURRENT),$(REVISION),$(AGE)) - -libqpdf/$(OUTPUT_DIR)/checkmap_libqpdf-$(CURRENT).stamp: libqpdf.map - @if [ $$(head -1 libqpdf.map | awk '{print $$1}') = LIBQPDF_$(CURRENT) ]; then \ - touch $@; \ - else \ - echo ''; \ - echo '****'; \ - echo libqpdf.map is out of date; \ - echo first line should contain LIBQPDF_$(CURRENT); \ - echo '****'; \ - echo ''; \ - rm -f $@; \ - false; \ - fi - +$(TARGETS_libqpdf): $(OBJS_libqpdf) + $(call makelib,$(OBJS_libqpdf),$@,$(LDFLAGS),$(LIBS),$(LT_CURRENT),$(LT_REVISION),$(LT_AGE))