[article] trimming down autoconf's configure scripts by using pkg-config

Gabor Gombas gombasg at sztaki.hu
Fri Mar 24 04:23:54 PST 2006


On Fri, Mar 24, 2006 at 07:34:10PM +0800, Rogelio Serrano wrote:

> Why is it sometimes configure says machine-arch-paltform is not recognised?

Because you ask it to by invoking one of the AC_CANONICAL_* macros.
Those macros run config.guess and fail if it can not identify the
system.

If you do not want config.guess to be run, then do not invoke those
macros. Of course you will then not be able to make decisions based on
the architecture/OS/platform.

> More portable than the humongous shell script named configure.

Huh? Name a language that is available on more platforms than a Bourne
shell...

> Maybe a
> declarative language that is easier to work with when it breaks while
> porting to other platforms. M4 gives me migraines. And I dont have
> perl on my system. And i dont understand libtool at all.

And what if your declarative language gives _me_ migraines? What if I do
not have that language on my system? What if I do not understand that
language?

> I can actually live with a very simple c program that can probe for a
> particular feature.

Well, that's the most common usage of autoconf: compile/run a lot of
very simple C programs to probe for particular features.

The problem is that there can be hundreds of such simple features with
non-trivial dependencies between them, so you still need a higher-level
control language - like autoconf.

> IMHO a set of test C source files built and run to generate config
> data will be the most portable solution.

Guess what configure does? Exactly...

Gabor

-- 
     ---------------------------------------------------------
     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences
     ---------------------------------------------------------



More information about the xorg mailing list