Hi Paul, > the gnulib code added quite a bit of of unnecessary work > to configure and build vasnprintf.o, printf-parse.o, printf-args.o, > and asnprintf.o. None of these object files were needed: they were put > into libgnu.a but were not used by anybody.
Additionally, when a shared library is built from libgnu.a, vasnprintf.o gets included and installed in public locations although it's not needed. > If an application uses vsnprintf, but does not use vasnprintf > directly, then there's no need to configure and build those .o files > on hosts that have a working vsnprintf. I'd like to fix gnulib to > avoid this work. Yes, this is a long-standing deficiency of gnulib. > One way that comes to mind is to modify modules/vsnprintf so that it > depends on a new module (modules/vasnprintf-if, say), which acts like > modules/vasnprintf but does not put gl_FUNC_VASNPRINTF into > configure.ac. Most of the contents of modules/vasnprintf would be > moved into modules/vasnprintf-if. Then, gl_REPLACE_VSNPRINTF could > invoke gl_FUNC_VASNPRINTF. I believe the solution should be in gnulib-tool proper, and would involve extending the syntax of the 'Dependencies' section in the module description. But I have never been able to work out the details. Maybe if you present a complete patch for the vasnprintf case, it will show in the daylight how gnulib-tool should perform this extended dependency tracking? Bruno -- In memoriam Siegfried Buback <http://en.wikipedia.org/wiki/Siegfried_Buback>
