Panicz Maciej Godek
2013-05-09 14:09:46 UTC
Hey,
I've been struggling with autoconf and automake for a few days now, and I
have to admit that those aren't simple tools to use.
I'm working on a small SDL-based environment for GNU guile and I decided to
release it. The repository is available through mercurial on bitbucket:
hg clone https://bitbucket.org/panicz/slayer
Once cloned, one needs to switch to the autotools branch using
hg up autotools
The repository contains only the minimal set of autotools configuration,
ie. configure.ac and several Makefile.am's, as well as empty directories
build-aux and m4.
The project's design would AFAIK make use of some more advanced features of
autotools, as it allows using various optional packages, and it also
consists of loadable plugins, as well as contains some guile modules that
need to be installed in a proper place. It's definitely too complicated for
a noob like me and I thought that maybe someone more experienced could
direct me towards the goal.
What I need is the following features (I think that each of them solely
would be easy to add, but since I know so little about autotools, I'm a
little overwhelmed, and I'd really like to finally make an initial release):
- the project uses SDL and guile as its base, and the ./configure shouldn't
pass if any of those libraries is lacking
- it also needs to set the appropreate CFLAGS and LDFLAGS. At the moment,
those are added to one of the Makefile.am's, utilizing the pkg-tool:
AM_CFLAGS = `pkg-config --cflags sdl guile-2.0`, but I feel that it should
happen automagically
- furthermore, there are some optional packages -- namely OpenGL and
SDL_mixer, which should be used by default if found on the system, or
disabled otherwise (or disabled if compiled with --without-opengl etc.)
- I need a path where the guile modules should go to. Currently, many guile
packages install their modules to $(datarootdir)/guile/site, and some of
them allow to specify the path using --with-guilesitedir=..., but I think
that it's a misleading solution, because it causes the option appear in the
./configure --help section 'Optional features', rather than 'Fine tuning of
the installation directories', which causes the enthropy of information to
increase, so it would be best to have a --guilesitedir option instead,
listed in the latter section
- also, something needs to be done with the plugins. I don't think it would
be a good idea to install them directly to $(libdir). Actually, every
module consists of (at least) two files -- a front-end written in guile,
and a binary shared library. So I think it should be possible to keep them
either separately or together, and by default the binary libraries should
be installed somewhere within the range of LTDL_LIBRARY_PATH, whle the
guile modules -- somewhere within the range of GUILE_LOAD_PATH, perhaps to
$(guilesitedir).
- and of course, it would make most sense if the libraries were built in a
portable way, so I presume that they should make some use of libtool
I know that probably all the answers can be found in some manuals and
books, but there's so much of it that it's quite easy to get confused, and
if there's a person who knows all this, I think he or she could save me a
lot of time and effort, at least by indicating, where exactly the solutions
to my problems can be found.
I'd be truly grateful.
Thanks in advance :)
I've been struggling with autoconf and automake for a few days now, and I
have to admit that those aren't simple tools to use.
I'm working on a small SDL-based environment for GNU guile and I decided to
release it. The repository is available through mercurial on bitbucket:
hg clone https://bitbucket.org/panicz/slayer
Once cloned, one needs to switch to the autotools branch using
hg up autotools
The repository contains only the minimal set of autotools configuration,
ie. configure.ac and several Makefile.am's, as well as empty directories
build-aux and m4.
The project's design would AFAIK make use of some more advanced features of
autotools, as it allows using various optional packages, and it also
consists of loadable plugins, as well as contains some guile modules that
need to be installed in a proper place. It's definitely too complicated for
a noob like me and I thought that maybe someone more experienced could
direct me towards the goal.
What I need is the following features (I think that each of them solely
would be easy to add, but since I know so little about autotools, I'm a
little overwhelmed, and I'd really like to finally make an initial release):
- the project uses SDL and guile as its base, and the ./configure shouldn't
pass if any of those libraries is lacking
- it also needs to set the appropreate CFLAGS and LDFLAGS. At the moment,
those are added to one of the Makefile.am's, utilizing the pkg-tool:
AM_CFLAGS = `pkg-config --cflags sdl guile-2.0`, but I feel that it should
happen automagically
- furthermore, there are some optional packages -- namely OpenGL and
SDL_mixer, which should be used by default if found on the system, or
disabled otherwise (or disabled if compiled with --without-opengl etc.)
- I need a path where the guile modules should go to. Currently, many guile
packages install their modules to $(datarootdir)/guile/site, and some of
them allow to specify the path using --with-guilesitedir=..., but I think
that it's a misleading solution, because it causes the option appear in the
./configure --help section 'Optional features', rather than 'Fine tuning of
the installation directories', which causes the enthropy of information to
increase, so it would be best to have a --guilesitedir option instead,
listed in the latter section
- also, something needs to be done with the plugins. I don't think it would
be a good idea to install them directly to $(libdir). Actually, every
module consists of (at least) two files -- a front-end written in guile,
and a binary shared library. So I think it should be possible to keep them
either separately or together, and by default the binary libraries should
be installed somewhere within the range of LTDL_LIBRARY_PATH, whle the
guile modules -- somewhere within the range of GUILE_LOAD_PATH, perhaps to
$(guilesitedir).
- and of course, it would make most sense if the libraries were built in a
portable way, so I presume that they should make some use of libtool
I know that probably all the answers can be found in some manuals and
books, but there's so much of it that it's quite easy to get confused, and
if there's a person who knows all this, I think he or she could save me a
lot of time and effort, at least by indicating, where exactly the solutions
to my problems can be found.
I'd be truly grateful.
Thanks in advance :)