Let configure perform linker test with --version-script if enabled

This commit is contained in:
Thomas Schmitt 2010-07-06 11:41:46 +00:00
parent a58ca098b7
commit 050871e1f2
3 changed files with 24 additions and 9 deletions

View File

@ -193,6 +193,21 @@ AC_DEFUN([LIBBURNIA_ASSERT_READLINE],
]) ])
dnl LIBISOBURN_ASSERT_VERS_LIBS is by Thomas Schmitt, libburnia project
dnl It tests whether -Wl,--version-script=... works with the compiler
AC_DEFUN([LIBISOBURN_ASSERT_VERS_LIBS],
[
libburnia_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--version-script=libisoburn/libisoburn.ver"
AC_TRY_LINK([#include <stdio.h>], [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 is by Thomas Schmitt, libburnia project dnl LIBBURNIA_SET_PKGCONFIG is by Thomas Schmitt, libburnia project
dnl It determines the install directory for the *.pc file. dnl It determines the install directory for the *.pc file.
dnl Important: Must be performed _after_ TARGET_SHIZZLE dnl Important: Must be performed _after_ TARGET_SHIZZLE

View File

@ -251,22 +251,22 @@ else
fi fi
AC_SUBST(XORRISO_DVD_OBS_64K) AC_SUBST(XORRISO_DVD_OBS_64K)
dnl ts B00705
# Library versioning normally serves a complex purpose. # Library versioning normally serves a complex purpose.
# Since libisoburn obeys strict ABI backward compatibility, it needs only the # Since libisoburn obeys strict ABI backward compatibility, it needs only the
# simple feature to declare function names "global:" or "local:". Only the # simple feature to declare function names "global:" or "local:". Only the
# global ones are visible to applications at library load time. # 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, AC_ARG_ENABLE(versioned-libs,
[ --enable-versioned-libs Enable strict symbol encapsulation , default=yes], [ --enable-versioned-libs Enable strict symbol encapsulation , default=yes],
, enable_versioned_libs=yes) , enable_versioned_libs=yes)
if test x$enable_versioned_libs = xyes; then if test x$enable_versioned_libs = xyes; then
LDFLAGS="$LDFLAGS -Wl,--version-script=libisoburn/libisoburn.ver" vers_libs_test=no
echo "enabled strict symbol encapsulation" LIBISOBURN_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 else
echo "disabled strict symbol encapsulation" echo "disabled strict symbol encapsulation"
fi fi

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.07.05.122901" #define Xorriso_timestamP "2010.07.06.114102"