diff options
author | Holger Freyther <zecke@selfish.org> | 2009-06-08 10:32:54 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-06-08 10:32:54 +0000 |
commit | 6d9f77acd097b4370c9808c3827ce1bc8a6181e0 (patch) | |
tree | e27747798b89a7a3725c95fd495119f91f2a7475 /configure.in | |
parent | c7aa3c4f799dfd847ebfecb752ededa9d2f8ed1f (diff) |
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.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 15 insertions, 0 deletions
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 |