From 99303a24e3d6f5d299c2a0233b172caf3d2dadc3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 6 Jul 2010 11:33:51 +0000 Subject: [PATCH] Let configure perform linker test with --version-script if enabled --- libburn/trunk/acinclude.m4 | 15 +++++++++++++++ libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/configure.ac | 15 ++++++++------- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/libburn/trunk/acinclude.m4 b/libburn/trunk/acinclude.m4 index d4236d1e..48f865ee 100644 --- a/libburn/trunk/acinclude.m4 +++ b/libburn/trunk/acinclude.m4 @@ -42,6 +42,21 @@ AC_DEFUN([TARGET_SHIZZLE], ]) +dnl LIBBURN_ASSERT_VERS_LIBS is by Thomas Schmitt, libburnia project +dnl It tests whether -Wl,--version-script=... works with the compiler +AC_DEFUN([LIBBURN_ASSERT_VERS_LIBS], +[ + libburnia_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--version-script=libburn/libburn.ver" + AC_TRY_LINK([#include ], [printf("Hello\n");], + [vers_libs_test="yes"], [vers_libs_test="no"]) + if test x$vers_libs_test = xno + then + LDFLAGS="$libburnia_save_LDFLAGS" + fi +]) + + dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file. dnl Important: Must be performed _after_ TARGET_SHIZZLE dnl diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index bda32214..196c3ff2 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.07.04.170035" +#define Cdrskin_timestamP "2010.07.06.113304" diff --git a/libburn/trunk/configure.ac b/libburn/trunk/configure.ac index 1f78554f..5e3f1880 100644 --- a/libburn/trunk/configure.ac +++ b/libburn/trunk/configure.ac @@ -247,17 +247,18 @@ dnl ts B00704 # Since libburn obeys strict ABI backward compatibility, it needs only the # simple feature to declare function names "global:" or "local:". Only the # global ones are visible to applications at library load time. -dnl -dnl >>> TODO: -dnl >>> make an actual try whether -Wl,--version-script=libburn/libburn.ver -dnl >>> is accepted by the compiler -dnl AC_ARG_ENABLE(versioned-libs, [ --enable-versioned-libs Enable strict symbol encapsulation , default=yes], , enable_versioned_libs=yes) if test x$enable_versioned_libs = xyes; then - LDFLAGS="$LDFLAGS -Wl,--version-script=libburn/libburn.ver" - echo "enabled strict symbol encapsulation" + vers_libs_test=no + LIBBURN_ASSERT_VERS_LIBS + if test x$vers_libs_test = xno + then + echo "disabled strict symbol encapsulation (test failed)" + else + echo "enabled strict symbol encapsulation" + fi else echo "disabled strict symbol encapsulation" fi