[glib] Add --disable-Bsymbolic flag
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add --disable-Bsymbolic flag
- Date: Mon, 5 Jul 2010 17:10:15 +0000 (UTC)
commit 48881bad99807381afcb55137eced4d7c50ac5a7
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Jul 5 13:10:28 2010 -0400
Add --disable-Bsymbolic flag
configure.in | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/configure.in b/configure.in
index fd9d0c4..437d34b 100644
--- a/configure.in
+++ b/configure.in
@@ -3638,16 +3638,25 @@ dnl
dnl Check for -Bsymbolic-functions linker flag used to avoid
dnl intra-library PLT jumps, if available.
dnl
-SAVED_LDFLAGS="${LDFLAGS}"
-AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
-LDFLAGS=-Wl,-Bsymbolic-functions
-AC_TRY_LINK([], [int main (void) { return 0; }],
- GLIB_LINK_FLAGS=-Wl[,]-Bsymbolic-functions
- AC_MSG_RESULT(yes),
- GLIB_LINK_FLAGS=
- AC_MSG_RESULT(no))
+
+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}"])
+
+if test "x${enable_Bsymbolic}" == "xyes"; then
+ GLIB_LINK_FLAGS=-Wl,-Bsymbolic-functions
+fi
+
AC_SUBST(GLIB_LINK_FLAGS)
-LDFLAGS="${SAVED_LDFLAGS}"
AC_CONFIG_FILES([
glib-2.0.pc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]