~cyphermox/+junk/bluez-debug

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-07-04 13:28:49 UTC
  • mfrom: (1.1.38)
  • Revision ID: package-import@ubuntu.com-20120704132849-tmwu1x7p2vxcclt1
Tags: 4.101-0ubuntu1
* New upstream release
* debian/libbluetooth3.symbols:
  - Updated
* debian/patches/10-unregister_interface_on_exit.patch:
* debian/patches/11-explicitly_close.patch:
* debian/patches/python3.patch:
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
])
12
12
 
13
13
AC_DEFUN([COMPILER_FLAGS], [
14
 
        if (test "${CFLAGS}" = ""); then
15
 
                CFLAGS="-Wall -O2"
16
 
        fi
 
14
        with_cflags=""
17
15
        if (test "$USE_MAINTAINER_MODE" = "yes"); then
18
 
                CFLAGS="$CFLAGS -Werror -Wextra"
19
 
                CFLAGS="$CFLAGS -Wno-unused-parameter"
20
 
                CFLAGS="$CFLAGS -Wno-missing-field-initializers"
21
 
                CFLAGS="$CFLAGS -Wdeclaration-after-statement"
22
 
                CFLAGS="$CFLAGS -Wmissing-declarations"
23
 
                CFLAGS="$CFLAGS -Wredundant-decls"
24
 
                CFLAGS="$CFLAGS -Wcast-align"
25
 
                CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
 
16
                with_cflags="$with_cflags -Wall -Werror -Wextra"
 
17
                with_cflags="$with_cflags -Wno-unused-parameter"
 
18
                with_cflags="$with_cflags -Wno-missing-field-initializers"
 
19
                with_cflags="$with_cflags -Wdeclaration-after-statement"
 
20
                with_cflags="$with_cflags -Wmissing-declarations"
 
21
                with_cflags="$with_cflags -Wredundant-decls"
 
22
                with_cflags="$with_cflags -Wcast-align"
 
23
                with_cflags="$with_cflags -DG_DISABLE_DEPRECATED"
26
24
        fi
 
25
 
 
26
        AC_SUBST([WARNING_CFLAGS], $with_cflags)
27
27
])
28
28
 
29
29
AC_DEFUN([AC_FUNC_PPOLL], [
92
92
])
93
93
 
94
94
AC_DEFUN([AC_PATH_DBUS], [
95
 
        PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
96
 
                                AC_MSG_ERROR(D-Bus library is required))
97
 
        AC_CHECK_LIB(dbus-1, dbus_watch_get_unix_fd, dummy=yes,
98
 
                AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
99
 
                        [Define to 1 if you need the dbus_watch_get_unix_fd() function.]))
100
 
        AC_CHECK_LIB(dbus-1, dbus_connection_can_send_type, dummy=yes,
101
 
                AC_DEFINE(NEED_DBUS_CONNECTION_CAN_SEND_TYPE, 1,
102
 
                        [Define to 1 if you need the dbus_connection_can_send_type() function.]
103
 
))
 
95
        PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
 
96
                                AC_MSG_ERROR(D-Bus >= 1.4 is required))
104
97
        AC_SUBST(DBUS_CFLAGS)
105
98
        AC_SUBST(DBUS_LIBS)
106
99
])
107
100
 
108
101
AC_DEFUN([AC_PATH_GLIB], [
109
 
        PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
110
 
                                AC_MSG_ERROR(GLib library version 2.16 or later is required))
111
 
        AC_CHECK_LIB(glib-2.0, g_slist_free_full, dummy=yes,
112
 
                AC_DEFINE(NEED_G_SLIST_FREE_FULL, 1,
113
 
                        [Define to 1 if you need g_slist_free_full() function.]))
114
 
        AC_CHECK_LIB(glib-2.0, g_list_free_full, dummy=yes,
115
 
                AC_DEFINE(NEED_G_LIST_FREE_FULL, 1,
116
 
                        [Define to 1 if you need g_list_free_full() function.]))
 
102
        PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
 
103
                                AC_MSG_ERROR(GLib >= 2.28 is required))
117
104
        AC_SUBST(GLIB_CFLAGS)
118
105
        AC_SUBST(GLIB_LIBS)
119
106
])
198
185
        serial_enable=yes
199
186
        network_enable=yes
200
187
        sap_enable=no
201
 
        proximity_enable=no
202
 
        time_enable=no
203
 
        alert_enable=no
204
188
        service_enable=yes
205
189
        health_enable=no
206
190
        pnat_enable=no
207
 
        gatt_example_enable=no
208
191
        tools_enable=yes
209
192
        hidd_enable=no
210
193
        pand_enable=no
221
204
        sap_driver=dummy
222
205
        dbusoob_enable=no
223
206
        wiimote_enable=no
224
 
        thermometer_enable=no
 
207
        gatt_enable=no
225
208
 
226
209
        AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [disable code optimization]), [
227
210
                optimization_enable=${enableval}
248
231
        ])
249
232
        AC_SUBST([SAP_DRIVER], [sap-${sap_driver}.c])
250
233
 
