One of the comments raised at the tiger team week was the bizarre
dependency of AGP on GNS and therefore on GKS. This effectively means
that every single starlink app needs to link against GKS even if it's not
using GKS.
Simply removing gns_link_adam from agp_link_adam has remarkably little
effect as there is only one mention of GNS_ in AGP and that is in
agi_end.f
Clearly the lines in AGI_END of:
* Make sure GNS is shut down for all packages
CALL GNS_STOP( 'GKS', LSTAT )
CALL GNS_STOP( 'IDI', LSTAT )
(I assume SGS doesn't need to be stopped)
are not all that relevant to AGP, especially since AGP never actually
starts GNS (agi1_gwnam.f is overloaded in AGP).
It seems to me that a quick refactoring of agi_end.f simply calling out
to a new routine (agi1_endgns.f?) that runs the above two subroutines
in AGI and an empty routine in AGP, would remove GNS and hence GKS from
the PGPLOT dependency tree. It was quicker to do it than talk about it so
I've done it. AGP no longer requires GNS and hence no longer requires GKS.
WHilst I was at it I fixed agp_link so that it will pick up the starlink
pgplot with GWM, rather than the non-GWM pgplot. ast_link may need a tweak
if you want it to build with the starlink drivers.
There is one more wrinkle associated with removing GNS from agp_link.
It seems that kaplibs still has one last dependency on gks even with the
-nogks switch enabled. KPG1_GCA needed to be moved to libkgs (I assume).
I've done this since it seemed to be non-contentious.
With those two tweaks, SURF builds without GKS for the first time
ever.
KAPLIBS and AGI will need to be rebuilt (I've fixed the link scripts as
well). (Mac users can do this at any time since they won't have a problem
with shared libraries losing/gaining symbols).
--
Tim Jenness
JAC software
http://www.jach.hawaii.edu/~timj
|