[Dnsmasq-discuss] [PATCH] Add support for autotools

g.esp at free.fr g.esp at free.fr
Tue Sep 11 09:49:07 BST 2012



----- Mail original -----
> De: "microcai" <microcai at fedoraproject.org>
> À: "Simon Kelley" <simon at thekelleys.org.uk>, Dnsmasq-discuss at lists.thekelleys.org.uk
> Envoyé: Mardi 11 Septembre 2012 08:27:35
> Objet: Re: [Dnsmasq-discuss] [PATCH] Add support for autotools
> 
...
> 
> advanages over plain Makefile
> 
> 1) easy cross-compile
> 2) easy feature checking
> 3) easy optional building
> 4) easy install
> 5) constant with other software releases.
> 
> SEE, if I want to use different install prefix, i have to change Makefile

No, use make install DESTDIR="where_I_want_to_install"

> SEE, if I want to use different CFLAGS, i have to change Makefile

No, to use your own CFLAGS and same warnings as standard dnsmasq build, use
make CFLAGS="$(CFLAGS) -Wall -W"

> SEE, if I want to use different LDFLAGS, i have to change Makefile
>
No, LDFLAGS defined in environment is already used (contrary to CFLAGS) so make LDFLAGS=$(LDFLAGS) is not usefull

In fact, this is what is hard with packages that don't use autotools :
DESTDIR should be mostly every time supported,
but each package has a different behavior with respect to CFLAGS and LDFLAGS, some require make COPTS="$(CFLAGS)", or CCOPTS, or RPMFLAGS or whatever else.


> but with autotools, all you need is have --prefix=stuff and
> CFLAGS=stuff LDFLAGS=stuff passed to ./configure
> 
> the only short comings that autotools brings us is
> 
> *SOME IDIOT DON'T UNDERSTAND AUTOTOOLS*
>
the main drawback of autotools is that after patching, the easiest way to retrieve functional Makefile(s) again is oftenly to run
autoreconf -f. In that case, autotools become a requirement to compile.
That could become much much harder when your installed autotools packages do not support the syntax used in the package you try to compile.

I agree those issues are less likely to happen with dnsmasq as the package is frequently released, so out of tree patches are less likely to accumulate.

Gilles



More information about the Dnsmasq-discuss mailing list