]> Savannah Git Hosting - gnulib.git/commitdiff
lib-symbol-visibility: Improve documentation.
authorSimon Josefsson <simon@josefsson.org>
Fri, 8 Jul 2022 19:39:45 +0000 (21:39 +0200)
committerSimon Josefsson <simon@josefsson.org>
Fri, 8 Jul 2022 19:39:45 +0000 (21:39 +0200)
* doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet
suggested by Bruno Haible.

ChangeLog
doc/lib-symbol-visibility.texi

index 75d24781c283043ae0887e7957e0cdfc2087032d..a82e76ed00959c343d7d09b72c9c076ea098f51a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-07-08  Simon Josefsson  <simon@josefsson.org>
+
+       lib-symbol-visibility: Improve documentation.
+       * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet
+       suggested by Bruno Haible.
+
 2022-07-04  Bruno Haible  <bruno@clisp.org>
 
        havelib: Fix 'configure --help' output.
index 9574e439ddc91417838ebd248fcf02ad002f2c29..d8e63895d36c6d41fa2a5527fb1092af8b05985b 100644 (file)
@@ -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