wifi: Set interface to NULL in interface_removed
[platform/upstream/connman.git] / configure.ac
1 AC_PREREQ(2.60)
2 AC_INIT(connman, 0.78)
3
4 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
5 AM_CONFIG_HEADER(config.h)
6
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
8
9 AM_MAINTAINER_MODE
10
11 AC_PREFIX_DEFAULT(/usr/local)
12
13 PKG_PROG_PKG_CONFIG
14
15 COMPILER_FLAGS
16
17 AC_SUBST(abs_top_srcdir)
18 AC_SUBST(abs_top_builddir)
19
20 AC_LANG_C
21
22 AC_PROG_CC
23 AM_PROG_CC_C_O
24 AC_PROG_CC_PIE
25 AC_PROG_INSTALL
26 AM_PROG_MKDIR_P
27
28 m4_define([_LT_AC_TAGCONFIG], [])
29 m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
30
31 AC_DISABLE_STATIC
32 AC_PROG_LIBTOOL
33
34 AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
35                         [disable code optimization through compiler]), [
36         if (test "${enableval}" = "no"); then
37                 CFLAGS="$CFLAGS -O0"
38         fi
39 ])
40
41 GTK_DOC_CHECK
42
43 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
44                         [enable compiling with debugging information]), [
45         if (test "${enableval}" = "yes" &&
46                                 test "${ac_cv_prog_cc_g}" = "yes"); then
47                 CFLAGS="$CFLAGS -g"
48         fi
49 ])
50
51 AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
52                         [enable position independent executables flag]), [
53         if (test "${enableval}" = "yes" &&
54                                 test "${ac_cv_prog_cc_pie}" = "yes"); then
55                 CFLAGS="$CFLAGS -fPIE"
56                 LDFLAGS="$LDFLAGS -pie"
57         fi
58 ])
59
60 AC_ARG_ENABLE(threads,
61         AC_HELP_STRING([--enable-threads], [enable threading support]),
62                         [enable_threads=${enableval}], [enable_threads="no"])
63
64 AC_ARG_ENABLE(ethernet,
65         AC_HELP_STRING([--enable-ethernet], [enable Ethernet support]),
66                         [enable_ethernet=${enableval}], [enable_ethernet="no"])
67 AM_CONDITIONAL(ETHERNET, test "${enable_ethernet}" != "no")
68 AM_CONDITIONAL(ETHERNET_BUILTIN, test "${enable_ethernet}" = "builtin")
69
70 AC_ARG_ENABLE(wifi,
71         AC_HELP_STRING([--enable-wifi], [enable WiFi support]),
72                         [enable_wifi=${enableval}], [enable_wifi="no"])
73 if (test "${enable_wifi}" != "no"); then
74         AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant], [],
75                                                 $PATH:/sbin:/usr/sbin)
76 fi
77 AM_CONDITIONAL(WIFI, test "${enable_wifi}" != "no")
78 AM_CONDITIONAL(WIFI_BUILTIN, test "${enable_wifi}" = "builtin")
79
80 AC_ARG_ENABLE(bluetooth,
81         AC_HELP_STRING([--enable-bluetooth], [enable Bluetooth support]),
82                         [enable_bluetooth=${enableval}], [enable_bluetooth="no"])
83 AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
84 AM_CONDITIONAL(BLUETOOTH_BUILTIN, test "${enable_bluetooth}" = "builtin")
85
86 AC_ARG_ENABLE(hh2serial-gps,
87         AC_HELP_STRING([--enable-hh2serial-gps], [enable hh2serial GPS support]),
88                         [enable_hh2serial_gps=${enableval}], [enable_hh2serial_gps="no"])
89 AM_CONDITIONAL(HH2SERIAL_GPS, test "${enable_hh2serial_gps}" != "no")
90 AM_CONDITIONAL(HH2SERIAL_GPS_BUILTIN, test "${enable_hh2serial_gps}" = "builtin")
91
92 AC_ARG_ENABLE(ofono,
93         AC_HELP_STRING([--enable-ofono], [enable oFono support]),
94                         [enable_ofono=${enableval}], [enable_ofono="no"])
95 AM_CONDITIONAL(OFONO, test "${enable_ofono}" != "no")
96 AM_CONDITIONAL(OFONO_BUILTIN, test "${enable_ofono}" = "builtin")
97
98 AC_ARG_WITH(openconnect, AC_HELP_STRING([--with-openconnect=PROGRAM],
99         [specify location of openconnect binary]), [path_openconnect=${withval}])
100
101 AC_ARG_ENABLE(openconnect,
102         AC_HELP_STRING([--enable-openconnect], [enable openconnect support]),
103                         [enable_openconnect=${enableval}], [enable_openconnect="no"])
104 if (test "${enable_openconnect}" != "no"); then
105         if (test -z "${path_openconnect}"); then
106                 AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/sbin:/usr/sbin)
107                 if (test -z "${OPENCONNECT}"); then
108                         AC_MSG_ERROR(openconnect binary not found)
109                 fi
110         else
111                 OPENCONNECT="${path_openconnect}"
112                 AC_SUBST(OPENCONNECT)
113         fi
114 fi
115 AM_CONDITIONAL(OPENCONNECT, test "${enable_openconnect}" != "no")
116 AM_CONDITIONAL(OPENCONNECT_BUILTIN, test "${enable_openconnect}" = "builtin")
117
118 AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn=PROGRAM],
119         [specify location of openvpn binary]), [path_openvpn=${withval}])
120
121 AC_ARG_ENABLE(openvpn,
122         AC_HELP_STRING([--enable-openvpn], [enable openvpn support]),
123                         [enable_openvpn=${enableval}], [enable_openvpn="no"])
124 if (test "${enable_openvpn}" != "no"); then
125         if (test -z "${path_openvpn}"); then
126                 AC_PATH_PROG(OPENVPN, [openvpn], [], $PATH:/sbin:/usr/sbin)
127                 if (test -z "${OPENVPN}"); then
128                         AC_MSG_ERROR(openvpn binary not found)
129                 fi
130         else
131                 OPENVPN="${path_openvpn}"
132                 AC_SUBST(OPENVPN)
133         fi
134 fi
135 AM_CONDITIONAL(OPENVPN, test "${enable_openvpn}" != "no")
136 AM_CONDITIONAL(OPENVPN_BUILTIN, test "${enable_openvpn}" = "builtin")
137
138 AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc=PROGRAM],
139         [specify location of vpnc binary]), [path_vpnc=${withval}])
140
141 AC_ARG_ENABLE(vpnc,
142         AC_HELP_STRING([--enable-vpnc], [enable vpnc support]),
143                 [enable_vpnc=${enableval}], [enable_vpnc="no"])
144 if (test "${enable_vpnc}" != "no"); then
145         if (test -z "${path_vpnc}"); then
146                 AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/sbin:/usr/sbin)
147                 if (test -z "${VPNC}"); then
148                         AC_MSG_ERROR(vpnc binary not found)
149                 fi
150         else
151                 VPNC="${path_vpnc}"
152                 AC_SUBST(VPNC)
153         fi
154 fi
155 AM_CONDITIONAL(VPNC, test "${enable_vpnc}" != "no")
156 AM_CONDITIONAL(VPNC_BUILTIN, test "${enable_vpnc}" = "builtin")
157
158 AC_ARG_ENABLE(l2tp,
159         AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
160                         [enable_l2tp=${enableval}], [enable_l2tp="no"])
161 if (test "${enable_l2tp}" != "no"); then
162         if (test -z "${path_pppd}"); then
163                 AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
164         else
165                 PPPD="${path_pppd}"
166                 AC_SUBST(PPPD)
167         fi
168         AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
169                         AC_MSG_ERROR(ppp header files are required))
170         if (test -z "${path_l2tp}"); then
171                 AC_PATH_PROG(L2TP, [xl2tpd], [/usr/sbin/xl2tpd], $PATH:/sbin:/usr/sbin)
172         else
173                 L2TP="${path_l2tp}"
174                 AC_SUBST(L2TP)
175         fi
176 fi
177 AM_CONDITIONAL(L2TP, test "${enable_l2tp}" != "no")
178 AM_CONDITIONAL(L2TP_BUILTIN, test "${enable_l2tp}" = "builtin")
179
180 AC_ARG_ENABLE(pptp,
181         AC_HELP_STRING([--enable-pptp], [enable pptp support]),
182                         [enable_pptp=${enableval}], [enable_pptp="no"])
183 if (test "${enable_pptp}" != "no"); then
184         if (test -z "${path_pppd}"); then
185                 AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
186         else
187                 PPPD="${path_pppd}"
188                 AC_SUBST(PPPD)
189         fi
190         AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
191                         AC_MSG_ERROR(ppp header files are required))
192         if (test -z "${path_pptp}"); then
193                 AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
194         else
195                 PPTP="${path_pptp}"
196                 AC_SUBST(PPTP)
197         fi
198 fi
199 AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
200 AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
201
202 AC_ARG_ENABLE(loopback,
203         AC_HELP_STRING([--enable-loopback], [enable loopback support]),
204                         [enable_loopback=${enableval}], [enable_loopback="no"])
205 if (test "${enable_loopback}" != "no"); then
206         AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
207                         AC_MSG_ERROR(inotify header files are required))
208
209         AC_CHECK_LIB(c, inotify_init, dummy=yes,
210                         AC_MSG_ERROR(inotify library support is required))
211 fi
212 AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no")
213 AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin")
214
215 AC_ARG_ENABLE(pacrunner,
216         AC_HELP_STRING([--enable-pacrunner], [enable PAC runner support]),
217                         [enable_pacrunner=${enableval}], [enable_pacrunner="no"])
218
219 AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
220 AM_CONDITIONAL(PACRUNNER_BUILTIN, test "${enable_pacrunner}" = "builtin")
221
222 AC_ARG_ENABLE(google,
223         AC_HELP_STRING([--enable-google], [enable Google Public DNS support]),
224                         [enable_google=${enableval}], [enable_google="no"])
225 AM_CONDITIONAL(GOOGLE, test "${enable_google}" != "no")
226 AM_CONDITIONAL(GOOGLE_BUILTIN, test "${enable_google}" = "builtin")
227
228 AC_ARG_ENABLE(meego,
229         AC_HELP_STRING([--enable-meego], [enable MeeGo features support]),
230                         [enable_meego=${enableval}], [enable_meego="no"])
231 AM_CONDITIONAL(MEEGO, test "${enable_meego}" != "no")
232 AM_CONDITIONAL(MEEGO_BUILTIN, test "${enable_meego}" = "builtin")
233
234 AC_CHECK_HEADERS(resolv.h, dummy=yes,
235         AC_MSG_ERROR(resolver header files are required))
236 AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
237         AC_CHECK_LIB(resolv, __ns_initparse, dummy=yes,
238                 AC_MSG_ERROR(resolver library support is required))
239 ])
240
241 AC_CHECK_FUNC(signalfd, dummy=yes,
242                         AC_MSG_ERROR(signalfd support is required))
243
244 AC_CHECK_LIB(dl, dlopen, dummy=yes,
245                         AC_MSG_ERROR(dynamic linking loader is required))
246
247 AC_ARG_WITH(iwmxsdk, AC_HELP_STRING([--with-iwmxsdk=PATH],
248                                                 [path to Intel WiMAX SDK]),
249                                 [pkgconfig_iwmxsdk=${withval}/lib/pkgconfig])
250
251 AC_ARG_ENABLE(iwmx, AC_HELP_STRING([--enable-iwmx],
252                 [enable Intel WiMAX support]), [enable_iwmx=${enableval}])
253 if (test "${enable_iwmx}" = "yes"); then
254         enable_threads="yes"
255         export PKG_CONFIG_PATH="${pkgconfig_iwmxsdk}"
256         PKG_CHECK_MODULES(IWMXSDK, libiWmxSdk-0, dummy=yes,
257                                 AC_MSG_ERROR(Intel WiMAX SDK is required))
258         PKG_CONFIG_PATH=""
259         AC_SUBST(IWMXSDK_CFLAGS)
260         AC_SUBST(IWMXSDK_LIBS)
261
262         # Fix API compat breakage from 1.4 to 1.5...
263         CPPFLAGS_save=$CPPFLAGS
264         CPPFLAGS="$IWMXSDK_CFLAGS $CPPFLAGS"
265         AH_TEMPLATE([HAVE_IWMXSDK_STATUS_IDLE],
266                     [WIMAX_API_DEVICE_STATUS_Connection_Idle is present])
267         AC_CHECK_DECL(WIMAX_API_DEVICE_STATUS_Connection_Idle,
268                       [AC_DEFINE([HAVE_IWMXSDK_STATUS_IDLE], [1], [])],
269                       [],
270                       [[#include <WiMaxType.h>]])
271
272         AH_TEMPLATE([HAVE_WIMAX_API_DEVICE_ID],
273                     [WIMAX_API_DEVICE_ID is present])
274         AC_CHECK_TYPE(WIMAX_API_DEVICE_ID,
275                       [AC_DEFINE([HAVE_WIMAX_API_DEVICE_ID], [1], [])],
276                       [],
277                       [[#include <WiMaxType.h>]])
278
279         AH_TEMPLATE([HAVE_WIMAX_API_HW_DEVICE_ID],
280                     [WIMAX_API_HW_DEVICE_ID is present])
281         AC_CHECK_TYPE(WIMAX_API_HW_DEVICE_ID,
282                       [AC_DEFINE([HAVE_WIMAX_API_HW_DEVICE_ID], [1], [])],
283                       [],
284                       [[#include <WiMaxType.h>]])
285
286         AH_TEMPLATE([HAVE_WIMAX_API_NSP_INFO_EX],
287                     [WIMAX_API_NSP_INFO_EX is present])
288         AC_CHECK_TYPE(WIMAX_API_NSP_INFO_EX,
289                       [AC_DEFINE([HAVE_WIMAX_API_NSP_INFO_EX], [1], [])],
290                       [],
291                       [[#include <WiMaxType.h>] 
292                        [#include <WiMaxTypesEx.h>]])
293
294         AH_TEMPLATE([HAVE_WIMAX_API_CONNECTED_NSP_INFO],
295                     [WIMAX_API_CONNECTED_NSP_INFO is present])
296         AC_CHECK_TYPE(WIMAX_API_CONNECTED_NSP_INFO,
297                       [AC_DEFINE([HAVE_WIMAX_API_CONNECTED_NSP_INFO], [1], [])],
298                       [],
299                       [[#include <WiMaxType.h>]])
300
301         CPPFLAGS=$CPPFLAGS_save
302 fi
303 AM_CONDITIONAL(IWMX, test "${enable_iwmx}" = "yes")
304
305 AC_ARG_ENABLE(iospm, AC_HELP_STRING([--enable-iospm],
306                 [enable Intel OSPM support]), [enable_iospm=${enableval}])
307 AM_CONDITIONAL(IOSPM, test "${enable_iospm}" = "yes")
308
309 AC_ARG_WITH(ntpd, AC_HELP_STRING([--with-ntpd=PROGRAM],
310         [specify ntpd binary location]), [path_ntpd=${withval}])
311
312 AC_ARG_ENABLE(ntpd,
313         AC_HELP_STRING([--enable-ntpd], [enable ntpd support]),
314                         [enable_ntpd=${enableval}], [enable_ntpd="no"])
315
316 if (test "${enable_ntpd}" != "no"); then
317         if (test -z "${path_ntpd}"); then
318                 AC_PATH_PROG(NTPD, [ntpd], [], $PATH:/sbin:/usr/sbin)
319         else
320                 NTPD="${path_ntpd}"
321                 AC_SUBST(NTPD)
322         fi
323 fi
324 AM_CONDITIONAL(NTPD, test "${enable_ntpd}" != "no")
325 AM_CONDITIONAL(NTPD_BUILTIN, test "${enable_ntpd}" = "builtin")
326
327 AC_ARG_ENABLE(nmcompat,
328         AC_HELP_STRING([--enable-nmcompat], [enable nmcompat support]),
329                         [enable_nmcompat=${enableval}], [enable_nmcompat="no"])
330 AM_CONDITIONAL(NMCOMPAT, test "${enable_nmcompat}" != "no")
331 AM_CONDITIONAL(NMCOMPAT_BUILTIN, test "${enable_nmcompat}" = "builtin")
332
333 AC_ARG_ENABLE(tist,
334         AC_HELP_STRING([--enable-tist], [enable TI Shared Transport support]),
335                         [enable_tist=${enableval}], [enable_tist="no"])
336 AM_CONDITIONAL(TIST, test "${enable_tist}" != "no")
337 AM_CONDITIONAL(TIST_BUILTIN, test "${enable_tist}" = "builtin")
338
339 AC_ARG_WITH(stats-max-file-size, AC_HELP_STRING([--with-stats-max-file-size=SIZE],
340                         [Maximal size of a statistics round robin file]),
341                         [stats_max_file_size=${withval}])
342
343 if (test -z "${stats_max_file_size}"); then
344    # default size is 16 kByte
345    stats_max_file_size="16 * 8 * 128"
346 fi
347
348 AC_DEFINE_UNQUOTED([STATS_MAX_FILE_SIZE], (${stats_max_file_size}), [Maximal size of a statistics round robin file])
349
350 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.22, dummy=yes,
351                                 AC_MSG_ERROR(GLib >= 2.22 is required))
352 AC_SUBST(GLIB_CFLAGS)
353 AC_SUBST(GLIB_LIBS)
354
355 if (test "${enable_threads}" = "yes"); then
356         AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required])
357         PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
358                                 AC_MSG_ERROR(GThread >= 2.16 is required))
359         GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
360         GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
361 fi
362
363 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
364                                 AC_MSG_ERROR(D-Bus >= 1.0 is required))
365 saved_CFLAGS="$CFLAGS"
366 saved_LIBS="$LIBS"
367 CFLAGS="$CFLAGS $DBUS_CFLAGS"
368 LIBS="$LIBS $DBUS_LIBS"
369 AC_CHECK_LIB(dbus-1, dbus_watch_get_unix_fd, dummy=yes,
370         AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
371                 [Define to 1 if you need the dbus_watch_get_unix_fd() function.]))
372 AC_CHECK_LIB(dbus-1, dbus_connection_can_send_type, dummy=yes,
373         AC_DEFINE(NEED_DBUS_CONNECTION_CAN_SEND_TYPE, 1,
374                 [Define to 1 if you need the dbus_connection_can_send_type() function.]
375 ))
376 CFLAGS="$saved_CFLAGS"
377 LIBS="$saved_LIBS"
378 AC_SUBST(DBUS_CFLAGS)
379 AC_SUBST(DBUS_LIBS)
380
381 AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
382         [path to D-Bus config directory]), [path_dbusconf=${withval}],
383                 [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
384 if (test -z "${path_dbusconf}"); then
385         DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d"
386 else
387         DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d"
388 fi
389 AC_SUBST(DBUS_CONFDIR)
390
391 AC_ARG_WITH(dbusdatadir, AC_HELP_STRING([--with-dbusdatadir=PATH],
392         [path to D-Bus data directory]), [path_dbusdata=${withval}],
393                 [path_dbusdata="`$PKG_CONFIG --variable=datadir dbus-1`"])
394 if (test -z "${path_dbusdata}"); then
395         DBUS_DATADIR="${datadir}/dbus-1/system-services"
396 else
397         DBUS_DATADIR="${path_dbusdata}/dbus-1/system-services"
398 fi
399 AC_SUBST(DBUS_DATADIR)
400
401 AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
402         [path to systemd service directory]), [path_systemdunit=${withval}],
403                 [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
404 if (test -n "${path_systemdunit}"); then
405         SYSTEMD_UNITDIR="${path_systemdunit}"
406         AC_SUBST(SYSTEMD_UNITDIR)
407 fi
408 AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
409
410 PKG_CHECK_MODULES(XTABLES, xtables, dummy=yes,
411                                 AC_MSG_ERROR(Xtables library is required))
412 AC_SUBST(XTABLES_CFLAGS)
413 AC_SUBST(XTABLES_LIBS)
414
415 AC_ARG_ENABLE(polkit,
416         AC_HELP_STRING([--enable-polkit], [enable PolicyKit support]),
417                         [enable_polkit=${enableval}], [enable_polkit="no"])
418 if (test "${enable_polkit}" != "no"); then
419         POLKIT_DATADIR="`$PKG_CONFIG --variable=actiondir polkit`"
420         POLKIT_DATADIR=""
421         if (test -z "${POLKIT_DATADIR}"); then
422                 POLKIT_DATADIR="${datadir}/polkit-1/actions"
423         fi
424         AC_SUBST(POLKIT_DATADIR)
425 fi
426 AM_CONDITIONAL(POLKIT, test "${enable_polkit}" != "no")
427 AM_CONDITIONAL(POLKIT_BUILTIN, test "${enable_polkit}" = "builtin")
428
429 AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client],
430                 [enable command line client]), [enable_client=${enableval}])
431 AM_CONDITIONAL(CLIENT, test "${enable_client}" = "yes")
432
433 AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
434                 [enable testing tools]), [enable_tools=${enableval}])
435 if (test "${enable_tools}" = "yes"); then
436         PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
437                                 AC_MSG_ERROR(GnuTLS library is required))
438         AC_SUBST(GNUTLS_CFLAGS)
439         AC_SUBST(GNUTLS_LIBS)
440
441         AC_CHECK_HEADERS(linux/if_alg.h, dummy=yes,
442                 AC_MSG_ERROR(User-space algorithm header files are required))
443 fi
444 AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
445
446 AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
447                 [enable test/example scripts]), [enable_test=${enableval}])
448 AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
449
450 AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
451                 [enable fake device support]), [enable_fake=${enableval}])
452 AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")
453
454 AC_ARG_ENABLE(capng, AC_HELP_STRING([--enable-capng],
455                 [enable capabilities support]), [enable_capng=${enableval}])
456 if (test "${enable_capng}" = "yes"); then
457         PKG_CHECK_MODULES(CAPNG, libcap-ng, dummy=yes,
458                                 AC_MSG_ERROR(Capabilities library is required))
459         AC_SUBST(CAPNG_CFLAGS)
460         AC_SUBST(CAPNG_LIBS)
461         AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
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 AC_OUTPUT(Makefile include/version.h src/connman.service
470                                 scripts/connman doc/version.xml connman.pc)