251
 
        AC_ARG_ENABLE(proximity, AC_HELP_STRING([--enable-proximity], [enable proximity plugin]), [
252
 
                proximity_enable=${enableval}
253
 
        ])
254
 
 
255
 
        AC_ARG_ENABLE(time, AC_HELP_STRING([--enable-time], [enable Time Profile plugin]), [
256
 
                time_enable=${enableval}
257
 
        ])
258
 
 
259
 
        AC_ARG_ENABLE(alert, AC_HELP_STRING([--enable-alert], [enable Phone Alert Profile plugin]), [
260
 
                alert_enable=${enableval}
261
 
        ])
262
 
 
263
234
        AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [disable serial plugin]), [
264
235
                serial_enable=${enableval}
265
236
        ])
284
255
                pnat_enable=${enableval}
285
256
        ])
286
257
 
287
 
        AC_ARG_ENABLE(gatt-example, AC_HELP_STRING([--enable-gatt-example], [enable GATT example plugin]), [
288
 
                gatt_example_enable=${enableval}
289
 
        ])
290
 
 
291
258
        AC_ARG_ENABLE(gstreamer, AC_HELP_STRING([--enable-gstreamer], [enable GStreamer support]), [
292
259
                gstreamer_enable=${enableval}
293
260
        ])
370
337
                hal_enable=${enableval}
371
338
        ])
372
339
 
373
 
        AC_ARG_ENABLE(thermometer, AC_HELP_STRING([--enable-thermometer], [enable thermometer plugin]), [
374
 
                thermometer_enable=${enableval}
 
340
        AC_ARG_ENABLE(gatt, AC_HELP_STRING([--enable-gatt], [enable gatt module]), [
 
341
                gatt_enable=${enableval}
375
342
        ])
376
343
 
 
344
        misc_cflags=""
 
345
        misc_ldflags=""
 
346
 
377
347
        if (test "${fortify_enable}" = "yes"); then
378
 
                CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
 
348
                misc_cflags="$misc_cflags -D_FORTIFY_SOURCE=2"
379
349
        fi
380
350
 
381
351
        if (test "${pie_enable}" = "yes" && test "${ac_cv_prog_cc_pie}" = "yes"); then
382
 
                CFLAGS="$CFLAGS -fPIC"
383
 
                LDFLAGS="$LDFLAGS -pie"
 
352
                misc_cflags="$misc_cflags -fPIC"
 
353
                misc_ldflags="$misc_ldflags -pie"
384
354
        fi
385
355
 
386
356
        if (test "${debug_enable}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then
387
 
                CFLAGS="$CFLAGS -g"
 
357
                misc_cflags="$misc_cflags -g"
388
358
        fi
389
359
 
390
360
        if (test "${optimization_enable}" = "no"); then
391
 
                CFLAGS="$CFLAGS -O0"
 
361
                misc_cflags="$misc_cflags -O0"
392
362
        fi
393
363
 
 
364
        AC_SUBST([MISC_CFLAGS], $misc_cflags)
 
365
        AC_SUBST([MISC_LDFLAGS], $misc_ldflags)
 
366
 
394
367
        if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then
395
368
                AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
396
369
        fi
406
379
        AM_CONDITIONAL(SERIALPLUGIN, test "${serial_enable}" = "yes")
407
380
        AM_CONDITIONAL(NETWORKPLUGIN, test "${network_enable}" = "yes")
408
381
        AM_CONDITIONAL(SAPPLUGIN, test "${sap_enable}" = "yes")
409
 
        AM_CONDITIONAL(PROXIMITYPLUGIN, test "${proximity_enable}" = "yes")
410
 
        AM_CONDITIONAL(TIMEPLUGIN, test "${time_enable}" = "yes")
411
 
        AM_CONDITIONAL(ALERTPLUGIN, test "${alert_enable}" = "yes")
412
382
        AM_CONDITIONAL(SERVICEPLUGIN, test "${service_enable}" = "yes")
413
383
        AM_CONDITIONAL(HEALTHPLUGIN, test "${health_enable}" = "yes")
414
384
        AM_CONDITIONAL(MCAP, test "${health_enable}" = "yes")
415
385
        AM_CONDITIONAL(HAL, test "${hal_enable}" = "yes")
416
386
        AM_CONDITIONAL(READLINE, test "${readline_found}" = "yes")
417
 
        AM_CONDITIONAL(GATT_EXAMPLE_PLUGIN, test "${gatt_example_enable}" = "yes")
418
387
        AM_CONDITIONAL(PNATPLUGIN, test "${pnat_enable}" = "yes")
419
388
        AM_CONDITIONAL(HIDD, test "${hidd_enable}" = "yes")
420
389
        AM_CONDITIONAL(PAND, test "${pand_enable}" = "yes")
430
399
        AM_CONDITIONAL(MAEMO6PLUGIN, test "${maemo6_enable}" = "yes")
431
400
        AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
432
401
        AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes")
433
 
        AM_CONDITIONAL(THERMOMETERPLUGIN, test "${thermometer_enable}" = "yes")
 
402
        AM_CONDITIONAL(GATTMODULES, test "${gatt_enable}" = "yes")
434
403
])