Merge from vendor branch TNF:
[pkgsrcv2.git] / net / bind96 / options.mk
1 # $NetBSD: options.mk,v 1.2 2009/07/26 09:07:58 obache Exp $
2
3 PKG_OPTIONS_VAR=        PKG_OPTIONS.bind96
4 PKG_SUPPORTED_OPTIONS=  bind-dig-sigchase bind-xml-statistics-server
5 PKG_SUPPORTED_OPTIONS+= inet6 threads mysql pgsql ldap dlz-filesystem
6
7 .include "../../mk/pthread.buildlink3.mk"
8
9 .if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "none") || \
10         !empty(MACHINE_PLATFORM:MNetBSD-*-vax) || \
11         !empty(MACHINE_PLATFORM:MNetBSD-*-sparc) || \
12         !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || \
13         !empty(MACHINE_PLATFORM:MNetBSD-*-m68k)
14 # don't touch PKG_SUGGESTED_OPTIONS
15 .else
16 PKG_SUGGESTED_OPTIONS+= threads
17 .endif
18
19 .if empty(MISSING_FEATURES:Minet6)
20 PKG_SUGGESTED_OPTIONS+= inet6
21 .endif
22
23 .include "../../mk/bsd.options.mk"
24
25 ###
26 ### The mysql pgsql ldap dlz-filesystem options are all for BIND
27 ### DLZ (Dynamically Loadable Zones) functionality
28 ###
29 ### NOTE: bdb is excluded on purpose as pkgsrc does not contain
30 ###       a bdb v4.1 or 4.2 package which is what BIND needs.
31 ###       The majority of these are compile tested only
32 ###
33
34 .if !empty(PKG_OPTIONS:Mmysql)
35 .include "../../mk/mysql.buildlink3.mk"
36 CONFIGURE_ARGS+=        --with-dlz-mysql=${BUILDLINK_PREFIX.mysql-client}
37 .endif
38
39 .if !empty(PKG_OPTIONS:Mpgsql)
40 .include "../../mk/pgsql.buildlink3.mk"
41 CONFIGURE_ARGS+=        --with-dlz-postgres=${BUILDLINK_PREFIX.${PGSQL_TYPE}}
42 CONFIGURE_ENV+=         ac_cv_path_PG_CONFIG=${PREFIX}/bin/pg_config
43 .endif
44
45 .if !empty(PKG_OPTIONS:Mldap)
46 .include "../../databases/openldap-client/buildlink3.mk"
47 CONFIGURE_ARGS+=        --with-dlz-ldap=${BUILDLINK_PREFIX.openldap-client}
48 .endif
49
50 .if !empty(PKG_OPTIONS:Mdlz-filesystem)
51 CONFIGURE_ARGS+=        --with-dlz-filesystem
52 .endif
53
54 ###
55 ### The statistics server in bind95 and later needs libxml2
56 ###
57 .if !empty(PKG_OPTIONS:Mbind-xml-statistics-server)
58 .include "../../textproc/libxml2/buildlink3.mk"
59 CONFIGURE_ARGS+=        --with-libxml2
60 .else
61 CONFIGURE_ARGS+=        --without-libxml2
62 .endif
63
64 ###
65 ### IPv6 support
66 ###
67 .if !empty(PKG_OPTIONS:Minet6)
68 CONFIGURE_ARGS+=        --enable-ipv6
69 .else
70 CONFIGURE_ARGS+=        --disable-ipv6
71 .endif
72
73 ###
74 ### pthreads support (also see magic above)
75 ###
76 .if !empty(PKG_OPTIONS:Mthreads)
77 CONFIGURE_ARGS+=        --enable-threads
78 .else
79 CONFIGURE_ARGS+=        --disable-threads
80 .endif
81
82 ###
83 ### dig(1) option +sigchase for DNSSEC signature chasing
84 ###
85 .if !empty(PKG_OPTIONS:Mbind-dig-sigchase)
86 # If anything else needs to add entries to STD_CDEFINES, this will need
87 # to be changed so that the two can cooperate.
88 CONFIGURE_ENV+=         STD_CDEFINES=-DDIG_SIGCHASE=1
89 .endif