4 AC_CONFIG_MACRO_DIR([m4])
6 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
7 AC_CONFIG_HEADERS([config.h])
9 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
13 AC_PREFIX_DEFAULT(/usr/local)
19 AC_SUBST(abs_top_srcdir)
20 AC_SUBST(abs_top_builddir)
23 AC_USE_SYSTEM_EXTENSIONS
31 m4_define([_LT_AC_TAGCONFIG], [])
32 m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
39 AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
40 [disable code optimization through compiler]), [
41 if (test "${enableval}" = "no"); then
42 CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
46 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
47 [enable compiling with debugging information]), [
48 if (test "${enableval}" = "yes" &&
49 test "${ac_cv_prog_cc_g}" = "yes"); then
54 AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
55 [enable position independent executables flag]), [
56 if (test "${enableval}" = "yes" &&
57 test "${ac_cv_prog_cc_pie}" = "yes"); then
58 CFLAGS="$CFLAGS -fPIE"
59 LDFLAGS="$LDFLAGS -pie"
63 AC_ARG_ENABLE(hh2serial-gps,
64 AC_HELP_STRING([--enable-hh2serial-gps], [enable hh2serial GPS support]),
65 [enable_hh2serial_gps=${enableval}], [enable_hh2serial_gps="no"])
66 AM_CONDITIONAL(HH2SERIAL_GPS, test "${enable_hh2serial_gps}" != "no")
67 AM_CONDITIONAL(HH2SERIAL_GPS_BUILTIN, test "${enable_hh2serial_gps}" = "builtin")
69 AC_ARG_ENABLE(telephony,
70 AC_HELP_STRING([--enable-telephony], [enable Telephony support]),
71 [enable_telephony=${enableval}], [enable_telephony="yes"])
72 AM_CONDITIONAL(TELEPHONY, test "${enable_telephony}" != "no")
73 AM_CONDITIONAL(TELEPHONY_BUILTIN, test "${enable_telephony}" = "builtin")
75 AC_ARG_ENABLE(tizen-ext,
76 AC_HELP_STRING([--enable-tizen-ext], [enable TIZEN extensions]),
77 [if (test "${enableval}" = "yes"); then
78 CFLAGS="$CFLAGS -DTIZEN_EXT"
81 AM_CONDITIONAL(TIZEN_EXT, test "${enable-tizen-ext}" != "no")
83 AC_ARG_ENABLE(tizen-ext-ins,
84 AC_HELP_STRING([--enable-tizen-ext-ins], [enable TIZEN extensions for INS]),
85 [if (test "${enableval}" = "yes"); then
86 CFLAGS="$CFLAGS -DTIZEN_EXT_INS"
88 AM_CONDITIONAL(TIZEN_EXT_INS, test "${enable_tizen_ext_ins}" != "no")
90 AC_ARG_ENABLE(tizen-ext-wifi-mesh,
91 AC_HELP_STRING([--enable-tizen-ext-wifi-mesh], [enable TIZEN extensions for Wi-Fi Mesh]),
92 [CFLAGS="$CFLAGS -DTIZEN_EXT_WIFI_MESH"], [enable_tizen_ext_wifi_mesh="no"])
93 AM_CONDITIONAL(TIZEN_EXT_WIFI_MESH, test "${enable_tizen_ext_wifi_mesh}" != "no")
95 AC_ARG_ENABLE(tizen-ext-eap-on-ethernet,
96 AC_HELP_STRING([--enable-tizen-ext-eap-on-ethernet], [enable TIZEN extensions for EAP on Ethernet]),
97 [CFLAGS="$CFLAGS -DTIZEN_EXT_EAP_ON_ETHERNET"], [enable_tizen_ext_eap_on_ethernet="no"])
98 AM_CONDITIONAL(TIZEN_EXT_EAP_ON_ETHERNET, test "${enable_tizen_ext_eap_on_ethernet}" != "no")
100 AC_ARG_ENABLE(tizen-maintain-online,
101 AC_HELP_STRING([--enable-tizen-maintain-online], [enable TIZEN extensions]),
102 [if (test "${enableval}" = "yes"); then
103 CFLAGS="$CFLAGS -DTIZEN_MAINTAIN_ONLINE"
107 AC_ARG_WITH(openconnect, AC_HELP_STRING([--with-openconnect=PROGRAM],
108 [specify location of openconnect binary]), [path_openconnect=${withval}])
110 AC_ARG_ENABLE(openconnect,
111 AC_HELP_STRING([--enable-openconnect], [enable openconnect support]),
112 [enable_openconnect=${enableval}], [enable_openconnect="no"])
113 if (test "${enable_openconnect}" != "no"); then
114 if (test -z "${path_openconnect}"); then
115 AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/bin:/usr/bin)
116 if (test -z "${OPENCONNECT}"); then
117 AC_MSG_ERROR(openconnect binary not found)
120 OPENCONNECT="${path_openconnect}"
121 AC_SUBST(OPENCONNECT)
124 AM_CONDITIONAL(OPENCONNECT, test "${enable_openconnect}" != "no")
125 AM_CONDITIONAL(OPENCONNECT_BUILTIN, test "${enable_openconnect}" = "builtin")
127 AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn=PROGRAM],
128 [specify location of openvpn binary]), [path_openvpn=${withval}])
130 AC_ARG_ENABLE(openvpn,
131 AC_HELP_STRING([--enable-openvpn], [enable openvpn support]),
132 [enable_openvpn=${enableval}], [enable_openvpn="no"])
133 if (test "${enable_openvpn}" != "no"); then
134 if (test -z "${path_openvpn}"); then
135 AC_PATH_PROG(OPENVPN, [openvpn], [/usr/bin/openvpn], $PATH:/bin:/usr/bin)
136 if (test -z "${OPENVPN}"); then
137 AC_MSG_ERROR(openvpn binary not found)
140 OPENVPN="${path_openvpn}"
144 AM_CONDITIONAL(OPENVPN, test "${enable_openvpn}" != "no")
145 AM_CONDITIONAL(OPENVPN_BUILTIN, test "${enable_openvpn}" = "builtin")
147 AC_ARG_WITH(ipsec, AC_HELP_STRING([--with-ipsec=PROGRAM],
148 [specify location of ipsec binary]), [path_ipsec=${withval}])
151 AC_HELP_STRING([--enable-ipsec], [enable ipsec support]),
152 [enable_ipsec=${enableval}], [enable_ipsec="no"])
153 if (test "${enable_ipsec}" != "no"); then
154 PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.28, dummy=yes,
155 AC_MSG_ERROR(GIO >= 2.28 is required))
158 if (test -z "${path_ipsec}"); then
159 AC_PATH_PROG(IPSEC, [charon], [/usr/bin/charon], $PATH:/usr/bin)
160 if (test -z "${IPSEC}"); then
161 AC_MSG_ERROR(ipsec binary not found)
164 IPSEC="${path_ipsec}"
168 AM_CONDITIONAL(IPSEC, test "${enable_ipsec}" != "no")
169 AM_CONDITIONAL(IPSEC_BUILTIN, test "${enable_ipsec}" = "builtin")
171 AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc=PROGRAM],
172 [specify location of vpnc binary]), [path_vpnc=${withval}])
175 AC_HELP_STRING([--enable-vpnc], [enable vpnc support]),
176 [enable_vpnc=${enableval}], [enable_vpnc="no"])
177 if (test "${enable_vpnc}" != "no"); then
178 if (test -z "${path_vpnc}"); then
179 AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/bin:/usr/bin)
180 if (test -z "${VPNC}"); then
181 AC_MSG_ERROR(vpnc binary not found)
188 AM_CONDITIONAL(VPNC, test "${enable_vpnc}" != "no")
189 AM_CONDITIONAL(VPNC_BUILTIN, test "${enable_vpnc}" = "builtin")
191 AC_ARG_WITH(l2tp, AC_HELP_STRING([--with-l2tp=PROGRAM],
192 [specify location of l2tp binary]), [path_l2tp=${withval}])
195 AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
196 [enable_l2tp=${enableval}], [enable_l2tp="no"])
197 if (test "${enable_l2tp}" != "no"); then
198 if (test -z "${path_pppd}"); then
199 AC_PATH_PROG(PPPD, [pppd], [/usr/bin/pppd], $PATH:/bin:/usr/bin)
204 AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
205 AC_MSG_ERROR(ppp header files are required))
206 if (test -z "${path_l2tp}"); then
207 AC_PATH_PROG(L2TP, [xl2tpd], [/usr/bin/xl2tpd], $PATH:/bin:/usr/bin)
213 AM_CONDITIONAL(L2TP, test "${enable_l2tp}" != "no")
214 AM_CONDITIONAL(L2TP_BUILTIN, test "${enable_l2tp}" = "builtin")
216 AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp=PROGRAM],
217 [specify location of pptp binary]), [path_pptp=${withval}])
220 AC_HELP_STRING([--enable-pptp], [enable pptp support]),
221 [enable_pptp=${enableval}], [enable_pptp="no"])
222 if (test "${enable_pptp}" != "no"); then
223 if (test -z "${path_pppd}"); then
224 AC_PATH_PROG(PPPD, [pppd], [/usr/bin/pppd], $PATH:/bin:/usr/bin)
229 AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
230 AC_MSG_ERROR(ppp header files are required))
231 if (test -z "${path_pptp}"); then
232 AC_PATH_PROG(PPTP, [pptp], [/usr/bin/pptp], $PATH:/bin:/usr/bin)
238 AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
239 AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
241 AC_CHECK_HEADERS(resolv.h, dummy=yes,
242 AC_MSG_ERROR(resolver header files are required))
243 AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
244 AC_CHECK_LIB(resolv, __ns_initparse, dummy=yes,
245 AC_MSG_ERROR(resolver library support is required))
248 AC_CHECK_HEADERS([execinfo.h])
249 AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" = "yes"])
251 AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
253 AC_CHECK_FUNC(signalfd, dummy=yes,
254 AC_MSG_ERROR(signalfd support is required))
256 AC_CHECK_LIB(dl, dlopen, dummy=yes,
257 AC_MSG_ERROR(dynamic linking loader is required))
259 AC_ARG_ENABLE(iospm, AC_HELP_STRING([--enable-iospm],
260 [enable Intel OSPM support]), [enable_iospm=${enableval}])
261 AM_CONDITIONAL(IOSPM, test "${enable_iospm}" = "yes")
264 AC_HELP_STRING([--enable-tist], [enable TI Shared Transport support]),
265 [enable_tist=${enableval}], [enable_tist="no"])
266 AM_CONDITIONAL(TIST, test "${enable_tist}" != "no")
267 AM_CONDITIONAL(TIST_BUILTIN, test "${enable_tist}" = "builtin")
269 AC_ARG_ENABLE(session-policy-local,
270 AC_HELP_STRING([--enable-session-policy-local], [enable local file Session policy configuration support]),
271 [enable_session_policy_local=${enableval}], [enable_session_policy_local="no"])
272 AM_CONDITIONAL(SESSION_POLICY_LOCAL, test "${enable_session_policy_local}" != "no")
273 AM_CONDITIONAL(SESSION_POLICY_LOCAL_BUILTIN, test "${enable_session_policy_local}" = "builtin")
275 AC_ARG_WITH(stats-max-file-size, AC_HELP_STRING([--with-stats-max-file-size=SIZE],
276 [Maximal size of a statistics round robin file]),
277 [stats_max_file_size=${withval}])
279 if (test -z "${stats_max_file_size}"); then
280 # default size is 16 kByte
281 stats_max_file_size="16 * 8 * 128"
284 AC_DEFINE_UNQUOTED([STATS_MAX_FILE_SIZE], (${stats_max_file_size}), [Maximal size of a statistics round robin file])
286 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.40, dummy=yes,
287 AC_MSG_ERROR(GLib >= 2.40 is required))
288 AC_SUBST(GLIB_CFLAGS)
291 PKG_CHECK_MODULES(LIBNL, libnl-3.0, dummy=yes,
292 AC_MSG_ERROR(libnl-3.0 is required))
293 AC_SUBST(LIBNL_CFLAGS)
296 PKG_CHECK_MODULES(LIBNL_GENL, libnl-genl-3.0, dummy=yes,
297 AC_MSG_ERROR(libnl-genl-3.0 is required))
298 AC_SUBST(LIBNL_GENL_CFLAGS)
299 AC_SUBST(LIBNL_GENL_LIBS)
301 PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd-daemon, dummy=yes,
302 AC_MSG_ERROR(libsystemd-daemon library is required))
303 AC_SUBST(LIBSYSTEMD_CFLAGS)
304 AC_SUBST(LIBSYSTEMD_LIBS)
306 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
307 AC_MSG_ERROR(D-Bus >= 1.4 is required))
308 AC_SUBST(DBUS_CFLAGS)
311 AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
312 [path to D-Bus config directory]), [path_dbusconf=${withval}],
313 [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
314 if (test -z "${path_dbusconf}"); then
315 DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d"
317 DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d"
319 AC_SUBST(DBUS_CONFDIR)
321 AC_ARG_WITH(dbusdatadir, AC_HELP_STRING([--with-dbusdatadir=PATH],
322 [path to D-Bus data directory]), [path_dbusdata=${withval}],
323 [path_dbusdata="`$PKG_CONFIG --variable=datadir dbus-1`"])
324 if (test -z "${path_dbusdata}"); then
325 DBUS_DATADIR="${datadir}/dbus-1/system-services"
327 DBUS_DATADIR="${path_dbusdata}/dbus-1/system-services"
329 AC_SUBST(DBUS_DATADIR)
331 AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
332 [path to systemd service directory]), [path_systemdunit=${withval}],
333 [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
334 if (test -n "${path_systemdunit}"); then
335 SYSTEMD_UNITDIR="${path_systemdunit}"
336 AC_SUBST(SYSTEMD_UNITDIR)
338 AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
340 AC_ARG_WITH([tmpfilesdir], AC_HELP_STRING([--with-tmpfilesdir=DIR],
341 [path to systemd tmpfiles.d directory]), [path_tmpfiles=${withval}],
342 [path_tmpfiles="`$PKG_CONFIG --variable=tmpfilesdir systemd`"])
343 if (test -n "${path_tmpfiles}"); then
344 SYSTEMD_TMPFILESDIR="${path_tmpfiles}"
345 AC_SUBST(SYSTEMD_TMPFILESDIR)
348 AC_ARG_WITH(firewall, AC_HELP_STRING([--with-firewall=TYPE],
349 [specify which firewall type is used iptables or nftables [default=iptables]]),
350 [firewall_type=${withval}],
351 [firewall_type="iptables"])
353 if (test "${firewall_type}" != "iptables" -a \
354 "${firewall_type}" != "nftables"); then
355 AC_MSG_ERROR(neither nftables nor iptables support enabled)
359 if (test "${firewall_type}" = "iptables"); then
360 PKG_CHECK_MODULES(XTABLES, xtables >= 1.4.11, [found_iptables="yes"],
361 AC_MSG_ERROR(Xtables library is required))
362 AC_SUBST(XTABLES_CFLAGS)
363 AC_SUBST(XTABLES_LIBS)
365 AM_CONDITIONAL(XTABLES, test "${found_iptables}" != "no")
368 if (test "${firewall_type}" = "nftables"); then
369 PKG_CHECK_MODULES(NFTABLES, [libnftnl >= 1.0.4 libmnl >= 1.0.0], [found_nftables="yes"],
370 AC_MSG_ERROR([libnftnl >= 1.0.4 or libmnl >= 1.0.0 not found]))
371 AC_SUBST(NFTABLES_CFLAGS)
372 AC_SUBST(NFTABLES_LIBS)
374 AM_CONDITIONAL(NFTABLES, test "${found_nftables}" != "no")
376 AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
377 [enable test/example scripts]), [enable_test=${enableval}])
378 AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
380 AC_ARG_ENABLE(nmcompat, AC_HELP_STRING([--enable-nmcompat],
381 [enable Network Manager support]),
382 [enable_nmcompat=${enableval}], [enable_nmcompat="no"])
383 AM_CONDITIONAL(NMCOMPAT, test "${enable_nmcompat}" != "no")
385 AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit],
386 [enable PolicyKit support]),
387 [enable_polkit=${enableval}], [enable_polkit="no"])
388 if (test "${enable_polkit}" != "no"); then
389 POLKIT_DATADIR="`$PKG_CONFIG --variable=actiondir polkit`"
391 if (test -z "${POLKIT_DATADIR}"); then
392 POLKIT_DATADIR="${datadir}/polkit-1/actions"
394 AC_SUBST(POLKIT_DATADIR)
396 AM_CONDITIONAL(POLKIT, test "${enable_polkit}" != "no")
398 AC_ARG_ENABLE(selinux, AC_HELP_STRING([--enable-selinux],
399 [enable selinux support]),
400 [enable_selinux=${enableval}], [enable_selinux="no"])
401 AM_CONDITIONAL(SELINUX, test "${enable_selinux}" != "no")
403 AC_ARG_ENABLE(loopback, AC_HELP_STRING([--disable-loopback],
404 [disable loopback support]),
405 [enable_loopback=${enableval}])
406 AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no")
408 AC_ARG_ENABLE(ethernet, AC_HELP_STRING([--disable-ethernet],
409 [disable Ethernet support]),
410 [enable_ethernet=${enableval}])
411 AM_CONDITIONAL(ETHERNET, test "${enable_ethernet}" != "no")
413 AC_ARG_ENABLE(gadget, AC_HELP_STRING([--disable-gadget],
414 [disable USB Gadget support]),
415 [enable_gadget=${enableval}])
416 AM_CONDITIONAL(GADGET, test "${enable_gadget}" != "no")
418 AC_ARG_ENABLE(wifi, AC_HELP_STRING([--disable-wifi],
419 [disable WiFi support]),
420 [enable_wifi=${enableval}])
421 AM_CONDITIONAL(WIFI, test "${enable_wifi}" != "no")
423 AC_ARG_ENABLE(iwd, AC_HELP_STRING([--enable-iwd],
424 [enable iwd support]),
425 [enable_iwd=${enableval}])
426 AM_CONDITIONAL(IWD, test "${enable_iwd}" = "yes")
428 AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth],
429 [disable Bluetooth support]),
430 [enable_bluetooth=${enableval}])
431 AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
433 AC_ARG_ENABLE(ofono, AC_HELP_STRING([--disable-ofono],
434 [disable oFono support]),
435 [enable_ofono=${enableval}])
436 AM_CONDITIONAL(OFONO, test "${enable_ofono}" != "no")
438 AC_ARG_ENABLE(dundee, AC_HELP_STRING([--disable-dundee],
439 [disable dundee support (Bluetooth DUN)]),
440 [enable_dundee=${enableval}])
441 AM_CONDITIONAL(DUNDEE, test "${enable_dundee}" != "no")
443 AC_ARG_ENABLE(pacrunner, AC_HELP_STRING([--disable-pacrunner],
444 [disable PACrunner support]),
445 [enable_pacrunner=${enableval}])
446 AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
448 AC_ARG_ENABLE(neard, AC_HELP_STRING([--disable-neard],
449 [disable Neard support]),
450 [enable_neard=${enableval}])
451 AM_CONDITIONAL(NEARD, test "${enable_neard}" != "no")
453 AC_ARG_ENABLE(wispr, AC_HELP_STRING([--disable-wispr],
454 [disable WISPr support]),
455 [enable_wispr=${enableval}])
456 AM_CONDITIONAL(WISPR, test "${enable_wispr}" != "no")
458 AC_ARG_ENABLE(backtrace, AC_HELP_STRING([--disable-backtrace],
459 [disable backtrace support]),
460 [enable_backtrace=${enableval}])
461 AM_CONDITIONAL(BACKTRACE, test "${enable_backtrace}" != "no")
463 AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
464 [disable testing tools]),
465 [enable_tools=${enableval}])
466 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
468 AC_ARG_ENABLE(stats, AC_HELP_STRING([--disable-stats],
469 [disable statistics round robin file generation]),
470 [enable_stats=${enableval}])
471 AM_CONDITIONAL(STATS, test "${enable_stats}" != "no")
473 if (test "${enable_tools}" != "no"); then
474 AC_PATH_PROGS(IPTABLES_SAVE, [iptables-save], [],
476 AC_PATH_PROGS(IP6TABLES_SAVE, [ip6tables-save], [],
478 IPTABLES_SAVE=$ac_cv_path_IPTABLES_SAVE
479 IP6TABLES_SAVE=$ac_cv_path_IP6TABLES_SAVE
484 AC_SUBST(IPTABLES_SAVE)
485 AC_SUBST(IP6TABLES_SAVE)
487 AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
488 [disable command line client]),
489 [enable_client=${enableval}])
490 AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
492 if (test "${enable_wispr}" != "no"); then
493 PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
494 AC_MSG_ERROR(GnuTLS library is required))
499 AC_SUBST(GNUTLS_CFLAGS)
500 AC_SUBST(GNUTLS_LIBS)
502 if (test "${enable_loopback}" != "no"); then
503 AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
504 AC_MSG_ERROR(inotify header files are required))
506 AC_CHECK_LIB(c, inotify_init, dummy=yes,
507 AC_MSG_ERROR(inotify library support is required))
510 if (test "${enable_wifi}" != "no"); then
511 AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant], [],
515 AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
516 [don't install configuration and data files]),
517 [enable_datafiles=${enableval}])
518 AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
520 if (test "${enable_client}" != "no"); then
521 AC_CHECK_HEADERS(readline/readline.h, dummy=yes,
522 AC_MSG_ERROR(readline header files are required))
525 AM_CONDITIONAL(VPN, test "${enable_openconnect}" != "no" -o \
526 "${enable_openvpn}" != "no" -o \
527 "${enable_ipsec}" != "no" -o \
528 "${enable_vpnc}" != "no" -o \
529 "${enable_l2tp}" != "no" -o \
530 "${enable_pptp}" != "no")
532 AC_MSG_CHECKING(which DNS backend to use)
533 AC_ARG_WITH(dns-backend, AC_HELP_STRING([--with-dns-backend=TYPE],
534 [specify which DNS backend to use: internal or systemd-resolved [default=internal]]),
535 [dns_backend=${withval}],
536 [dns_backend="internal"])
538 if (test "${dns_backend}" != "internal" -a \
539 "${dns_backend}" != "systemd-resolved"); then
540 AC_MSG_ERROR(no suitable DNS backend defined)
542 AM_CONDITIONAL(INTERNAL_DNS_BACKEND, test "${dns_backend}" = "internal")
543 AM_CONDITIONAL(SYSTEMD_RESOLVED_DNS_BACKEND, test "${dns_backend}" = "systemd-resolved")
544 AC_MSG_RESULT(${dns_backend})
546 AC_OUTPUT(Makefile include/version.h connman.pc src/connman.service src/connman_tv.service vpn/connman-vpn.service)