[GRASS5] nviz compile in grass51: source of problem
Alex Shevlakov
alex at asrv.fcpf.ru
Sat, 30 Nov 2002 17:29:38 +0300
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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_POST=
GRES_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). Optim=
al,
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 dri=
ver,
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=20
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 mai=
ntaining
both trees.
--alex
--ikeVEW9yuYc//A+q
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE96MtRVtGWG6G2qfwRApQwAJ0SgM2km8RCFKU5J4KT89WvOepQVwCgqJdw
iVR941rYQT4FcwM9llPawp0=
=E64f
-----END PGP SIGNATURE-----
--ikeVEW9yuYc//A+q--