Skip to content

Commit

Permalink
autotools: Use symbol versioning if possible
Browse files Browse the repository at this point in the history
The meson build already using it for:
mesonbuild/meson#3047

Suggested by Jan Alexander Steffens
  • Loading branch information
ueno committed Sep 11, 2019
1 parent bf18338 commit f773a39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ AC_USE_SYSTEM_EXTENSIONS
LT_PREREQ([2.2.6])
LT_INIT([dlopen disable-static])

dnl Check if -Wl,--version-script is supported by the linker
gl_LD_VERSION_SCRIPT

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
Expand Down
9 changes: 7 additions & 2 deletions p11-kit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ libp11_kit_la_CFLAGS = $(COMMON_CFLAGS)

libp11_kit_la_LDFLAGS = \
-no-undefined \
-version-info $(P11KIT_LT_RELEASE) \
-export-symbols-regex '^C_GetFunctionList|^p11_kit_'
-version-info $(P11KIT_LT_RELEASE)

if HAVE_LD_VERSION_SCRIPT
libp11_kit_la_LDFLAGS += -Wl,--version-script=$(srcdir)/p11-kit/libp11-kit.map
else
libp11_kit_la_LDFLAGS += -export-symbols-regex '^C_GetFunctionList|^p11_kit_'
endif

libp11_kit_la_SOURCES = \
p11-kit/proxy.c p11-kit/proxy.h p11-kit/proxy-init.c \
Expand Down

0 comments on commit f773a39

Please sign in to comment.