Bill Moseley wrote on 9/15/04 9:21 AM:
> On Wed, Sep 15, 2004 at 09:13:40AM -0500, Peter Karman wrote:
>>I'm working this a.m. on that buildswishe script, that tries to account
>>for all these paths automatically. I'll post it when I have a copy I'm
>>willing to show the world...
> I guess I need to wait and see, but isn't this what configure is all
I don't mean to replace configure. by all means, no. See below.
> In the past configure has not always worked right for setting paths --
> I used to have to set LD_RUN_PATH when running make, but now it seems
> like configure uses (where available) --rpath when building the
> program. That is, just setting CPPFLAGS and LDFLAGS seems to work as
> advertised lately and paths get linked in.
and yes, the 'where available' is a good caveat.
my experience with building with zlib and libxml2 on 4 different *nix
variants (IRIX, Solaris, Mac OS X/Darwin, and Linux) is that there are
subtle differences in syntax for the ./configure statement, as well as
slight differences in how gcc works.
Rather than go crazy trying to remember the differences (my sanity is
single-threaded anyway), I wrote the script below. It is now part of the
CrayDoc 4 product (currently in development).
I have checked it in to the CVS tree, thinking that it might be most
I'm sure there's lots of room for improvement. I have tested it on
Solaris and Mac OS 10.3.4 this morning and it works fine there. I have
tested it on Linux and IRIX previously, but it underwent a major rewrite
this morning, so I can't vouch for those as of this moment.
Here's the basic pod. Please let me know if you find it useful or if you
can suggest improvements.
buildswishe.pl -- build latest version of SWISH-E
Perl script that optionally downloads latest versions of zlib,
libxml2 and SWISH-E, compiles, tests and installs.
buildswishe.pl aims to be smart about compiler options and
LD_RUN_PATH settings for various flavors of Unix and Linux.
# run interactively
# run with all defaults (non-interactive)
perl buildswishe.pl --quiet
# to see this doc and options (at end)
perl buildswishe.pl --help
# to see options
perl buildswishe.pl --opts
Perl 5.6.0 or later
GNU gcc (tested with vers 2.95 or later)
wget, curl or LWP::Simple
GNU make (tested with 3.79 and later)
ldd (or otool for Darwin)
--cvs use latest CVS version of SWISH-E
--force install zlib and libxml2 no matter what
--help print usage statement
--installdir=<X> install in <X> [/usr/local/swish-e/latest]
--libxml2=<X> use <X> as libxml2 source -- either URL,
tar.gz or directory
--opts print options and description
--prevxml2=<X> use already-installed libxml2 in directory <X>
--prevzlib=<X> use already-installed zlib in directory <X>
--quiet run non-interactively
--srcdir=<X> look in <X> for all src tar.gz files [./]
--swishe=<X> use <X> as swish-e source -- either URL,
tar.gz or directory
--tmpdir=<X> use <X> to compile and test [/tmp]
--verbose don't send compiler output to log, send it to
--zlib=<X> use <X> as zlib source -- either URL, tar.gz
Peter Karman 651-605-9009 email@example.com
Received on Wed Sep 15 11:27:21 2004