Make it easier to use the 'visibility' module.
authorBruno Haible <bruno@clisp.org>
Wed, 4 Mar 2009 11:04:32 +0000 (12:04 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 4 Mar 2009 11:04:32 +0000 (12:04 +0100)
ChangeLog
gnulib-tool
modules/visibility

index 86a7852..903ff80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-04  Bruno Haible  <bruno@clisp.org>
+
+       * modules/visibility (Makefile.am): Augment AM_CFLAGS.
+       * gnulib-tool (func_emit_lib_Makefile_am): Emit initialization of
+       AM_CFLAGS.
+       Reported by Simon Josefsson.
+
 2009-03-03  Bruno Haible  <bruno@clisp.org>
 
        * doc/visibility.texi: Recommend to use HAVE_VISIBILITY as a C macro.
index 5882c68..d47bb81 100755 (executable)
@@ -1932,6 +1932,7 @@ func_emit_lib_Makefile_am ()
   if test -z "$makefile_name"; then
     echo
     echo "AM_CPPFLAGS ="
+    echo "AM_CFLAGS ="
   fi
   echo
   if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}= *$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
index 33e5e68..a30249c 100644 (file)
@@ -10,6 +10,11 @@ configure.ac:
 gl_VISIBILITY
 
 Makefile.am:
+# The value of $(CFLAG_VISIBILITY) needs to be added to the CFLAGS for the
+# compilation of all sources that make up the library. This line here does it
+# only for the gnulib part of it. The developer is responsible for adding
+# $(CFLAG_VISIBILITY) to the Makefile.ams of the other portions of the library.
+AM_CFLAGS += $(CFLAG_VISIBILITY)
 
 Include: