[GRASS5] Makefile/autoconf progress! (libs as shared libraries)

Fueled by the moral support of the grass developers list...

I did some hacking this weekend on the Make stuff in grass,
and currently have all libraries building as shared libs
on my Linux box. "All" in this case means all libs that were
built by a default "make install" on 5.0beta8. There are
4 makefile variables I have currently set by hand, and
should be detected by autoconf, but that'll be a little bit
of work. I might also be able to use libtool for some of
this, I'll look into it. Worst case, I can hack a switch
statement to set the variables for supported/known compilers,
and ask the user for help setting them

Also, splitting grass into at least "libs" and "programs"
will make this a lot easier, as explicit references to
which directories contain which libraries can be dropped,
in favor of referring to a single $GISBASE/$ARCH/lib
directory.

Additional thoughts? concerns? ideas?

--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Eric B. Mitchell mailto:emitchell@altaira.com |
| tel: (301) 809 - 3534 Altair Aerospace Corporation |
| tel: (800) 7 - ALTAIR 4201 Northview Dr. Suite 410 |
| fax: (301) 805 - 8122 Bowie, MD 20716 |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
              ,___
          /"\ / o=\ /"""---===/
         / \_/ \__/ ---===/
         | //\ || /""TT""/ //\ || ||""\
         | // \ || || // \ || ||__/
         | //--==\ |L--/ || //--==\ || || "=,
          \ ---===/
           \____---===/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Mon, Jul 31, 2000 at 10:16:33AM -0400, Eric Mitchell wrote:

Worst case, I can hack a switch
statement to set the variables for supported/known compilers,
and ask the user for help setting them.

I've seen some open source products that appear to have a short-cut
configure script, that if it detects a known platform it just moves
a prepared config.cache into place or something. Unfortunately I
can't remember which ones did this.

--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Mon, Jul 31, 2000 at 10:16:33AM -0400, Eric Mitchell wrote:

I did some hacking this weekend on the Make stuff in grass,

Sounds good.

Also, splitting grass into at least "libs" and "programs"
will make this a lot easier, as explicit references to
which directories contain which libraries can be dropped,
in favor of referring to a single $GISBASE/$ARCH/lib
directory.

Additional thoughts? concerns? ideas?

Check out the glib, gtk+, gimp configure procedures.
They might provide additional inspiration on how to
modularize the process. Especially check the glib-config and gtk-config
programms. :slight_smile:
  Bernhard

--
Professional Service around Free Software (intevation.net)
The FreeGIS Project (freegis.org)
Association for a Free Informational Infrastructure (ffii.org)

I once wrote:

> Also, splitting grass into at least "libs" and "programs"
> will make this a lot easier, as explicit references to
> which directories contain which libraries can be dropped,
> in favor of referring to a single $GISBASE/$ARCH/lib
> directory.

Or, I can just dump the libs into a common temporary
directory in the build tree with minimal effort, which
also works well (added that last night, during a fit
of insomnia). This means that tying a makefile
variable to a library location is no longer necessary.
This means that you can just say "-lgis" instead of
"$(GISLIB)". In and of itself, that's not that big a
deal, but it also means that if the location of
libgis.(a|so) moves, you don't have to update the link
lines for building programs, nor change the definition
of the library in whichever included makefile it's
currently defined in.

> Additional thoughts? concerns? ideas?

Check out the glib, gtk+, gimp configure procedures.
They might provide additional inspiration on how to
modularize the process. Especially check the glib-config
and gtk-config programms. :slight_smile:
        Bernhard

Or my own esound-config, for that matter. =) The *-config
technique for dependencies is one that works well with
autoconf, but requires the programmer of a module know
how to wire it into autoconf, and write the .m4 checks
for it as well. The gnome-config script is even more
complex, but handles multiple library requirements fairly
well. The current makefile setup I'm working with would
require no such autoconf mastery, provided you ran make
from within a grass shell. Obviously, compiling grass
itself would not need to be done from within a shell, but
the "core" grass package can find everything it needs
from $(SRCDIR). Additional modules can find everything
they need from $GISBASE. I'll post a tarball of whatever
I have available on Friday PM (US time) for comments.

-- ebm
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Eric B. Mitchell mailto:emitchell@altaira.com |
| tel: (301) 809 - 3534 Altair Aerospace Corporation |
| tel: (800) 7 - ALTAIR 4201 Northview Dr. Suite 410 |
| fax: (301) 805 - 8122 Bowie, MD 20716 |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
              ,___
          /"\ / o=\ /"""---===/
         / \_/ \__/ ---===/
         | //\ || /""TT""/ //\ || ||""\
         | // \ || || // \ || ||__/
         | //--==\ |L--/ || //--==\ || || "=,
          \ ---===/
           \____---===/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'