On Wed, Aug 25, 2004 at 04:03:47PM +0300, Tommi Hassinen wrote: > In libghemical CVS there are no branches. Argh, of course :) > > > 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? > > Ok, actually it seems to work directly as well, without including. Another thing: Did you try adding @SC_CPPFLAGS@ to libghemical_CPPFLAGS? This is from the automake manual: `INCLUDES' This does the same job as `AM_CPPFLAGS' (or any per-target `_CPPFLAGS' variable if it is used). It is an older name for the same functionality. This variable is deprecated; we suggest using `AM_CPPFLAGS' and per-target `_CPPFLAGS' instead. > Generally, is there an option in configure-scripts or somewhere else that > one can use to select whether a static or a dynamic library is used if > both of them are available? If there is one could just use something like > > ./configure --enable-mpqc --use_libghemical.a > > when configuring the ghemical app. I'm not aware of such a thing. By default, dynamically linked executables are produces on GNU/Linux I think. Other systems might have other defaults, this is why libtool exists, which knows about this. You can add -static to the libfoo_LDFLAGS (perhaps conditionally) to get static linking I think, but this will link in everything. Another possiblity would perhaps be to just specify the libSC*.a to libghemical_la_LDFLAGS and make sure the shared SC libraries do not get included in @LIBS@. This would get messy rather soon though I guess. Michael