On Wed, Aug 25, 2004 at 02:41:58PM +0300, Tommi Hassinen wrote: > the automake stuff seems to work fine now in the normal case, but I had > some trouble with the --enable-mpqc option of the configure script. I have > a solution but tell me if you know it has any problems. mpqc should just have a .pc file I guess. > So at src/Makefile.am there was (and still is) a line > > libghemical_INCLUDES = -I$(top_builddir)/src @SC_CPPFLAGS@ > > but it does not add SC_CPPFLAGS into the commandline. Looking at > Makefile.in it is seen that CXXCOMPILE will contain all the stuff that > goes into the commandline: > > CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) > $(AM_CXXFLAGS) $(CXXFLAGS) Usually, this should just work and be easy in automake. I'm currently again fiddling around with checking out CVS, because I can never figure out which branch I should look at :-/ > I found out that a one way to add something in Makefile.in with automake > is a Makefile.include file that is included at Makefile.am ; my > Makefile.include is > > INCLUDES += @SC_CPPFLAGS@ > > that adds SC_CPPFLAGS into INCLUDES and eventually into CXXCOMPILE, which > is enough to make libghemical compile. I don't think you absolutely need to include this file, can't you just add the INCLUDES to Makefile.am directly? > Then, linking the final ghemical executable has some other issues. It > appears that only the static library has the MPQC code added ; perhaps > that is how the shared libs are inteded to work but now the executable > linked into libghemical.so won't contain all of the MPQC code. Hmm, I think the Debian ghemical package is linked dynamically to libsc, I'm not sure right now though. Michael