From ad1f365d71ac8a80b8c83f41d35d35a1ef57378c Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 8 Jul 2022 21:39:45 +0200 Subject: [PATCH] lib-symbol-visibility: Improve documentation. * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet suggested by Bruno Haible. --- ChangeLog | 6 ++++++ doc/lib-symbol-visibility.texi | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 75d24781c2..a82e76ed00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-07-08 Simon Josefsson + + lib-symbol-visibility: Improve documentation. + * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet + suggested by Bruno Haible. + 2022-07-04 Bruno Haible havelib: Fix 'configure --help' output. diff --git a/doc/lib-symbol-visibility.texi b/doc/lib-symbol-visibility.texi index 9574e439dd..d8e63895d3 100644 --- a/doc/lib-symbol-visibility.texi +++ b/doc/lib-symbol-visibility.texi @@ -181,3 +181,13 @@ the definition of the macro mentioned above, to something like this: Here @code{BUILDING_SHARED} is a C macro that you have to define. It ought to evaluate to 1 in a build configured with @samp{--enable-shared}, or to 0 in a build configured with @samp{--disable-shared}. +You may use the following @samp{configure.ac} snippet: + +@smallexample + if test "$enable_shared" = yes; then + shared=1 + else + shared=0 + fi + AC_DEFINE_UNQUOTED([BUILDING_SHARED], [$shared], [Define when --enable-shared is used.]) +@end smallexample -- 2.39.5