On Sun, 30 Jan 2000, Karl Nelson wrote:

> > 
> > An extremely annoying thing about libsigc++ is that is doesn't support
> > VPATH compiles.  So it has broken those for LyX unless you use an external
> > library.
> 
> Not sure what a VPATH compile is.  Care to clue me in?
> (I know autoconf well, automake poorly, and rpm/deb not at all.)

using libsigc++ cvs repository as an example for the rest of this email:

cd libsigc++ ; ./autogen.sh 
cd ../obj-libsigc++ ; ../libsigc++/configure ; make

> > So if you try this and it fails don't blame me blame Karl.  Then get a cvs
> > copy of libsigc++ and fix it for Karl (and us).  We could probably hack
> > something up for the included library but I think that probably won't work
> > -- the main problem is the generation of the headers from the m4 code
> > needs to be done in the source dirs before you attempt to use the VPATH
> > compile otherwise they get generated into the directories you are building
> > in.  And those generated headers are broken because m4 can't find the
> > template.macros.m4 file.  Maybe we could just get autogen.sh to generate
> > the headers (both for us and for the full libsigc++).
> 
> You likely need to add a "-I $(top_srcdir)/sigc++/macros" or something
> to that effect in the Makefile.am. 

That will make m4 find the template.macros.m4 however the bigger problem
is that the generated headers are put into:
        obj-libsigc++/sigc++/
instead of
        libsigc++/sigc++

so the compiler can't find the generated headers even with a:
        -I$(top_srcdir) -I$(top_srcdir)/sigc++

> (This sounds like the usual builddir != srcdir stuff)  Just add -I in
> all places it isn't found and send a patch. 

Plenty of those -I's already.  There's a patch at the end.  Not pretty but
it makes libsigc++ compile and install okay when builddir != srcdir.

I'm testing lyx building now...  Nope, this patch doesn't work for LyX.
I get a "no rule to make target `slot.h'" using it with the lyx
subpackage.  I've gotta get back to my paid job now.  Will try more later.

Allan. (ARRae)

--- Makefile.am.orig    Mon Jan 31 14:07:37 2000
+++ Makefile.am Mon Jan 31 13:54:23 2000
@@ -23,8 +23,8 @@
     handle.h object.h scope.h adaptor.h thread.h
 
 
-%.h: macros/%.h.m4 macros/template.macros.m4        
-       m4 -Imacros $(DEFINES) $<  > $@
+%.h: $(top_srcdir)/sigc++/macros/%.h.m4 
+$(top_srcdir)/sigc++/macros/template.macros.m4        
+       m4 -I$(top_srcdir)/sigc++/macros $(DEFINES) $<  > $(top_srcdir)/sigc++/$@
 
 all-local: $(LTLIBRARIES) 
 

Reply via email to