AC_CONFIG_SUBDIRS & hand-coded configure

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AC_CONFIG_SUBDIRS & hand-coded configure

Gour-2
Hi!

I'm new with autoconf tools and need to solve the following problem: I have
a package which contains few subpackages, e.g. pkgA, pkgB and pkgC.

First I need to build a pkgA and then the built library is used for building
pkgB, and then pkgC has to be built and everything has to be installed.

pkgA (clisp) does not use configure.ac(in), but it uses his own hand-coded
configure script; its modules (dir1..dirn) have their own Makefile.in
files, and I have to invoke 'configure' with few extra parameters.

In a picture it looks like:

mypackage
        |-- configure.ac
        |-- Makefile.am
        |-- ...
        |
        |---------- pkgA
                |-- configure
                |-- ...
                |-- dir1
                ...
                |-- dirn

        |---------- pkgB
                |-- Makefile.am
                |-- file1
                ...
                |-- filen
        |-----------pkgC
                |-- Makefile.am
                |-- file1
                ...
                |-- filen


So, pkgA (clisp) has to be built with its own 'configure' script which is
invoked with some extra parameters to provide runtime-engine for the rest
of the package.


I have tried to use AC_CONFIG_SUBDIRS in my top-level configure.ac as:

AC_CONFIG_SUBDIRS([clisp-2.33.2])

but autoconf complains that clisp directory does not contain
configure.ac(in):

autoreconf-2.59: `configure.ac' or `configure.in' is required

I read about using 'configure.gnu' and found one post in autoconf archives
(Jul '04) which says:

<quote>
In the tools (aka pkgA) subdirectory, write a wrapper script called
configure.gnu, which takes the arguments passed in from the top-level
configure script and massages them however you need, then calls:

$CONFIG_SHELL ./configure ...  to do the work.  
</quote>

and this solve the problem of passing additional arguments to hand-coded
configure script in pkgA.

However, the problem remains 'cause in the post it is stated:

<quote>
Write a tools/configure.ac (aka pkgA/configure.ac) and do the usual stuff
with it.
</quote>

and I have to use hand-coded configure script which does not use
configure.ac.

The question remains: how to easily solve the problem of invoking custom
'configure' script in one of the sub-package directories?

Any other macro I'm missing?

Sincerely,
Gour

--
Registered Linux User | #278493
GPG Public Key | 8C44EDCD
 


_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AC_CONFIG_SUBDIRS & hand-coded configure

Ralf Corsepius
On Sat, 2005-06-04 at 10:40 +0200, Gour wrote:
> Hi!

> AC_CONFIG_SUBDIRS([clisp-2.33.2])
>
> but autoconf complains that clisp directory does not contain
> configure.ac(in):
>
> autoreconf-2.59: `configure.ac' or `configure.in' is required
IMO, you have tripped a bug in autoreconf.

> I read about using 'configure.gnu' and found one post in autoconf archives
> (Jul '04) which says:
>
> <quote>
> In the tools (aka pkgA) subdirectory, write a wrapper script called
> configure.gnu, which takes the arguments passed in from the top-level
> configure script and massages them however you need, then calls:
>
> $CONFIG_SHELL ./configure ...  to do the work.  
> </quote>
>
> and this solve the problem of passing additional arguments to hand-coded
> configure script in pkgA.

The scenario you describe is supposed to work out of the box and it
probably does when not using aclocal, autoconf and automake directly
instead of invoking autoreconf.

> Any other macro I'm missing?
No, ...

Ralf




_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AC_CONFIG_SUBDIRS & hand-coded configure

Gour-2
Ralf Corsepius ([hidden email]) wrote:

Hi Ralf!

> IMO, you have tripped a bug in autoreconf.

[...]

> The scenario you describe is supposed to work out of the box and it
> probably does when not using aclocal, autoconf and automake directly
> instead of invoking autoreconf.

Well, I was also wondering how this (pretty) common scenario did not
work, but even more amazing is that the bug is still present in
autoreconf ;)

Yes, if I invoke manually aclocal, autoconf & automake it does work :-)

Thank you. Now I can continue 'building' (GNU-izing) the project.


>
> > Any other macro I'm missing?
> No, ...

Great.

Sincerely,
Gour

--
Registered Linux User | #278493
GPG Public Key | 8C44EDCD
 


_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Loading...