NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Pass user-defined options to build of specific userland targets?
Is there a mechanism to allow user-defined options to be passed to the
build of particular userland targets?
My specific case involves bind9. Since I run my own DNS and lack IPv6
external connectivity, I wondered if it were possible to have my name
servers drop AAAA records from recursive replies (to work around 'svn'
lossage). Sure enough, "filter-aaaa-on-v4 yes;" would do what I wanted
but this option is not configured in the default build. (Putting the
option in "named.conf" will cause 'named' to fail to start at all.)
Bv9ARM indicates this option is enabled via "--enable-filter-aaaa=yes"
on the command-line to the "./configure" script. I couldn't see any
place to add configure options, so I modified the script to unconditionally
enable the option. Following the build, the option was still not
enabled--it appears that the configure script is not used during the
build.
Since all that config option did was add "#define ALLOW_FILTER_AAAA_ON_V4"
to "confdefs.h", but no such file appeared to exist, I made the modification
shown below. This worked and my nameservers now accept and honor the
"filter-aaaa-on-v4" option. Is there a better/more appropriate method?
(I also don't like keeping local patches if I don't have to.)
+Index: external/bsd/bind/Makefile.inc
+===================================================================
+RCS file: /cvsroot/src/external/bsd/bind/Makefile.inc,v
+retrieving revision 1.12.4.1
+diff -u -b -r1.12.4.1 Makefile.inc
+--- external/bsd/bind/Makefile.inc 19 May 2012 15:23:41 -0000 1.12.4.1
++++ external/bsd/bind/Makefile.inc 7 Mar 2014 18:16:02 -0000
+@@ -50,6 +50,7 @@
+
+ .if (${USE_INET6} != "no")
+ CPPFLAGS+= -DWANT_IPV6
++CPPFLAGS+= -DALLOW_FILTER_AAAA_ON_V4
+ .endif
+
+ .if defined(HAVE_GCC)
Thanks
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index