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

Simon Kelley simon at thekelleys.org.uk
Wed Sep 12 13:42:44 BST 2012


On 11/09/12 16:53, Dan Williams wrote:

> Fedora does some sed magic to the makefile and to config.h to change
> some install paths and turn on the D-Bus interface.  And while the main
> makefile apparently handles RPM_OPT_FLAGS for you (which is somewhat
> odd, and could be removed if using autotools) that's not handled
> automatically by the contrib makefile.

You can turn on D-Bus and set the install prefix with

make PREFIX=<path> DESTDIR=<path> COPTS="-DHAVE_DBUS"

on the existing makefile. There are all the facilities needed to build
the Debian package without patching the source, because I maintain the
Debian package. I imagine that the RedHat package should find what it
needs too, if not I'm happy to add stuff.
> 
> So yeah, distros would be able to package dnsmasq more easily if it did
> support autotools.  Weigh that against whatever
> distaste/mistrust/dislike part of the userbase has of it.

It's clear that, starting from scratch, it would take less effort to
produce a flexible build system using autotools than to build it from
scratch, but that effort to build from scratch has already been
expended. Moving to autotools would cover the few bases that we don't
already cover, but with more effort than just directly adding those
facilities. It would also force wholesale change to every script and
package spec file that currently sets paths and configuration using the
existing system, to make them call ./configure with the relevant options
instead. That doesn't seem to be good trade-off to me.

Exactly how much effort itis I don't know, since I don't maintain most
of those, (I don't actually know of the existence of most of them,
probably.)



Autotools question: is it possible to provide the equivalent of the
BUILDDIR variable which provides an alternative location for .o files
and binaries, so they're not mixed with the source files. that makes
building different architectures in the same NFS-mounted source tree
easy, and is something I use quite a lot.


Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list