aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexandros Frantzis <alexandros.frantzis@canonical.com>2017-03-10 14:25:27 +0200
committerAlexandros Frantzis <alexandros.frantzis@canonical.com>2017-03-13 14:27:39 +0200
commit13d165de9e737cec750a2ab3d1ef68bb3f276c48 (patch)
tree312cdee0255f8a5c7b48e87956b0a246defc1ee6 /configure.ac
parenta69bc9de75fe08f5fe7ad6e2339dfc5b0da5d8ef (diff)
downloadprotobuf-13d165de9e737cec750a2ab3d1ef68bb3f276c48.tar.gz
protobuf-13d165de9e737cec750a2ab3d1ef68bb3f276c48.tar.bz2
protobuf-13d165de9e737cec750a2ab3d1ef68bb3f276c48.zip
Hide unnecessary exported library symbols
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6d9c2a01..531e25fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,25 @@ ACX_CHECK_SUNCC
# to the link
AC_PROG_LIBTOOL
+# Check whether the linker supports version scripts
+AC_MSG_CHECKING([whether the linker supports version scripts])
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+cat > conftest.map <<EOF
+{
+ global:
+ main;
+ local:
+ *;
+};
+EOF
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([int main() { return 0; }])],
+ [have_ld_version_script=yes; AC_MSG_RESULT(yes)],
+ [have_ld_version_script=no; AC_MSG_RESULT(no)])
+LDFLAGS=$save_LDFLAGS
+AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"])
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h])