Remove HAL device detection support
[connman] / configure.ac
1 AC_PREREQ(2.50)
2 AC_INIT()
3
4 AM_INIT_AUTOMAKE(connman, 0.0)
5 AM_CONFIG_HEADER(config.h)
6
7 AM_MAINTAINER_MODE
8
9 AC_PREFIX_DEFAULT(/usr/local)
10
11 if (test "${CFLAGS}" = ""); then
12         CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2"
13 fi
14
15 AC_LANG_C
16
17 AC_PROG_CC
18 AC_PROG_CC_PIE
19 AC_PROG_INSTALL
20
21 m4_define([_LT_AC_TAGCONFIG], [])
22 m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
23
24 AC_DISABLE_STATIC
25 AC_PROG_LIBTOOL
26
27 GTK_DOC_CHECK
28
29 AC_PATH_PROG([XSLTPROC], [xsltproc])
30
31 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
32                         [enable compiling with debugging information]), [
33         if (test "${enableval}" = "yes" &&
34                                 test "${ac_cv_prog_cc_g}" = "yes"); then
35                 CFLAGS="$CFLAGS -g -O0"
36         fi
37 ])
38
39 AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
40                         [enable position independent executables flag]), [
41         if (test "${enableval}" = "yes" &&
42                                 test "${ac_cv_prog_cc_pie}" = "yes"); then
43                 CFLAGS="$CFLAGS -fPIE"
44                 LDFLAGS="$LDFLAGS -pie"
45         fi
46 ])
47
48 AC_PATH_PROG(DHCLIENT, [dhclient], ,$PATH:/sbin:/usr/sbin)
49 AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant], ,$PATH:/sbin:/usr/sbin)
50
51 AC_CHECK_LIB(dl, dlopen, dummy=yes,
52                         AC_MSG_ERROR(dynamic linking loader is required))
53
54 PKG_CHECK_MODULES(GLIB, glib-2.0, dummy=yes,
55                                 AC_MSG_ERROR(glib is required))
56 AC_SUBST(GLIB_CFLAGS)
57 AC_SUBST(GLIB_LIBS)
58
59 PKG_CHECK_MODULES(GTHREAD, gthread-2.0, dummy=yes,
60                                 AC_MSG_ERROR(gthread is required))
61 AC_SUBST(GTHREAD_CFLAGS)
62 AC_SUBST(GTHREAD_LIBS)
63
64 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
65                                 AC_MSG_ERROR(libdbus is required))
66 AC_SUBST(DBUS_CFLAGS)
67 AC_SUBST(DBUS_LIBS)
68
69 AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus'])
70 AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
71
72 PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, polkit_found=yes, polkit_found=no)
73 AC_SUBST(POLKIT_CFLAGS)
74 AC_SUBST(POLKIT_LIBS)
75 AM_CONDITIONAL(POLKIT, test "${polkit_found}" = "yes")
76
77 AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
78                         [enable fake plugin]), [enable_fake=${enableval}])
79 AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")
80
81 AC_OUTPUT(Makefile gdbus/Makefile include/Makefile src/Makefile doc/Makefile
82                 test/Makefile plugins/Makefile scripts/Makefile scripts/connman
83                                 src/connman.service doc/version.xml connman.pc)