dirmngr: Print a WARNING status for DNS config problems.
[gnupg.git] / dirmngr / Makefile.am
1 # Makefile.am - dirmngr
2 # Copyright (C) 2002 Klarälvdalens Datakonsult AB
3 # Copyright (C) 2004, 2007, 2010 g10 Code GmbH
4 #
5 # This file is part of GnuPG.
6 #
7 # GnuPG is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # GnuPG is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <https://www.gnu.org/licenses/>.
19 #
20 # SPDX-License-Identifier: GPL-3.0+
21
22 ## Process this file with automake to produce Makefile.in
23
24 EXTRA_DIST = OAUTHORS ONEWS ChangeLog-2011 tls-ca.pem
25 dist_pkgdata_DATA = sks-keyservers.netCA.pem
26
27 bin_PROGRAMS = dirmngr dirmngr-client
28
29 if USE_LDAPWRAPPER
30 libexec_PROGRAMS = dirmngr_ldap
31 endif
32
33 noinst_PROGRAMS = $(module_tests) $(module_net_tests) $(module_maint_tests)
34 TESTS = $(module_tests) $(module_net_tests)
35
36 AM_CPPFLAGS =
37
38 include $(top_srcdir)/am/cmacros.am
39
40 AM_CFLAGS = $(USE_C99_CFLAGS) \
41             $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS)      \
42             $(GPG_ERROR_CFLAGS) $(NPTH_CFLAGS) $(NTBTLS_CFLAGS)         \
43             $(LIBGNUTLS_CFLAGS)
44
45
46 if HAVE_W32_SYSTEM
47 ldap_url = ldap-url.h ldap-url.c
48 else
49 ldap_url =
50 endif
51
52 if USE_LDAPWRAPPER
53 extraldap_src = ldap-wrapper.c
54 else
55 extraldap_src = ldap-wrapper-ce.c  dirmngr_ldap.c
56 endif
57
58 noinst_HEADERS = dirmngr.h crlcache.h crlfetch.h misc.h
59
60 dirmngr_SOURCES = dirmngr.c dirmngr.h server.c crlcache.c crlfetch.c    \
61         certcache.c certcache.h \
62         domaininfo.c \
63         workqueue.c \
64         loadswdb.c \
65         cdb.h cdblib.c misc.c dirmngr-err.h dirmngr-status.h \
66         ocsp.c ocsp.h validate.c validate.h  \
67         dns-stuff.c dns-stuff.h \
68         http.c http.h http-common.c http-common.h http-ntbtls.c \
69         ks-action.c ks-action.h ks-engine.h \
70         ks-engine-hkp.c ks-engine-http.c ks-engine-finger.c ks-engine-kdns.c
71
72 if USE_LIBDNS
73 dirmngr_SOURCES += dns.c dns.h
74 endif
75
76 if USE_LDAP
77 dirmngr_SOURCES += ldapserver.h ldapserver.c ldap.c w32-ldap-help.h \
78                    ldap-wrapper.h ldap-parse-uri.c ldap-parse-uri.h \
79                    ks-engine-ldap.c $(ldap_url) $(extraldap_src)
80 ldaplibs = $(LDAPLIBS)
81 else
82 ldaplibs =
83 endif
84
85
86 dirmngr_LDADD = $(libcommonpth) \
87         $(DNSLIBS) $(LIBASSUAN_LIBS) \
88         $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
89         $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
90 if USE_LDAP
91 dirmngr_LDADD += $(ldaplibs)
92 endif
93 if !USE_LDAPWRAPPER
94 dirmngr_LDADD += $(ldaplibs)
95 endif
96 dirmngr_LDFLAGS = $(extra_bin_ldflags)
97
98 if USE_LDAPWRAPPER
99 dirmngr_ldap_SOURCES = dirmngr_ldap.c $(ldap_url)
100 dirmngr_ldap_CFLAGS = $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS)
101 dirmngr_ldap_LDFLAGS =
102 dirmngr_ldap_LDADD = $(libcommon) \
103                      $(GPG_ERROR_LIBS) $(LIBGCRYPT_LIBS) $(LDAPLIBS) \
104                      $(LBER_LIBS) $(LIBINTL) $(LIBICONV) $(NETLIBS)
105 endif
106
107 dirmngr_client_SOURCES = dirmngr-client.c
108 dirmngr_client_LDADD = $(libcommon) \
109                        $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
110                        $(LIBGCRYPT_LIBS) $(NETLIBS) $(LIBINTL) $(LIBICONV)
111 dirmngr_client_LDFLAGS = $(extra_bin_ldflags)
112
113
114 t_common_src = t-support.h t-support.c
115 if USE_LIBDNS
116 t_common_src += dns.c dns.h
117 endif
118 t_common_ldadd = $(libcommon) $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) \
119                  $(GPG_ERROR_LIBS) $(NETLIBS) \
120                  $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) \
121                  $(DNSLIBS) $(LIBINTL) $(LIBICONV)
122
123 module_tests =
124
125 if USE_LDAP
126 module_tests += t-ldap-parse-uri
127 endif
128
129 # Test which need a network connections are only used in maintainer mode.
130 if MAINTAINER_MODE
131 module_net_tests = t-dns-stuff
132 else
133 module_net_tests =
134 endif
135
136 # Tests which are only for manually testing are only build in maintainer-mode.
137 if MAINTAINER_MODE
138 module_maint_tests = t-http
139 else
140 module_maint_tests =
141 endif
142
143
144 # http tests
145 # We need to add the KSBA flags in case we are building against GNUTLS.
146 # In that case NTBTLS flags are empty, but we need ksba anyway.
147 t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c http-common.c
148 t_http_CFLAGS  = -DWITHOUT_NPTH=1  $(USE_C99_CFLAGS) \
149                  $(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
150                  $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) $(KSBA_CFLAGS)
151 t_http_LDADD   = $(t_common_ldadd) \
152                  $(NTBTLS_LIBS) $(KSBA_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
153
154 t_ldap_parse_uri_SOURCES = \
155         t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
156         http.c http-common.c dns-stuff.c \
157         $(ldap_url) $(t_common_src)
158 t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1  $(USE_C99_CFLAGS) \
159                           $(LIBGCRYPT_CFLAGS) \
160                           $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
161 t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
162
163 t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1  $(USE_C99_CFLAGS) \
164                      $(LIBGCRYPT_CFLAGS) \
165                      $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
166 t_dns_stuff_SOURCES = $(t_common_src) t-dns-stuff.c dns-stuff.c
167 t_dns_stuff_LDADD   = $(t_common_ldadd) $(DNSLIBS)
168
169 $(PROGRAMS) : $(libcommon) $(libcommonpth)