Fix building without libcurl
[libisds.git] / test / offline / Makefile.am
blob9d0abd3739f3e628f24431f999278aa0fbff48e1
1 AUTOMAKE_OPTIONS = color-tests parallel-tests
2 export VERBOSE=1
4 libdirpath = src
5 LIBDIR = $(top_srcdir)/$(libdirpath)
6 localedir = $(datadir)/locale
7 AM_CPPFLAGS = -I$(LIBDIR) -I$(top_builddir)/$(libdirpath) \
8                           -DSRCDIR=\"$(top_srcdir)\"
10 # Large files needed by GPGME
11 AM_CPPFLAGS += @XML_CPPFLAGS@ @LIBCURL_CPPFLAGS@ \
12                                           -DLOCALEDIR=\"$(localedir)\"
13 AM_CFLAGS = @LIBGCRYPT_CFLAGS@ @GPGME_CFLAGS@
14 LDADD = @XML_LIBS@ @LIBCURL@ @LIBGCRYPT_LIBS@ @GPGME_LIBS@ @EXPAT_LIBS@ \
15                 @LTLIBINTL@
17 # To fake home dir for gnupg2
18 export HOME=@top_builddir@
20 TESTS = prepare_environment \
21                 b64decode b64encode \
22                 compute_hash context guess_raw_type init_crypto isds_init load_raw \
23                 normalize_mime_type utf82locale \
24                 isds_list_free isds_pki_credentials_free isds_hash_free \
25                 isds_PersonName_free isds_BirthInfo_free isds_Address_free \
26                 isds_DbOwnerInfo_free isds_DbUserInfo_free isds_event_free \
27                 isds_envelope_free isds_document_free isds_message_free \
28                 isds_message_copy_free isds_message_status_change_free isds_approval_free \
29                 isds_commercial_permission_free isds_credentials_delivery_free \
30                 isds_credit_event_free isds_fulltext_result_free \
31                 isds_box_state_period_free \
32                 isds_PersonName_duplicate isds_Address_duplicate \
33                 isds_DbOwnerInfo_duplicate isds_DbUserInfo_duplicate \
34                 isds_box_state_period_duplicate \
35                 isds-filemetatype isds-hash_algorithm \
36                 isds-timestring2timeval \
37                 isds-uint2isds_message_status isds-eventstring2event
38 if BUILD_CURL
39 TESTS += isds-dbtype isds-sendertype isds-usertype isds-paymenttype\
40                  isds-crediteventtype isds-datestring2tm isds-tm2datestring \
41                  isds-timeval2timestring isds-interpret_matches \
42                  soap-decode_header_value soap-string2isds_otp_resolution
43 endif
46 noinst_PROGRAMS = $(TESTS)
48 common = ../test.c ../test.h ../test-tools.h \
49         $(LIBDIR)/cdecode.c \
50         $(LIBDIR)/cencode.c \
51         $(LIBDIR)/isds.c \
52         $(LIBDIR)/physxml.c \
53         $(LIBDIR)/utils.c \
54         $(LIBDIR)/validator.c \
55         $(LIBDIR)/cdecode.h \
56         $(LIBDIR)/cencode.h \
57         $(LIBDIR)/crypto.h \
58         $(LIBDIR)/gettext.h \
59         $(LIBDIR)/isds.h \
60         $(LIBDIR)/isds_priv.h \
61         $(LIBDIR)/physxml.h \
62         $(LIBDIR)/utils.h \
63         $(LIBDIR)/validator.h
64 if USE_OPENSSL_BACKEND
65 common += \
66         $(LIBDIR)/crypto_openssl.c
67 else
68 common += \
69         $(LIBDIR)/crypto_gpg.c
70 endif
71 if BUILD_CURL
72 common += $(LIBDIR)/soap.c $(LIBDIR)/soap.h
73 endif
74 if WIN32
75 common += $(LIBDIR)/win32.c $(LIBDIR)/win32.h
76 else
77 common += $(LIBDIR)/unix.c $(LIBDIR)/unix.h
78 endif
80 # Omit isds.c
81 isds_common = ../test.c ../test.h ../test-tools.h \
82         $(LIBDIR)/cdecode.c \
83         $(LIBDIR)/cencode.c \
84         $(LIBDIR)/physxml.c \
85         $(LIBDIR)/utils.c \
86         $(LIBDIR)/validator.c \
87         $(LIBDIR)/cdecode.h \
88         $(LIBDIR)/cencode.h \
89         $(LIBDIR)/crypto.h \
90         $(LIBDIR)/isds.h \
91         $(LIBDIR)/isds_priv.h \
92         $(LIBDIR)/physxml.h \
93         $(LIBDIR)/utils.h \
94         $(LIBDIR)/validator.h
95 if USE_OPENSSL_BACKEND
96 isds_common += \
97         $(LIBDIR)/crypto_openssl.c
98 else
99 isds_common += \
100         $(LIBDIR)/crypto_gpg.c
101 endif
102 if BUILD_CURL
103 isds_common += $(LIBDIR)/soap.c $(LIBDIR)/soap.h
104 endif
105 if WIN32
106 isds_common += $(LIBDIR)/win32.c $(LIBDIR)/win32.h
107 else
108 isds_common += $(LIBDIR)/unix.c $(LIBDIR)/unix.h
109 endif
111 # Omit soap.c
112 soap_common = ../test.c ../test.h ../test-tools.h \
113         $(LIBDIR)/cdecode.c \
114         $(LIBDIR)/cencode.c \
115         $(LIBDIR)/isds.c \
116         $(LIBDIR)/physxml.c \
117         $(LIBDIR)/utils.c \
118         $(LIBDIR)/validator.c \
119         $(LIBDIR)/cdecode.h \
120         $(LIBDIR)/cencode.h \
121         $(LIBDIR)/crypto.h \
122         $(LIBDIR)/isds.h \
123         $(LIBDIR)/isds_priv.h \
124         $(LIBDIR)/physxml.h \
125         $(LIBDIR)/utils.h \
126         $(LIBDIR)/validator.h
127 if USE_OPENSSL_BACKEND
128 soap_common += \
129         $(LIBDIR)/crypto_openssl.c
130 else
131 soap_common += \
132         $(LIBDIR)/crypto_gpg.c
133 endif
134 if BUILD_CURL
135 soap_common += $(LIBDIR)/soap.h
136 endif
137 if WIN32
138 soap_common += $(LIBDIR)/win32.c $(LIBDIR)/win32.h
139 else
140 soap_common += $(LIBDIR)/unix.c $(LIBDIR)/unix.h
141 endif
143 # Access _hidden symbols
144 b64decode_SOURCES               = b64decode.c $(common)
145 b64encode_SOURCES               = b64encode.c $(common)
146 compute_hash_SOURCES    = compute_hash.c $(common)
147 context_SOURCES                 = context.c $(common)
148 guess_raw_type_SOURCES  = guess_raw_type.c $(common)
149 init_crypto_SOURCES     = init_crypto.c $(common)
150 isds_init_SOURCES               = isds_init.c $(common)
151 load_raw_SOURCES                = load_raw.c $(common)
152 normalize_mime_type_SOURCES             = normalize_mime_type.c $(common)
153 utf82locale_SOURCES             = utf82locale.c $(common)
154 isds_list_free_SOURCES  = isds_list_free.c $(common)
155 isds_pki_credentials_free_SOURCES       = isds_pki_credentials_free.c $(common)
156 isds_hash_free_SOURCES  = isds_hash_free.c $(common)
157 isds_PersonName_free_SOURCES    = isds_PersonName_free.c $(common)
158 isds_BirthInfo_free_SOURCES     = isds_BirthInfo_free.c $(common)
159 isds_Address_free_SOURCES       = isds_Address_free.c $(common)
160 isds_DbOwnerInfo_free_SOURCES   = isds_DbOwnerInfo_free.c $(common)
161 isds_DbUserInfo_free_SOURCES    = isds_DbUserInfo_free.c $(common)
162 isds_event_free_SOURCES         = isds_event_free.c $(common)
163 isds_envelope_free_SOURCES      = isds_envelope_free.c $(common)
164 isds_document_free_SOURCES      = isds_document_free.c $(common)
165 isds_message_free_SOURCES       = isds_message_free.c $(common)
166 isds_message_copy_free_SOURCES  = isds_message_copy_free.c $(common)
167 isds_message_status_change_free_SOURCES = isds_message_status_change_free.c \
168                                                                                   $(common)
169 isds_approval_free_SOURCES      = isds_approval_free.c $(common)
170 isds_commercial_permission_free_SOURCES = isds_commercial_permission_free.c \
171                                                                                   $(common)
172 isds_credentials_delivery_free_SOURCES  = isds_credentials_delivery_free.c \
173                                                                                   $(common)
174 isds_credit_event_free_SOURCES  = isds_credit_event_free.c $(common)
175 isds_fulltext_result_free_SOURCES       = isds_fulltext_result_free.c $(common)
176 isds_box_state_period_free_SOURCES      = isds_box_state_period_free.c $(common)
177 isds_PersonName_duplicate_SOURCES       = isds_PersonName_duplicate.c $(common)
178 isds_Address_duplicate_SOURCES  = isds_Address_duplicate.c $(common)
179 isds_DbOwnerInfo_duplicate_SOURCES      = isds_DbOwnerInfo_duplicate.c $(common)
180 isds_DbUserInfo_duplicate_SOURCES       = isds_DbUserInfo_duplicate.c $(common)
181 isds_box_state_period_duplicate_SOURCES = isds_box_state_period_duplicate.c \
182                                                                                   $(common)
184 # Access static symbols from isds.c
185 isds_dbtype_SOURCES             = isds-dbtype.c $(isds_common)
186 isds_filemetatype_SOURCES       = isds-filemetatype.c $(isds_common)
187 isds_hash_algorithm_SOURCES = isds-hash_algorithm.c $(isds_common)
188 isds_sendertype_SOURCES         = isds-sendertype.c $(isds_common)
189 isds_usertype_SOURCES           = isds-usertype.c $(isds_common)
190 isds_paymenttype_SOURCES        = isds-paymenttype.c $(isds_common)
191 isds_crediteventtype_SOURCES    = isds-crediteventtype.c $(isds_common)
192 isds_datestring2tm_SOURCES      = isds-datestring2tm.c $(isds_common)
193 isds_tm2datestring_SOURCES      = isds-tm2datestring.c $(isds_common)
194 isds_timestring2timeval_SOURCES = isds-timestring2timeval.c $(isds_common)
195 isds_timeval2timestring_SOURCES = isds-timeval2timestring.c $(isds_common)
196 isds_uint2isds_message_status_SOURCES   = isds-uint2isds_message_status.c \
197                                                                                   $(isds_common)
198 isds_eventstring2event_SOURCES  = isds-eventstring2event.c $(isds_common)
199 isds_interpret_matches_SOURCES  = isds-interpret_matches.c $(isds_common)
201 # Access static symbols from soap.c
202 soap_decode_header_value_SOURCES        = soap-decode_header_value.c $(soap_common)
203 soap_string2isds_otp_resolution_SOURCES = soap-string2isds_otp_resolution.c \
204                                                                                   $(soap_common)
206 # Tests that need .gnupg
207 guess_raw_type.log load_raw.log: prepare_environment.log
209 prepare_environment_SOURCES = prepare_environment.c \
210                                                           ../test.c ../test.h ../test-tools.h