diff options
author | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2012-01-22 19:50:36 +0000 |
---|---|---|
committer | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2012-01-22 19:50:36 +0000 |
commit | b326998fc29c4015079c963c62caf7b9d2d1f125 (patch) | |
tree | 321bd044c1dd83e355eb377465fa4676d9d133af /configure.ac | |
parent | 306ae2fb9f34f813fb4a81c9cfcb9512429fa5c1 (diff) | |
download | libtiff-git-b326998fc29c4015079c963c62caf7b9d2d1f125.tar.gz |
* configure.ac: Add support for using library symbol versioning on
ELF systems with the GNU linker. Support is enabled via
--enable-ld-version-script. Disabled by default for now until
there is a decision for how to deploy a libtiff with versioned
symbols after libtiff 4.0.0 was already released.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index da8e6a56..30d7c065 100644 --- a/configure.ac +++ b/configure.ac @@ -112,6 +112,37 @@ VL_PROG_CC_WARNINGS() AC_PROG_INSTALL AC_PROG_LN_S + +# Check if LD supports linker scripts, and define automake conditional +# HAVE_LD_VERSION_SCRIPT if so. This functionality is currently +# constrained to compilers using GNU ld on ELF systems or systems +# which provide an adequate emulation thereof. +AC_ARG_ENABLE([ld-version-script], + AS_HELP_STRING([--enable-ld-version-script], + [enable linker version script (default is disabled)]), + [have_ld_version_script=$enableval], [have_ld_version_script=no]) +if test "$have_ld_version_script" != no; then + AC_MSG_CHECKING([if LD -Wl,--version-script works]) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + cat > conftest.map <<EOF +VERS_1 { + global: sym; +}; + +VERS_2 { + global: sym; +} VERS_1; +EOF + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [have_ld_version_script=yes], [have_ld_version_script=no]) + rm -f conftest.map + LDFLAGS="$save_LDFLAGS" + AC_MSG_RESULT($have_ld_version_script) +fi +AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") + + dnl Tests for Windows AC_EXEEXT AC_OBJEXT @@ -967,6 +998,7 @@ LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}]) LOC_MSG([ C compiler: ${CC} ${CFLAGS}]) LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}]) LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}]) +LOC_MSG([ Enable linker symbol versioning: ${have_ld_version_script}]) LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}]) LOC_MSG([ Use win32 IO: ${win32_io_ok}]) LOC_MSG() |