AX_CHECK_VSCRIPT
Check whether the linker supports version scripts. Version scripts are used when building shared libraries to bind symbols to version nodes (helping to detect incompatibilities) or to limit the visibility of non-public symbols.
Output:
If version scripts are supported, VSCRIPT_LDFLAGS will contain the appropriate flag to pass to the linker. On GNU systems this would typically be "-Wl,–version-script", and on Solaris it would typically be "-Wl,-M".
Two Automake conditionals are also set:
HAVE_VSCRIPT is true if the linker supports version scripts with entries that use simple wildcards, like "local: *".
HAVE_VSCRIPT_COMPLEX is true if the linker supports version scripts with pattern matching wildcards, like "global: Java_*".
On systems that do not support symbol versioning, such as Mac OS X, both conditionals will be false. They will also be false if the user passes "–disable-symvers" on the configure command line.
Example:
configure.ac:
AX_CHECK_VSCRIPT
Makefile.am:
if HAVE_VSCRIPT libfoo_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libfoo.map endif
if HAVE_VSCRIPT_COMPLEX libbar_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libbar.map endif
Download the latest version of ax_check_vscript.m4 or browse the macro’s revision history.
Copyright © 2014 Kevin Cernekee cernekee@gmail.com
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.