From 6d9f77acd097b4370c9808c3827ce1bc8a6181e0 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 8 Jun 2009 10:32:54 +0000 Subject: openbscdefines.h: Add header file to control visibility of symbols Add the hooks/configure detection to compile everything with -fvisibility=hidden and then make certain symbols visible. This will be used to make parts of the API public. There are no users yet but we should have some soon. --- configure.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 7bc8b63a4..b886e7ac1 100644 --- a/configure.in +++ b/configure.in @@ -18,6 +18,21 @@ AC_HEADER_STDC dnl Checks for typedefs, structures and compiler characteristics +# The following test is taken from WebKit's webkit.m4 +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden " +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([char foo;], + [ AC_MSG_RESULT([yes]) + SYMBOL_VISIBILITY="-fvisibility=hidden"], + AC_MSG_RESULT([no])) +CFLAGS="$saved_CFLAGS" +AC_SUBST(SYMBOL_VISIBILITY) + + +dnl Generate the output +AM_CONFIG_HEADER(bscconfig.h) + AC_OUTPUT( openbsc.pc include/openbsc/Makefile -- cgit v1.2.3