build: Allow disabling linking with -Bsymbolic

Some debugging tools might require full visibility for the Clutter
symbols; for this reason, and to match what the Clutter dependencies
already allow, we should provide a configure switch to disable linking
with the -Bsymbolic flag.
This commit is contained in:
Emmanuele Bassi 2010-09-03 13:55:07 +01:00
parent 3e74f42f07
commit 6c1559b611
2 changed files with 25 additions and 13 deletions

3
README
View File

@ -153,6 +153,9 @@ Clutter has additional command line options for the configure script:
--enable-conform=[yes/no]
Build the Clutter conformance test suite.
--disable-Bsymbolic
Disable linking with -Bsymbolic.
--with-flavour=[glx/eglx/eglnative/osx/win32/fruity]
Select the Clutter backend: (default=glx)

View File

@ -100,19 +100,28 @@ AM_PATH_GLIB_2_0([2.18.0], [have_glib=yes], [have_glib=no],
AS_IF([test "x$have_glib" = "xno"], AC_MSG_ERROR([glib-2.0 is required]))
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
clutter_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_TRY_LINK([], [int main (void) { return 0; }],
[
CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions
AC_MSG_RESULT([yes])
],
[
CLUTTER_LINK_FLAGS=
AC_MSG_RESULT([no])
])
LDFLAGS="${clutter_LDFLAGS}"
AC_ARG_ENABLE([Bsymbolic],
[AC_HELP_STRING([--disable-Bsymbolic],
[Avoid linking with -Bsymbolic])],
[],
[
saved_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_TRY_LINK([], [int main (void) { return 0; }],
[
AC_MSG_RESULT([yes])
enable_Bsymbolic=yes
],
[
AC_MSG_RESULT([no])
enable_Bsymbolic=no
])
LDFLAGS="${saved_LDFLAGS}"
])
AS_IF([test "x$enable_Bsymbolic" = "xyes"],
[CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
AC_SUBST(CLUTTER_LINK_FLAGS)
dnl ========================================================================