Ralf, > would it be possible > to generalize gnulib or gnulib-tool so that a developer can state "I > would like to use bits of gnulib from several places in a package > hierarchy. Place i needs module set m_i, please dump the union of all > m_i into the "lib" and "m4" directories, and tell me what to put into > each of the configure.ac and Makefile.am files, and what side conditions > I need to fulfill." I think Sam's request went along this direction, > too.
One supported way to "use gnulib from several places in a package" is that the user combines the modules he wants to use in a single list, and invoke gnulib-tool once. Simple and painless. Another supported way to "use gnulib from several places in a package" is in different subdirectories of the package, where the subdirectories are independent, that is, no subdirectory uses -I options that point to the other subdirectory. Works fine, with one constraint: Each subdirectory needs to have a separate 'configure.ac' file. Sam's situation is more complicated: he wants to use gnulib in the core part of clisp, and in several add-on modules that each depend on the core. Even though he has a separate configure.ac part for each, there is the problem if you have, say, unistd.h instantiated multiple times, with slightly different content but with the same include guard. Sam solves this by hacking the include guard macro. I think there may also be other problems that we don't know about. Bruno