From: Simon Josefsson Date: Fri, 8 Jul 2022 19:39:45 +0000 (+0200) Subject: lib-symbol-visibility: Improve documentation. X-Git-Tag: v1.0~2249 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=ad1f365d71ac8a80b8c83f41d35d35a1ef57378c;p=gnulib.git lib-symbol-visibility: Improve documentation. * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet suggested by Bruno Haible. --- 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