[GRASS5] nviz compile in grass51: source of problem

Alex Shevlakov alex at asrv.fcpf.ru
Sat Nov 30 09:29:38 EST 2002


Hi,

I currently updated the Postgres files in nviz src catalog:

For GRASS 5.0:
Changed:
----------
Gmakefile
postgr_query_orig.c
postgr_query.c
 (the two are the same if pg support enabled)
getCat.c

Removed:
----------
buildInfxQry.c
runInfxQry.c
infx.h

Added:
----------

buildPg.c
runPg.c
pg.h

For GRASS51:

Changed:
----------
nviz/doconfigure
nviz/src/getCat.c

Also to handle the problem in compiling under grass51 which in my view comes
out from fact that sources must compile under both GRASSes (i.e. 5.0 and 5.1) whilst
config.in files in source trees differ in the way Postgres is defined:

/* define if postgres exists */
#undef HAVE_POSTGRES
#undef HAVE_POSTGRES_H

- in grass51

and
/* define if postgres.h exists */
#undef HAVE_POSTGRES_H

/* define if postgres_fe.h exists */
#undef HAVE_POSTGRES_FE_H

So the check in nviz/src/runPg.c now looks like:

#if defined(HAVE_POSTGRES) || defined(HAVE_POSTGRES_H) || defined(HAVE_POSTGRES_FE_H)


So that is how it is supposed to compile under both trees. I don't know if it's ok as
doconfigure in turn defines if Postgres should be used from $(PQLIB). Optimal,
they all should check one value rather than three or four different ones.

I agree with Radim that support in nviz should be extended through dbmi driver,
but so far we don't have pg/mysql dbmi driver in grass5.0, so the source
should compile under both trees with difficulty if still directly hooked 
to postgres and with access to odbc and dbf through dbmi.
If we split the source of nviz (which I think we shouldn't) we then get maintaining
both trees.

--alex


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20021130/a9652882/attachment.bin


More information about the grass-dev mailing list