[GRASS5] Fixing up projection related code...
Glynn Clements
glynn.clements at virgin.net
Sat Apr 12 05:48:38 EDT 2003
Paul Kelly wrote:
> > BTW, what are $(GRASSINT) and $(PROJINT) for? And where do they get
> > their values?
>
> These are defined in the Gmakefile for the GRASS proj library
> src/libes/proj/Gmakefile. $(PROJINT) includes all the object files from
> PROJ.4 and $(GRASSINT) contains get_proj.o and do_proj.o, the two files
> that contain the GRASS wrapper functions for PROJ.4. So by default
> $(GRASSINT) and $(PROJINT) are both compiled, i.e. the grass libgproj.a
> contains all the PROJ.4 functions and the GRASS wrapper functions. If
> --with-proj=yes is specified then only $(GRASSINT) is compiled, i.e.
> libgproj.a contains only the wrapper functions and is only about 40-50kB
> in size.
OK. You need to use single quotes; bash interprets $(...) in the same
way as `...` (command substitution), resulting in errors from
configure:
/usr/src/grass/configure: PROJINT: command not found
/usr/src/grass/configure: GRASSINT: command not found
and GPROJLIBOBJS being empty.
> An aside: the Gmakefile / Makefile for GRASS libgproj also converts the
> ASCII nadcon datum shift files into binary using the nad2bin program from
> the PROJ.4 distribution. So this program must be installed in the path,
> e.g. /usr/local/bin or somewhere for it to work. I couldn't see any
> obvious convention for specifying the path to the nad2bin binary in the
> configure script, but it should be fine as long as PROJ.4 is properly
> installed on the system.
The usual approach is to just run the program by name, and assume that
it's in the path. If you want to use a full path, the autoconf macro
AC_PATH_PROG can be used.
However, there's an issue regarding the datum files which we should
really deal with at some point. Compiling the datum files during the
build process doesn't work when cross-compiling, as the generated
etc/nad2bin program will be compiled for the target platform rather
than the build platform, so it won't run on the build host.
Using the installed nad2bin should solve that particular problem, but
create another: when we last discussed this, I was told that the
compiled datum files weren't portable so, while the installed nad2bin
would run, the resulting files may not work on the target platform.
The only reliable solution (unless the PROJ maintainers can be
persuaded to make the binary format portable) is to include a suitable
nad2bin program in the final package, and compile the datum files on
the target platform as part of the installation process.
BTW, a similar problem exists for the display fonts in src/fonts.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list