Let configure perform linker test with --version-script if enabled
This commit is contained in:
parent
fe45249e9e
commit
e60171986b
15
acinclude.m4
15
acinclude.m4
@ -131,6 +131,21 @@ iconv_close(cd);
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl LIBISOFS_ASSERT_VERS_LIBS is by Thomas Schmitt, libburnia project
|
||||||
|
dnl It tests whether -Wl,--version-script=... works with the compiler
|
||||||
|
AC_DEFUN([LIBISOFS_ASSERT_VERS_LIBS],
|
||||||
|
[
|
||||||
|
libburnia_save_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--version-script=libisofs/libisofs.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 determines the install directory for the *.pc file.
|
dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file.
|
||||||
dnl Important: Must be performed _after_ TARGET_SHIZZLE
|
dnl Important: Must be performed _after_ TARGET_SHIZZLE
|
||||||
dnl
|
dnl
|
||||||
|
@ -218,8 +218,14 @@ 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=libisofs/libisofs.ver"
|
vers_libs_test=no
|
||||||
|
LIBISOFS_ASSERT_VERS_LIBS
|
||||||
|
if test x$vers_libs_test = xno
|
||||||
|
then
|
||||||
|
echo "disabled strict symbol encapsulation (test failed)"
|
||||||
|
else
|
||||||
echo "enabled strict symbol encapsulation"
|
echo "enabled strict symbol encapsulation"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "disabled strict symbol encapsulation"
|
echo "disabled strict symbol encapsulation"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user