[ghemical-devel] automake and MPQC ; Makefile.include ok?

Tommi Hassinen thassine@messi.uku.fi
Wed, 25 Aug 2004 14:41:58 +0300 (WET)


Hello,

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.

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)

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.

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. Trying to
use it will crash the program and pop out an error message like this one:

	writing MPQC-input file /tmp/mpqc0000.in
	using ProcMessageGrp as MessageGroup...
	using ProcThreadGrp as ThreadGroup...
	ClassDesc::load_class looking for "./classes"
	ClassDesc::load_class("CLHF"): load failed
	Either "CLHF" is an invalid class name or the code
	for "CLHF" was not linked into the executable.

Ok, this is a good start anyway, need to look at this later.

Regards,

	Tommi