summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Chow Loong Jin2014-10-03 13:31:48 +0200
committerGravatar Nikias Bassen2014-10-03 13:31:48 +0200
commitc0b6aede3d142caf4f7d5af9fbb3ec32efc6b57c (patch)
tree34c5e1978673abf72b551ca6fa216bf60bef61e3 /configure.ac
parent305450ad5fc9d8027a35a67f3136d81e4ecf74e2 (diff)
downloadlibusbmuxd-c0b6aede3d142caf4f7d5af9fbb3ec32efc6b57c.tar.gz
libusbmuxd-c0b6aede3d142caf4f7d5af9fbb3ec32efc6b57c.tar.bz2
Use -fvisibility=hidden to avoid exporting non-public symbols
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 93c01c5..09266fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,9 +81,14 @@ if test "x$win32" != "xtrue"; then
AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libusbmuxd])])
fi
-AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden")
AC_SUBST(GLOBAL_CFLAGS)
+case "$GLOBAL_CFLAGS" in
+ *-fvisibility=hidden*)
+ AC_DEFINE([HAVE_FVISIBILITY], [1], [Define if compiled with -fvisibility=hidden])
+esac
+
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_OUTPUT([