From: Vincent Bernat Date: Tue, 16 Jun 2015 15:02:07 +0000 (+0200) Subject: build: use symbol versioning for liblldpctl X-Git-Tag: 0.7.16~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f571f2db1c71c9f5704366da69de3a4ad3c1db28;p=thirdparty%2Flldpd.git build: use symbol versioning for liblldpctl --- diff --git a/NEWS b/NEWS index a05fa361..7773fa85 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ lldpd (0.7.16) + * Features: + + Use symbol versioning for liblldpctl.so. * Fix: + Fix build on OS X. diff --git a/configure.ac b/configure.ac index 47d8d805..66821f44 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,7 @@ AM_PROG_AR # Configure libtool LT_INIT +gl_LD_VERSION_SCRIPT ####################### ### Checks diff --git a/m4/ld-version-script.m4 b/m4/ld-version-script.m4 new file mode 100644 index 00000000..f8b4a5c5 --- /dev/null +++ b/m4/ld-version-script.m4 @@ -0,0 +1,53 @@ +# ld-version-script.m4 serial 3 +dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# FIXME: The test below returns a false positive for mingw +# cross-compiles, 'local:' statements does not reduce number of +# exported symbols in a DLL. Use --disable-ld-version-script to work +# around the problem. + +# gl_LD_VERSION_SCRIPT +# -------------------- +# Check if LD supports linker scripts, and define automake conditional +# HAVE_LD_VERSION_SCRIPT if so. +AC_DEFUN([gl_LD_VERSION_SCRIPT], +[ + AC_ARG_ENABLE([ld-version-script], + AS_HELP_STRING([--enable-ld-version-script], + [enable linker version script (default is enabled when possible)]), + [have_ld_version_script=$enableval], []) + if test -z "$have_ld_version_script"; then + AC_MSG_CHECKING([if LD -Wl,--version-script works]) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + cat > conftest.map < conftest.map <