On Fri, 10 Nov 2006, Tom Russo wrote: > 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.
> 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. In order to get this into the Xastir compile properly we need an "xastir/src/shapelib/" directory, not "xastir/shapelib/", correct? "xastir/src/shapelib/" would put it at the same level as rtree and allow us to have Xastir's configure set up everything for us. I seem to remember that Make has troubles with multiple top-level subdirs. This would avoid that problem. I put the shapelib-1.2.10 sources into "xastir/src/shapelib/" and may attempt to merge it into autoconf/automake. If I get the install to work with/without Shapelib already installed I'll check it into CVS. I'll have to go study after that to see how to link it in statically, which Tom suggested is the right thing to do in order to avoid problems with incompatible shared libs in the future. -- Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer "Lotto: A tax on people who are bad at math." -- unknown "Windows: Microsoft's tax on computer illiterates." -- WE7U "The world DOES revolve around me: I picked the coordinate system!" _______________________________________________ Xastir mailing list [email protected] http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
