63
67
AC_CHECK_LIB(dl, dlopen, dummy=yes,
64
68
AC_MSG_ERROR(dynamic linking loader is required))
66
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
67
AC_MSG_ERROR(GLib >= 2.28 is required))
70
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.22, dummy=yes,
71
AC_MSG_ERROR(GLib >= 2.22 is required))
68
72
AC_SUBST(GLIB_CFLAGS)
69
73
AC_SUBST(GLIB_LIBS)
76
80
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
79
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
80
AC_MSG_ERROR(D-Bus >= 1.4 is required))
83
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
84
AC_MSG_ERROR(D-Bus >= 1.0 is required))
85
AC_CHECK_LIB(dbus-1, dbus_watch_get_unix_fd, dummy=yes,
86
AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
87
[Define to 1 if you need the dbus_watch_get_unix_fd() function.]))
88
AC_CHECK_LIB(dbus-1, dbus_connection_can_send_type, dummy=yes,
89
AC_DEFINE(NEED_DBUS_CONNECTION_CAN_SEND_TYPE, 1,
90
[Define to 1 if you need the dbus_connection_can_send_type() function.]
81
92
AC_SUBST(DBUS_CFLAGS)
82
93
AC_SUBST(DBUS_LIBS)
111
122
AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
113
AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
114
[enable test/example scripts]), [enable_test=${enableval}])
115
AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
117
AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
118
[enable testing tools]), [enable_tools=${enableval}])
119
if (test "${enable_tools}" = "yes"); then
120
PKG_CHECK_MODULES(USB, libusb-1.0, dummy=yes,
121
AC_MSG_ERROR(USB library is required))
124
AC_ARG_ENABLE(capng, AC_HELP_STRING([--enable-capng],
125
[enable capabilities support]), [enable_capng=${enableval}])
126
if (test "${enable_capng}" = "yes"); then
127
PKG_CHECK_MODULES(CAPNG, libcap-ng, dummy=yes,
128
AC_MSG_ERROR(Capabilities library is required))
129
AC_SUBST(CAPNG_CFLAGS)
131
AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
125
AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
127
AC_ARG_ENABLE(dundee, AC_HELP_STRING([--enable-dundee],
128
[enable dialup deamon support]), [enable_dundee=${enableval}])
129
AM_CONDITIONAL(DUNDEE, test "${enable_dundee}" = "yes")
131
134
AC_ARG_ENABLE(udev, AC_HELP_STRING([--disable-udev],
132
[disable udev modem detection support]),
135
[don't use udev support even if available]),
133
136
[enable_udev=${enableval}])
134
137
if (test "${enable_udev}" != "no"); then
135
138
PKG_CHECK_MODULES(UDEV, libudev >= 143, [enable_udev="yes"],
146
149
AC_SUBST(UDEV_LIBS)
147
150
AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes")
152
AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
153
[enable testing tools]), [enable_tools=${enableval}])
154
if (test "${enable_tools}" = "yes"); then
155
PKG_CHECK_MODULES(USB, libusb-1.0, dummy=yes,
156
AC_MSG_ERROR(USB library is required))
160
AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
149
162
AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
150
163
[disable ETSI AT modem support]),
151
164
[enable_atmodem=${enableval}])
167
180
[enable_isimodem=${enableval}])
168
181
AM_CONDITIONAL(ISIMODEM, test "${enable_isimodem}" != "no")
170
AC_ARG_ENABLE(rilmodem, AC_HELP_STRING([--disable-rilmodem],
171
[disable RIL modem support]),
172
[enable_rilmodem=${enableval}])
173
AM_CONDITIONAL(RILMODEM, test "${enable_rilmodem}" != "no")
175
AC_ARG_ENABLE(qmimodem, AC_HELP_STRING([--disable-qmimodem],
176
[disable Qualcomm QMI modem support]),
177
[enable_qmimodem=${enableval}])
178
AM_CONDITIONAL(QMIMODEM, test "${enable_qmimodem}" != "no")
180
183
AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth],
181
184
[disable Bluetooth modem support]),
182
185
[enable_bluetooth=${enableval}])
183
186
if (test "${enable_bluetooth}" != "no"); then
184
PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99, dummy=yes,
185
AC_MSG_ERROR(Bluetooth library >= 4.99 is required))
187
PKG_CHECK_MODULES(BLUEZ, bluez >= 4.30, dummy=yes,
188
AC_MSG_ERROR(Bluetooth library >= 4.30 is required))
187
190
AC_SUBST(BLUEZ_CFLAGS)
188
191
AC_SUBST(BLUEZ_LIBS)
189
192
AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
191
AC_ARG_ENABLE(nettime, AC_HELP_STRING([--disable-nettime],
192
[disable Nettime plugin]),
193
[enable_nettime=${enableval}])
194
AM_CONDITIONAL(NETTIME, test "${enable_nettime}" != "no")
196
AC_ARG_WITH([provisiondb], AC_HELP_STRING([--with-provisiondb=FILE],
197
[location of provision database]), [path_provisiondb=${withval}])
199
AC_ARG_ENABLE(provision, AC_HELP_STRING([--disable-provision],
200
[disable provisioning suport]),
201
[enable_provision=${enableval}])
202
if (test "${enable_provision}" != "no"); then
203
if (test -n "${path_provisiondb}"); then
204
AC_DEFINE_UNQUOTED(PROVIDER_DATABASE, "${path_provisiondb}",
205
[Mobile provider database])
207
AC_MSG_CHECKING([for mobile-broadband-provider-info])
208
PKG_CHECK_EXISTS(mobile-broadband-provider-info,
209
_PKG_CONFIG(PROVIDER_DATABASE, [variable=database],
210
[mobile-broadband-provider-info])
211
AC_DEFINE_UNQUOTED(PROVIDER_DATABASE,
212
"$pkg_cv_PROVIDER_DATABASE",
213
[Mobile provider database])
214
AC_MSG_RESULT([yes]),
215
AC_MSG_ERROR(Mobile broadband provider database is required))
218
AM_CONDITIONAL(PROVISION, test "${enable_provision}" != "no")
220
194
AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
221
[do not install configuration and data files]),
195
[don't install configuration and data files]),
222
196
[enable_datafiles=${enableval}])
223
198
AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
225
200
if (test "${prefix}" = "NONE"); then