aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build54
1 files changed, 46 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 89c538eea..62888727d 100644
--- a/meson.build
+++ b/meson.build
@@ -102,9 +102,9 @@ sqlite_dep = dependency ('sqlite3', required : false)
102if not sqlite_dep.found() 102if not sqlite_dep.found()
103 sqlite_dep = cc.find_library('sqlite3', required : true) 103 sqlite_dep = cc.find_library('sqlite3', required : true)
104endif 104endif
105curl_dep = dependency('libcurl', required : false) 105curl_dep = dependency('libcurl', version: '>=7.85.0', required : false)
106if not curl_dep.found() 106if not curl_dep.found()
107 curl_dep = cc.find_library('curl', required : true) 107 curl_dep = cc.find_library('curl', version: '>=7.85.0', required : true)
108endif 108endif
109zlib_dep = dependency('zlib', required : false) 109zlib_dep = dependency('zlib', required : false)
110if not zlib_dep.found() 110if not zlib_dep.found()
@@ -133,28 +133,71 @@ sodium_dep = dependency('libsodium', required : false)
133if not sodium_dep.found() 133if not sodium_dep.found()
134 sodium_dep = cc.find_library('sodium', required : true) 134 sodium_dep = cc.find_library('sodium', required : true)
135endif 135endif
136
137idn_dep = dependency('libidn2', required : false)
138if not idn_dep.found()
139 idn_dep = cc.find_library('idn2', required : false)
140endif
141if idn_dep.found()
142 add_project_arguments('-DHAVE_LIBIDN2', language : 'c')
143 add_project_arguments('-DHAVE_IDN2_H', language : 'c')
144else
145 idn_dep = dependency('libidn', required : false)
146 if not idn_dep.found()
147 idn_dep = cc.find_library('idn', required : true)
148 add_project_arguments('-DHAVE_LIBIDN', language : 'c')
149 add_project_arguments('-DHAVE_IDN_H', language : 'c')
150 endif
151endif
152
136m_dep = cc.find_library('m', required : false) 153m_dep = cc.find_library('m', required : false)
137if m_dep.found() 154if m_dep.found()
138 add_project_arguments('-DHAVE_LIBM', language : 'c') 155 add_project_arguments('-DHAVE_LIBM', language : 'c')
139endif 156endif
157
140sock_dep = cc.find_library('socket', required : false) 158sock_dep = cc.find_library('socket', required : false)
141if sock_dep.found() 159if sock_dep.found()
142 add_project_arguments('-DHAVE_LIBSOCKET', language : 'c') 160 add_project_arguments('-DHAVE_LIBSOCKET', language : 'c')
143endif 161endif
162
144gopt_bin = find_program('getopt', '/usr/bin/getopt', required : false) 163gopt_bin = find_program('getopt', '/usr/bin/getopt', required : false)
145if gopt_bin.found() 164if gopt_bin.found()
146 add_project_arguments('-DHAVE_GETOPT_BINARY='+gopt_bin.full_path(), language : 'c') 165 add_project_arguments('-DHAVE_GETOPT_BINARY='+gopt_bin.full_path(), language : 'c')
147endif 166endif
167
148pkgc_bin = find_program('pkg-config', '/usr/bin/pkg-config', required : false) 168pkgc_bin = find_program('pkg-config', '/usr/bin/pkg-config', required : false)
149if pkgc_bin.found() 169if pkgc_bin.found()
150 add_project_arguments('-DHAVE_PKG_CONFIG', language : 'c') 170 add_project_arguments('-DHAVE_PKG_CONFIG', language : 'c')
151endif 171endif
172
152ssh_bin = find_program('ssh', '/usr/bin/ssh', required : false) 173ssh_bin = find_program('ssh', '/usr/bin/ssh', required : false)
153if ssh_bin.found() 174if ssh_bin.found()
154 add_project_arguments('-DHAVE_SSH_BINARY', language : 'c') 175 add_project_arguments('-DHAVE_SSH_BINARY', language : 'c')
155endif 176endif
156 177
157idn_dep = dependency('libidn2') # FIXME detect libidn as well 178# Optional dependencies
179mq_dep = dependency('libmysqlclient', required : false)
180if not mq_dep.found()
181 mq_dep = cc.find_library('mysqlclient', required : false)
182endif
183if mq_dep.found()
184 add_project_arguments('-DHAVE_MYSQL', language : 'c')
185endif
186pq_dep = dependency('libpq', required : false)
187if not pq_dep.found()
188 pq_dep = cc.find_library('pq', required : false)
189endif
190if pq_dep.found()
191 add_project_arguments('-DHAVE_POSTGRESQL', language : 'c')
192endif
193zbar_dep = dependency('libzbar', required : false)
194if not zbar_dep.found()
195 zbar_dep = cc.find_library('zbar', required : false)
196endif
197if zbar_dep.found()
198 add_project_arguments('-DHAVE_ZBAR', language : 'c')
199endif
200
158gnunetdeps = [mhd_dep, 201gnunetdeps = [mhd_dep,
159 sodium_dep, 202 sodium_dep,
160 gcrypt_dep, 203 gcrypt_dep,
@@ -175,11 +218,6 @@ if cc.has_header('sys/param.h')
175 add_project_arguments('-DHAVE_SYS_PARAM_H', language : 'c') 218 add_project_arguments('-DHAVE_SYS_PARAM_H', language : 'c')
176endif 219endif
177 220
178if cc.has_header('idn2.h')
179 add_project_arguments('-DHAVE_LIBIDN2', language : 'c')
180 add_project_arguments('-DHAVE_IDN2_H', language : 'c')
181endif
182
183 221
184# GNUTLS DANE 222# GNUTLS DANE
185if cc.has_header('gnutls/dane.h') 223if cc.has_header('gnutls/dane.h')