[Xastir] Better and/or Easier Way to Get Xastir on Windows

Tom Russo russo at bogodyn.org
Fri Nov 10 11:13:28 EST 2006


On Fri, Nov 10, 2006 at 07:09:39AM -0800, we recorded a bogon-computron collision of the <archer at eskimo.com> flavor, containing:
> Developers:  What do we think of adding a private copy of Shapelib
> to our CVS sources?

A bit of a pain in the butt, but probably less of a pain than the alternative.

> We could check whether Shapelib was available in "configure".  If
> not, compile/install our local copy before compiling Xastir, or even
> include the stuff directly in the Xastir src directory and just
> compile it in directly without depending on installed libraries.

The best approach would be to have a subdirectory that is conditionally
compiled.  We have one such directory now, the rtree directory.  Configure
tests for whether to build that library, and adjusts the makefiles at that
time to either ignore the rtree directory or build the library it contains,
then link to that library statically.  The library isn't even installed, 
just built and linked.

So all we need to do is probe for the existance of an installed shapelib.  
If it doesn't exist, build shapelib in the subdirectory, link it in statically.
The machinery for such a thing is already in place in our autoconf/automake
set-up, we just need to emulate the logic used for rtree, but use the 
probe for shapelib instead of the command-line flag that rtree uses.

> Either of these methods would be a bit of work, plus we'd have to
> update the Shapelib sources from time to time.  It'd be an ongoing
> maintenance headache to keep it sync'ed with the latest Shapelib
> sources.

Yes.  But I believe that shapelib is relatively stable now.  It hasn't had
a new version in some time.  It's been a couple years now since it's had 
a new version.  I think the real new development is all in GDAL/OGR now,
and shapelib is something of a relic. 

> I'm starting to think we should merge the Shapelib files in with
> ours and compile it all together as one executable.  Those that need
> the optional tools for Shapelib could download/install Shapelib
> separately.

Keep it as a library, use a local installed version if it's there, build our 
own if and only if necessary and link against it statically in that case.
If we keep it in a separate directory, it eases the maintenance headache.

> Hmmm, could version differences between our private copy and a
> separately-installed copy mess us up?  Probably not if we compile it
> statically into the executable instead of installing/ linking to a
> shared library.  

But if we do it right, there's no need to link our own private copy if there's
already one.  And if we do link against our private copy statically, there
is no problem if the user later installs an incompatible shared-library version.
The static-linked version will be fine until the user updates xastir and
reconfigures, at which point the newly installed shared-library version will
be used instead.

> If we installed our private copy as a shared
> library and linked to it then we could get into version differences.

Yes.  Bad idea unless we don't call it the same thing.

> Now:  Xastir's "configure" checked for an installed copy first, then
> that bit is easily solved:  Anyone needing the optional tools would
> download Shapelib and install as normal, then Xastir wouldn't
> overwrite it with it's own copy but would use it instead.

Yes.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick



More information about the Xastir mailing list