* Tom Tromey wrote on Thu, Dec 02, 2004 at 01:41:30AM CET: > >>>>> "Roberto" == Roberto Bagnara <[EMAIL PROTECTED]> writes: > > Roberto> Can anyone point me to a C++ project that is working with > Roberto> precompiled headers and that is doing it with the currently > Roberto> available versions of automake and autoconf? > > >From the gcjx project on sourceforge: > > BUILT_SOURCES = [...] typedefs.hh.gch > > headers = [...] > > ## FIXME: need a better way to convince libtool to let us do this. > typedefs.hh.gch: $(headers) > -rm -f typedefs.hh.gch > $(CXXCOMPILE) -fPIC -DPIC -x c++-header -o typedefs.hh.gch > $(srcdir)/typedefs.hh > > > As you can see I had to hack around libtool. I didn't try a more > direct approach, perhaps it would have worked. > > Also, I always build this project with --disable-static.
The above will not work with newer libtool, I think. (Is your libtool modified to support c++-header?) In general, would it be interesting to enable this for both static and shared builds, right? The precompiled headers for both versions would look different, and thus have to be stored in different directories. Libtool would have to add something like `-I path/to/pch/in/.libs' or similar. Ugly. Other than that, libtool needs to detect .gch. I've heard of other compilers that support precompiled headers. How do they do this? I bet there are slight differences here, right? How does your project cope with compilers that do not support precompiled headers? Regards, Ralf