Bill Allombert on Mon, 26 Nov 2001 14:19:28 +0100


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

Re: R.I.P., Configure?


On Mon, Nov 26, 2001 at 03:10:22AM -0500, Matias Atria wrote:
> 
> Hi,
> 3  switch to autoconf
> 
> I'm willing to volunteer for this, if it is still something that would be
> "nice to have" and nobody else is doing it. After reading the Configure
> script carefully, it looks like it would be hard to make a configure script
> (notice the lowercase c :-) as "smart" as that, so some functionality would
> have to be sacrificed (and asking questions interactively would definitely
> have to go away). I can be more specific about this later, but first I
> wanted to make sure that people are willing to get rid of the carefully
> hand-written Configure, and also learn if someone is already working on
> this.

I have try to do that some time ago, after I have released gp2c, that use
autoconf and automake.
My conclusions for now are:

1) We cannot use libtool, because libtool forbid doing things like putting non
PIC code in dynamic libraries, that we cannot avoid until someone volonteer
to rewrite all the asm files to use GOT.

2) We cannot use automake, because there is no support for libraries outside
libtool. Also automake does not support splitting source code in separate
directories. Also there is no direct support for putting object files in a 
separate directory, which is a very nice feature for pari testers, since
we can make all the build for all the archs and the dbg versions with 
the same source tree. Automake only support VPATH.

3) We can use autoconf, but it is a bit of works to rewrite the Makefile.SH
and the benefit are not clear.  One of the problem is the #define names
that do not match. PARI use USE_GETRUSAGE, autoconf HAVE_GETRUSAGE

4) Autoconf has no support for matching sub architectures to kernel
architectures. This the biggest source of trouble with the actual Configure
script, but autoconf will not solve it. Look at the gmp build system to 
see what is the nightmare ahead...  (for example we need to find out that
athlon use i386 kernel, which sparc are V7, v8micro, V9, etc...)

5) Automake/libtool has a bad history of incompatible releases...

So what to do to improve things now ?
1) switch PARI Configure #define names to the one used by autoconf
I will send the list to Karim.
2) split Configure in small scripts than we can reuse if we switch 
to autoconf. Partly done.

Bill.