Discussion:
[Dnsmasq-discuss] dnsmasq 2.75 build options
Shane Manjarres
2015-12-07 04:39:40 UTC
Permalink
Looking at the build options listed in /src/config.h it states the following:

The default set of options to build

HAVE_DHCP
HAVE_DHCP6
HAVE_TFTP
HAVE_SCRIPT
HAVE_AUTH
HAVE_IPSET
HAVE_LOOP

In the same config.h file is says you can disable options using the following:

NO_IPV6
NO_TFTP
NO_DHCP
NO_DHCP6
NO_SCRIPT
NO_LARGEFILE
NO_AUTH
NO_INOTIFY
NO_NETTLE_ECC
NO_GMP

This apparently is the complete list of all the options you can have:

HAVE_BROKEN_RTC
HAVE_TFTP
HAVE_DHCP
HAVE_DHCP6
HAVE_SCRIPT
HAVE_LUASCRIPT
HAVE_DBUS
HAVE_IDN
HAVE_CONNTRACK
HAVE_IPSET
HAVE_AUTH
HAVE_DNSSEC
HAVE_LOOP
HAVE_INOTIFY

I don't understand if the default build options above are the only options built in during build time then why are there options to disable the following options where they have no HAVE options to go along with them:

NO_IPV6
NO_LARGEFILE
NO_NETTLE_ECC
NO_GMP

Why do the above 4 options exist if they don't for instance include HAVE_LARGEFILE or HAVE_GMP. Are the above 4 options build in by default as well and provide NO options to exclude them from the build process? I'm somewhat confused. Thank you for your time.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Kevin Darbyshire-Bryant
2015-12-07 10:57:10 UTC
Permalink
*The default set of options to build*
HAVE_DHCP
HAVE_DHCP6
HAVE_TFTP
HAVE_SCRIPT
HAVE_AUTH
HAVE_IPSET
HAVE_LOOP
*In the same config.h file is says you can disable options using the
following:*
NO_IPV6
NO_TFTP
NO_DHCP
NO_DHCP6
NO_SCRIPT
NO_LARGEFILE
NO_AUTH
NO_INOTIFY
NO_NETTLE_ECC
NO_GMP
*This apparently is the complete list of all the options you can have:*
**
HAVE_BROKEN_RTC
HAVE_TFTP
HAVE_DHCP
HAVE_DHCP6
HAVE_SCRIPT
HAVE_LUASCRIPT
HAVE_DBUS
HAVE_IDN
HAVE_CONNTRACK
HAVE_IPSET
HAVE_AUTH
HAVE_DNSSEC
HAVE_LOOP
HAVE_INOTIFY
I don't understand if the default build options above are the only
options built in during build time then why are there options to
disable the following options where they have no HAVE options to go
NO_IPV6
NO_LARGEFILE
NO_NETTLE_ECC
NO_GMP
GMP is the GNU Multiple Precision maths library and is only relevant for
DNSSEC operation (crypto) The actual crypto is provided by 'nettle'.
Nettle can be built with its own (slower) maths lib instead of GMP,
hence NO_GMP is really an option for (or passed on to) nettle - it
doesn't affect what features are built into dnsmasq. Similarly nettle
itself can be built without elliptic curve crypto (NO_NETTLE_ECC)

The other 2 options are 'disable only' - I suspect to indicate they're
more switching off 'defaults'. NO_IPV6 turns off all IPv6 functionality
in dnsmasq. Disabling largefile support is to cope with the case where
'uclibc' doesn't support >32 bit file offset pointers/sizes. Dnsmasq
goes back quite a way :-)

Kevin
Why do the above 4 options exist if they don’t for instance include
HAVE_LARGEFILE or HAVE_GMP. Are the above 4 options build in by
default as well and provide NO options to exclude them from the build
process? I'm somewhat confused. Thank you for your time.
------------------------------------------------------------------------
Avast logo <https://www.avast.com/antivirus>
This email has been checked for viruses by Avast antivirus software.
www.avast.com <https://www.avast.com/antivirus>
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Simon Kelley
2015-12-07 16:37:19 UTC
Permalink
Post by Shane Manjarres
The default set of options to build
HAVE_DHCP HAVE_DHCP6 HAVE_TFTP HAVE_SCRIPT HAVE_AUTH HAVE_IPSET
HAVE_LOOP
NO_IPV6 NO_TFTP NO_DHCP NO_DHCP6 NO_SCRIPT NO_LARGEFILE NO_AUTH
NO_INOTIFY NO_NETTLE_ECC NO_GMP
HAVE_BROKEN_RTC HAVE_TFTP HAVE_DHCP HAVE_DHCP6 HAVE_SCRIPT
HAVE_LUASCRIPT HAVE_DBUS HAVE_IDN HAVE_CONNTRACK HAVE_IPSET
HAVE_AUTH HAVE_DNSSEC HAVE_LOOP HAVE_INOTIFY
I don't understand if the default build options above are the only
options built in during build time then why are there options to
disable the following options where they have no HAVE options to
NO_IPV6 NO_LARGEFILE NO_NETTLE_ECC NO_GMP
Why do the above 4 options exist if they don't for instance
include HAVE_LARGEFILE or HAVE_GMP. Are the above 4 options build
in by default as well and provide NO options to exclude them from
the build process? I'm somewhat confused. Thank you for your time.
The answer varies.

There _is_ and HAVE_IPV6 option: it's value is determined
automatically by the presence of IPv6 support in the C library and
headers: If you can get IPv6 support, it will be included, unless you
set NO_IPV6

NO_LARGEFILE: Largefile is on by default, this switches it off.
There's probably no reason to do so, except maybe to run on very old
kernels.

NO_NETTLE_ECC is needed to allow error-free compilation against old
versions of libnettle, which don't support ECC. If the build doesn't
break, you don't need this.

NO_GMP inhibits linking against the Gnu multiprecision library, when
special versions of Nettle are in use which don't depend on that library
.


In general, HAVE_* and NO_* all things that you might want to define
to alter the build process. If it helps, think of eg NO_LARGEFILE as
equivalent to HAVE_NO_LARGEFILE.

Cheers,

Simon.


BTW, I've been
Post by Shane Manjarres
--- This email has been checked for viruses by Avast antivirus
software. https://www.avast.com/antivirus
_______________________________________________ Dnsmasq-discuss
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...