swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding a library


From: Alex Lancaster
Subject: Re: adding a library
Date: 18 Jul 1998 15:48:30 -0600

>>>>> "ST" == Sven N Thommesen <address@hidden> writes:

ST> I'm trying to figure out what to do to add a library of my own to
ST> the Swarm package. Now that we're using the configure 'magic',
ST> it's a little more complicated than it was.

ST> I've found references to the distribution list of libraries in
ST> these files: Makefile.appl.in (lines 17 and 47), configure.in
ST> (line 150) and configure (lines 3007 and 3136). Can I just add my
ST> own library (say, (lib)localstuff) to these places and be ok, or
ST> is it more complicated than that?

ST> Would I need to put a 'Makefile.am' in src/localstuff, modelled on
ST> one from another library?

ST> Might it make sense for the Swarm release to contain two empty
ST> libraries (user-pre-lib and user-post-lib), searched before and
ST> after the Swarm libraries respectively, so that users could just
ST> add their own objects there?

Well it's funny you mentioned it, because I'm working on the
automake/autoconf for Swarm libraries and applications right now.

The first thing I'd suggest is getting latest versions of automake and
autoconf installed on your system and peruse the documentation to get
the feel of how the two packages fit together.  In future all Swarm
libraries and applications should be created with these packages, so
that you can build truly portable libraries and applications.  It
might seem like a bit of work to start with, but in the long run it
makes for much simpler and more easily maintainable packages.  

We will also be building more smarts into Swarm itself to make this
process mostly transparent to the user - so it should involve no more
lines in a Makefile.am than the existing Makefiles (I will post an
example Makefile.am and configure.in file for an application I'm
developing in other mail, to give you an idea of how this might be
done).

What I'm doing is creating a new file in the root of the Swarm
directory called etc/config.swarm.  It is an extracted file contains
all the current library paths and flags that Swarm fings at
install-time.  The difference from the Makefile.appl is that this file
is *not* included in the new Makefile.am (which should replace the
plain Makefile) but contains variables that will be extracted into it.

Mostly I'm working on getting applications working with automake so
far, and I'm just about to start the library stuff, but if you want we
can both work on the library framework as well.  If there are more
people clamouring for it - the more quickly it will happen.

If you're creating a new library, I suggest that it should have it's
own configure script and all applications that reference it should
also have a pointer to this library (using a `--with-yourlibname' flag
at configure time).  The reason for this is that you want to be able
to maintain a sharp distinction between the base Swarm installation
and any new libraries you add.  It also means that you will have
portable packages that others can use.  

One of the things I've been trying to do as a library programmer is to
facilitate the sharing and interoperability of parts of Swarm and
building truly robust and portable libraries.  The existing
Makefile.{appl,lib} framework is woefully inadequate for doing that -
and will propbably be maintained for a while for back-compatibility,
but will ultimately have to be superseded. The auto{make,conf}
framework shouls help us to do that properly.

Alex

-- 
  Alex Lancaster         |   e-mail: address@hidden
  Swarm Developer        |      web: http://www.santafe.edu/~alex
  Santa Fe Institute     |      tel: +1-(505) 984-8800 (ext 242)
------------------------------------------------------------------





                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]