On Mon, Feb 9, 2009 at 9:55 AM, Derek Gaston <[email protected]> wrote:
> So it looks like we only snoop petscconf in our Makefile(.in).  Should I
> just snoop for HYPRE_LIB there and add a -DPETSC_HAS_HYPRE to our compile
> line?  Or should I go snoop petscconf manually during configure so a #define
> can get set in libmesh_configure.h?

Short answer: check out aclocal.m4 around line 869.  We just use grep
and sed to figure out what the petsc version is during configure.  You
could probably do the same for HYPRE_foo...

Long answer:
So, this is a really good question.  Right now we just blanket-include
petscconf in our Makefile as you have seen.  (As of 3.0.x this changed
again anyway to petscvariables...sigh)  This has a couple potential
drawbacks.  One is that, if there are any variables set incorrectly in
petscconf, for example $(AR) or some other system thing, we inherit
those errors in our Makefile.  The other problem is that we can't do
anything very clever during configure since
petsconf/variables/whatever only comes in at the Makefile stage.

There are some potential workarounds for this, for example petsc used
to have a 'make getlinklibs' or some such make target which would give
you this stuff.  A big problem with that was a 'make install' of PETSc
didn't always include the Makefile, so we couldn't rely on it, etc.
Someone with a lot of time could probably write a really good
configure test (backwards compatible of course) which would grab any
and all PETSc variables from the petscconf and related files.  This
way we would also not have to hard code the petsc link libraries as is
done at line 488 of Make.common.in...

-- 
John

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to