Use libnl-3.0 in place of libnl-2.0
[platform/upstream/connman.git] / configure.ac
1 AC_PREREQ(2.60)
2 AC_INIT(connman, 1.35)
3
4 AC_CONFIG_MACRO_DIR([m4])
5
6 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
7 AC_CONFIG_HEADERS([config.h])
8
9 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10
11 AM_MAINTAINER_MODE
12
13 AC_PREFIX_DEFAULT(/usr/local)
14
15 PKG_PROG_PKG_CONFIG
16
17 COMPILER_FLAGS
18
19 AC_SUBST(abs_top_srcdir)
20 AC_SUBST(abs_top_builddir)
21
22 AC_LANG_C
23
24 AC_PROG_CC
25 AM_PROG_CC_C_O
26 AC_PROG_CC_PIE
27 AC_PROG_INSTALL
28 AC_PROG_MKDIR_P
29
30 m4_define([_LT_AC_TAGCONFIG], [])
31 m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
32
33 AC_DISABLE_STATIC
34 AC_PROG_LIBTOOL
35
36 gl_CONFIGMAKE_PREP
37
38 AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
39                         [disable code optimization through compiler]), [
40         if (test "${enableval}" = "no"); then
41                 CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
42         fi
43 ])
44
45 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
46                         [enable compiling with debugging information]), [
47         if (test "${enableval}" = "yes" &&
48                                 test "${ac_cv_prog_cc_g}" = "yes"); then
49                 CFLAGS="$CFLAGS -g"
50         fi
51 ])
52
53 AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
54                         [enable position independent executables flag]), [
55         if (test "${enableval}" = "yes" &&
56                                 test "${ac_cv_prog_cc_pie}" = "yes"); then
57                 CFLAGS="$CFLAGS -fPIE"
58                 LDFLAGS="$LDFLAGS -pie"
59         fi
60 ])
61
62 AC_ARG_ENABLE(hh2serial-gps,
63         AC_HELP_STRING([--enable-hh2serial-gps], [enable hh2serial GPS support]),
64                         [enable_hh2serial_gps=${enableval}], [enable_hh2serial_gps="no"])
65 AM_CONDITIONAL(HH2SERIAL_GPS, test "${enable_hh2serial_gps}" != "no")
66 AM_CONDITIONAL(HH2SERIAL_GPS_BUILTIN, test "${enable_hh2serial_gps}" = "builtin")
67
68 AC_ARG_ENABLE(telephony,
69         AC_HELP_STRING([--enable-telephony], [enable Telephony support]),
70                         [enable_telephony=${enableval}], [enable_telephony="yes"])
71 AM_CONDITIONAL(TELEPHONY, test "${enable_telephony}" != "no")
72 AM_CONDITIONAL(TELEPHONY_BUILTIN, test "${enable_telephony}" = "builtin")
73
74 AC_ARG_ENABLE(tizen-ext,
75         AC_HELP_STRING([--enable-tizen-ext], [enable TIZEN extensions]),
76                         [if (test "${enableval}" = "yes"); then
77                                 CFLAGS="$CFLAGS -DTIZEN_EXT"
78                                 LIBS="$LIBS -lsmack"
79                         fi])
80 AM_CONDITIONAL(TIZEN_EXT, test "${enable-tizen-ext}" != "no")
81
82 AC_ARG_ENABLE(tizen-ext-wifi-mesh,
83         AC_HELP_STRING([--enable-tizen-ext-wifi-mesh], [enable TIZEN extensions for Wi-Fi Mesh]),
84                         [CFLAGS="$CFLAGS -DTIZEN_EXT_WIFI_MESH"], [enable_tizen_ext_wifi_mesh="no"])
85 AM_CONDITIONAL(TIZEN_EXT_WIFI_MESH, test "${enable_tizen_ext_wifi_mesh}" != "no")
86
87 AC_ARG_ENABLE(tizen-maintain-online,
88         AC_HELP_STRING([--enable-tizen-maintain-online], [enable TIZEN extensions]),
89                         [if (test "${enableval}" = "yes"); then
90                                 CFLAGS="$CFLAGS -DTIZEN_MAINTAIN_ONLINE"
91                                 LIBS="$LIBS -lsmack"
92                         fi])
93
94 AC_ARG_WITH(openconnect, AC_HELP_STRING([--with-openconnect=PROGRAM],
95         [specify location of openconnect binary]), [path_openconnect=${withval}])
96
97 AC_ARG_ENABLE(openconnect,
98         AC_HELP_STRING([--enable-openconnect], [enable openconnect support]),
99                         [enable_openconnect=${enableval}], [enable_openconnect="no"])
100 if (test "${enable_openconnect}" != "no"); then
101         if (test -z "${path_openconnect}"); then
102                 AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/bin:/usr/bin)
103                 if (test -z "${OPENCONNECT}"); then
104                         AC_MSG_ERROR(openconnect binary not found)
105                 fi
106         else
107                 OPENCONNECT="${path_openconnect}"
108                 AC_SUBST(OPENCONNECT)
109         fi
110 fi
111 AM_CONDITIONAL(OPENCONNECT, test "${enable_openconnect}" != "no")
112 AM_CONDITIONAL(OPENCONNECT_BUILTIN, test "${enable_openconnect}" = "builtin")
113
114 AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn=PROGRAM],
115         [specify location of openvpn binary]), [path_openvpn=${withval}])
116
117 AC_ARG_ENABLE(openvpn,
118         AC_HELP_STRING([--enable-openvpn], [enable openvpn support]),
119                         [enable_openvpn=${enableval}], [enable_openvpn="no"])
120 if (test "${enable_openvpn}" != "no"); then
121         if (test -z "${path_openvpn}"); then
122                 AC_PATH_PROG(OPENVPN, [openvpn], [/usr/bin/openvpn], $PATH:/bin:/usr/bin)
123                 if (test -z "${OPENVPN}"); then
124                         AC_MSG_ERROR(openvpn binary not found)
125                 fi
126         else
127                 OPENVPN="${path_openvpn}"
128                 AC_SUBST(OPENVPN)
129         fi
130 fi
131 AM_CONDITIONAL(OPENVPN, test "${enable_openvpn}" != "no")
132 AM_CONDITIONAL(OPENVPN_BUILTIN, test "${enable_openvpn}" = "builtin")
133
134 AC_ARG_WITH(ipsec, AC_HELP_STRING([--with-ipsec=PROGRAM],
135         [specify location of ipsec binary]), [path_ipsec=${withval}])
136
137 AC_ARG_ENABLE(ipsec,
138         AC_HELP_STRING([--enable-ipsec], [enable ipsec support]),
139                         [enable_ipsec=${enableval}], [enable_ipsec="no"])
140 if (test "${enable_ipsec}" != "no"); then
141         PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.28, dummy=yes,
142                                         AC_MSG_ERROR(GIO >= 2.28 is required))
143         AC_SUBST(GIO_CFLAGS)
144         AC_SUBST(GIO_LIBS)
145         if (test -z "${path_ipsec}"); then
146                 AC_PATH_PROG(IPSEC, [charon], [/usr/bin/charon], $PATH:/usr/bin)
147                 if (test -z "${IPSEC}"); then
148                         AC_MSG_ERROR(ipsec binary not found)
149                 fi
150         else
151                 IPSEC="${path_ipsec}"
152                 AC_SUBST(IPSEC)
153         fi
154 fi
155 AM_CONDITIONAL(IPSEC, test "${enable_ipsec}" != "no")
156 AM_CONDITIONAL(IPSEC_BUILTIN, test "${enable_ipsec}" = "builtin")
157
158 AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc=PROGRAM],
159         [specify location of vpnc binary]), [path_vpnc=${withval}])
160
161 AC_ARG_ENABLE(vpnc,
162         AC_HELP_STRING([--enable-vpnc], [enable vpnc support]),
163                 [enable_vpnc=${enableval}], [enable_vpnc="no"])
164 if (test "${enable_vpnc}" != "no"); then
165         if (test -z "${path_vpnc}"); then
166                 AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/bin:/usr/bin)
167                 if (test -z "${VPNC}"); then
168                         AC_MSG_ERROR(vpnc binary not found)
169                 fi
170         else
171                 VPNC="${path_vpnc}"
172                 AC_SUBST(VPNC)
173         fi
174 fi
175 AM_CONDITIONAL(VPNC, test "${enable_vpnc}" != "no")
176 AM_CONDITIONAL(VPNC_BUILTIN, test "${enable_vpnc}" = "builtin")
177
178 AC_ARG_WITH(l2tp, AC_HELP_STRING([--with-l2tp=PROGRAM],
179         [specify location of l2tp binary]), [path_l2tp=${withval}])
180
181 AC_ARG_ENABLE(l2tp,
182         AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
183                         [enable_l2tp=${enableval}], [enable_l2tp="no"])
184 if (test "${enable_l2tp}" != "no"); then
185         if (test -z "${path_pppd}"); then
186                 AC_PATH_PROG(PPPD, [pppd], [/usr/bin/pppd], $PATH:/bin:/usr/bin)
187         else
188                 PPPD="${path_pppd}"
189                 AC_SUBST(PPPD)
190         fi
191         AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
192                         AC_MSG_ERROR(ppp header files are required))
193         if (test -z "${path_l2tp}"); then
194                 AC_PATH_PROG(L2TP, [xl2tpd], [/usr/bin/xl2tpd], $PATH:/bin:/usr/bin)
195         else
196                 L2TP="${path_l2tp}"
197                 AC_SUBST(L2TP)
198         fi
199 fi
200 AM_CONDITIONAL(L2TP, test "${enable_l2tp}" != "no")
201 AM_CONDITIONAL(L2TP_BUILTIN, test "${enable_l2tp}" = "builtin")
202
203 AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp=PROGRAM],
204         [specify location of pptp binary]), [path_pptp=${withval}])
205
206 AC_ARG_ENABLE(pptp,
207         AC_HELP_STRING([--enable-pptp], [enable pptp support]),
208                         [enable_pptp=${enableval}], [enable_pptp="no"])
209 if (test "${enable_pptp}" != "no"); then
210         if (test -z "${path_pppd}"); then
211                 AC_PATH_PROG(PPPD, [pppd], [/usr/bin/pppd], $PATH:/bin:/usr/bin)
212         else
213                 PPPD="${path_pppd}"
214                 AC_SUBST(PPPD)
215         fi
216         AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
217                         AC_MSG_ERROR(ppp header files are required))
218         if (test -z "${path_pptp}"); then
219                 AC_PATH_PROG(PPTP, [pptp], [/usr/bin/pptp], $PATH:/bin:/usr/bin)
220         else
221                 PPTP="${path_pptp}"
222                 AC_SUBST(PPTP)
223         fi
224 fi
225 AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
226 AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
227
228 AC_CHECK_HEADERS(resolv.h, dummy=yes,
229         AC_MSG_ERROR(resolver header files are required))
230 AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
231         AC_CHECK_LIB(resolv, __ns_initparse, dummy=yes,
232                 AC_MSG_ERROR(resolver library support is required))
233 ])
234
235 AC_CHECK_FUNC(signalfd, dummy=yes,
236                         AC_MSG_ERROR(signalfd support is required))
237
238 AC_CHECK_LIB(dl, dlopen, dummy=yes,
239                         AC_MSG_ERROR(dynamic linking loader is required))
240
241 AC_ARG_ENABLE(iospm, AC_HELP_STRING([--enable-iospm],
242                 [enable Intel OSPM support]), [enable_iospm=${enableval}])
243 AM_CONDITIONAL(IOSPM, test "${enable_iospm}" = "yes")
244
245 AC_ARG_ENABLE(tist,
246         AC_HELP_STRING([--enable-tist], [enable TI Shared Transport support]),
247                         [enable_tist=${enableval}], [enable_tist="no"])
248 AM_CONDITIONAL(TIST, test "${enable_tist}" != "no")
249 AM_CONDITIONAL(TIST_BUILTIN, test "${enable_tist}" = "builtin")
250
251 AC_ARG_ENABLE(session-policy-local,
252         AC_HELP_STRING([--enable-session-policy-local], [enable local file Session policy configuration support]),
253                         [enable_session_policy_local=${enableval}], [enable_session_policy_local="no"])
254 AM_CONDITIONAL(SESSION_POLICY_LOCAL, test "${enable_session_policy_local}" != "no")
255 AM_CONDITIONAL(SESSION_POLICY_LOCAL_BUILTIN, test "${enable_session_policy_local}" = "builtin")
256
257 AC_ARG_WITH(stats-max-file-size, AC_HELP_STRING([--with-stats-max-file-size=SIZE],
258                         [Maximal size of a statistics round robin file]),
259                         [stats_max_file_size=${withval}])
260
261 if (test -z "${stats_max_file_size}"); then
262    # default size is 16 kByte
263    stats_max_file_size="16 * 8 * 128"
264 fi
265
266 AC_DEFINE_UNQUOTED([STATS_MAX_FILE_SIZE], (${stats_max_file_size}), [Maximal size of a statistics round robin file])
267
268 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
269                                 AC_MSG_ERROR(GLib >= 2.28 is required))
270 AC_SUBST(GLIB_CFLAGS)
271 AC_SUBST(GLIB_LIBS)
272
273 PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd-daemon, dummy=yes,
274                                 AC_MSG_ERROR(libsystemd-daemon library is required))
275 AC_SUBST(LIBSYSTEMD_CFLAGS)
276 AC_SUBST(LIBSYSTEMD_LIBS)
277
278 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
279                                 AC_MSG_ERROR(D-Bus >= 1.4 is required))
280 AC_SUBST(DBUS_CFLAGS)
281 AC_SUBST(DBUS_LIBS)
282
283 AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
284         [path to D-Bus config directory]), [path_dbusconf=${withval}],
285                 [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
286 if (test -z "${path_dbusconf}"); then
287         DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d"
288 else
289         DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d"
290 fi
291 AC_SUBST(DBUS_CONFDIR)
292
293 AC_ARG_WITH(dbusdatadir, AC_HELP_STRING([--with-dbusdatadir=PATH],
294         [path to D-Bus data directory]), [path_dbusdata=${withval}],
295                 [path_dbusdata="`$PKG_CONFIG --variable=datadir dbus-1`"])
296 if (test -z "${path_dbusdata}"); then
297         DBUS_DATADIR="${datadir}/dbus-1/system-services"
298 else
299         DBUS_DATADIR="${path_dbusdata}/dbus-1/system-services"
300 fi
301 AC_SUBST(DBUS_DATADIR)
302
303 AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
304         [path to systemd service directory]), [path_systemdunit=${withval}],
305                 [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
306 if (test -n "${path_systemdunit}"); then
307         SYSTEMD_UNITDIR="${path_systemdunit}"
308         AC_SUBST(SYSTEMD_UNITDIR)
309 fi
310 AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
311
312 AC_ARG_WITH(firewall, AC_HELP_STRING([--with-firewall=TYPE],
313                         [specify which firewall type is used iptables or nftables [default=iptables]]),
314                 [firewall_type=${withval}],
315                 [firewall_type="iptables"])
316
317 if (test "${firewall_type}" != "iptables" -a \
318                 "${firewall_type}" != "nftables"); then
319         AC_MSG_ERROR(neither nftables nor iptables support enabled)
320 fi
321
322 found_iptables="no"
323 if (test "${firewall_type}" = "iptables"); then
324         PKG_CHECK_MODULES(XTABLES, xtables >= 1.4.11, [found_iptables="yes"],
325                         AC_MSG_ERROR(Xtables library is required))
326         AC_SUBST(XTABLES_CFLAGS)
327         AC_SUBST(XTABLES_LIBS)
328 fi
329 AM_CONDITIONAL(XTABLES, test "${found_iptables}" != "no")
330
331 found_nftables="no"
332 if (test "${firewall_type}" = "nftables"); then
333         PKG_CHECK_MODULES(NFTABLES, [libnftnl >= 1.0.4 libmnl >= 1.0.0], [found_nftables="yes"],
334                 AC_MSG_ERROR([libnftnl >= 1.0.4 or libmnl >= 1.0.0 not found]))
335         AC_SUBST(NFTABLES_CFLAGS)
336         AC_SUBST(NFTABLES_LIBS)
337 fi
338 AM_CONDITIONAL(NFTABLES, test "${found_nftables}" != "no")
339
340 AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
341                 [enable test/example scripts]), [enable_test=${enableval}])
342 AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
343
344 AC_ARG_ENABLE(nmcompat, AC_HELP_STRING([--enable-nmcompat],
345                                 [enable Network Manager support]),
346                         [enable_nmcompat=${enableval}], [enable_nmcompat="no"])
347 AM_CONDITIONAL(NMCOMPAT, test "${enable_nmcompat}" != "no")
348
349 AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit],
350                                 [enable PolicyKit support]),
351                         [enable_polkit=${enableval}], [enable_polkit="no"])
352 if (test "${enable_polkit}" != "no"); then
353         POLKIT_DATADIR="`$PKG_CONFIG --variable=actiondir polkit`"
354         POLKIT_DATADIR=""
355         if (test -z "${POLKIT_DATADIR}"); then
356                 POLKIT_DATADIR="${datadir}/polkit-1/actions"
357         fi
358         AC_SUBST(POLKIT_DATADIR)
359 fi
360 AM_CONDITIONAL(POLKIT, test "${enable_polkit}" != "no")
361
362 AC_ARG_ENABLE(selinux, AC_HELP_STRING([--enable-selinux],
363                                 [enable selinux support]),
364                         [enable_selinux=${enableval}], [enable_selinux="no"])
365 AM_CONDITIONAL(SELINUX, test "${enable_selinux}" != "no")
366
367 AC_ARG_ENABLE(loopback, AC_HELP_STRING([--disable-loopback],
368                                 [disable loopback support]),
369                                         [enable_loopback=${enableval}])
370 AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no")
371
372 AC_ARG_ENABLE(ethernet, AC_HELP_STRING([--disable-ethernet],
373                                 [disable Ethernet support]),
374                                         [enable_ethernet=${enableval}])
375 AM_CONDITIONAL(ETHERNET, test "${enable_ethernet}" != "no")
376
377 AC_ARG_ENABLE(gadget, AC_HELP_STRING([--disable-gadget],
378                                 [disable USB Gadget support]),
379                                         [enable_gadget=${enableval}])
380 AM_CONDITIONAL(GADGET, test "${enable_gadget}" != "no")
381
382 AC_ARG_ENABLE(wifi, AC_HELP_STRING([--disable-wifi],
383                                 [disable WiFi support]),
384                                         [enable_wifi=${enableval}])
385 AM_CONDITIONAL(WIFI, test "${enable_wifi}" != "no")
386
387 AC_ARG_ENABLE(iwd, AC_HELP_STRING([--enable-iwd],
388                                 [enable iwd support]),
389                                         [enable_iwd=${enableval}])
390 AM_CONDITIONAL(IWD, test "${enable_iwd}" = "yes")
391
392 AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth],
393                                 [disable Bluetooth support]),
394                                         [enable_bluetooth=${enableval}])
395 AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
396
397 AC_ARG_ENABLE(ofono, AC_HELP_STRING([--disable-ofono],
398                                 [disable oFono support]),
399                                         [enable_ofono=${enableval}])
400 AM_CONDITIONAL(OFONO, test "${enable_ofono}" != "no")
401
402 AC_ARG_ENABLE(dundee, AC_HELP_STRING([--disable-dundee],
403                                 [disable dundee support (Bluetooth DUN)]),
404                                         [enable_dundee=${enableval}])
405 AM_CONDITIONAL(DUNDEE, test "${enable_dundee}" != "no")
406
407 AC_ARG_ENABLE(pacrunner, AC_HELP_STRING([--disable-pacrunner],
408                                 [disable PACrunner support]),
409                                         [enable_pacrunner=${enableval}])
410 AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
411
412 AC_ARG_ENABLE(neard, AC_HELP_STRING([--disable-neard],
413                                 [disable Neard support]),
414                                         [enable_neard=${enableval}])
415 AM_CONDITIONAL(NEARD, test "${enable_neard}" != "no")
416
417 AC_ARG_ENABLE(wispr, AC_HELP_STRING([--disable-wispr],
418                                 [disable WISPr support]),
419                                         [enable_wispr=${enableval}])
420 AM_CONDITIONAL(WISPR, test "${enable_wispr}" != "no")
421
422 AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
423                                 [disable testing tools]),
424                                         [enable_tools=${enableval}])
425 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
426
427 if (test "${enable_tools}" != "no"); then
428         AC_PATH_PROGS(IPTABLES_SAVE, [iptables-save], [],
429                                                 $PATH:/bin:/usr/bin)
430         IPTABLES_SAVE=$ac_cv_path_IPTABLES_SAVE
431 else
432         IPTABLES_SAVE=""
433 fi
434 AC_SUBST(IPTABLES_SAVE)
435
436 AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
437                                 [disable command line client]),
438                                         [enable_client=${enableval}])
439 AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
440
441 if (test "${enable_wispr}" != "no"); then
442         PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
443                                 AC_MSG_ERROR(GnuTLS library is required))
444 else
445         GNUTLS_CFLAGS=""
446         GNUTLS_LIBS=""
447 fi
448 AC_SUBST(GNUTLS_CFLAGS)
449 AC_SUBST(GNUTLS_LIBS)
450
451 if (test "${enable_loopback}" != "no"); then
452         AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
453                         AC_MSG_ERROR(inotify header files are required))
454
455         AC_CHECK_LIB(c, inotify_init, dummy=yes,
456                         AC_MSG_ERROR(inotify library support is required))
457 fi
458
459 if (test "${enable_wifi}" != "no"); then
460         AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant], [],
461                                                 $PATH:/bin:/usr/bin)
462 fi
463
464 AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
465                         [don't install configuration and data files]),
466                                         [enable_datafiles=${enableval}])
467 AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
468
469 if (test "${enable_client}" != "no"); then
470         AC_CHECK_HEADERS(readline/readline.h, dummy=yes,
471                 AC_MSG_ERROR(readline header files are required))
472 fi
473
474 AM_CONDITIONAL(VPN, test "${enable_openconnect}" != "no" -o \
475                         "${enable_openvpn}" != "no" -o \
476                         "${enable_ipsec}" != "no" -o \
477                         "${enable_vpnc}" != "no" -o \
478                         "${enable_l2tp}" != "no" -o \
479                         "${enable_pptp}" != "no")
480
481 AC_OUTPUT(Makefile include/version.h connman.pc src/connman.service src/connman_tv.service vpn/connman-vpn.service)