2004-08-13 00:00:35 +08:00
|
|
|
AC_DEFUN([AC_PROG_CC_PIE], [
|
|
|
|
AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], ac_cv_prog_cc_pie, [
|
|
|
|
echo 'void f(){}' > conftest.c
|
|
|
|
if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then
|
|
|
|
ac_cv_prog_cc_pie=yes
|
|
|
|
else
|
|
|
|
ac_cv_prog_cc_pie=no
|
|
|
|
fi
|
|
|
|
rm -rf conftest*
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2008-12-23 13:04:54 +08:00
|
|
|
AC_DEFUN([COMPILER_FLAGS], [
|
|
|
|
if (test "${CFLAGS}" = ""); then
|
2009-07-04 16:14:05 +08:00
|
|
|
CFLAGS="-Wall -O2"
|
2008-12-23 13:04:54 +08:00
|
|
|
fi
|
|
|
|
if (test "$USE_MAINTAINER_MODE" = "yes"); then
|
2011-03-05 03:41:43 +08:00
|
|
|
CFLAGS="$CFLAGS -Werror -Wextra"
|
|
|
|
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
|
|
|
CFLAGS="$CFLAGS -Wno-missing-field-initializers"
|
|
|
|
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
|
|
|
|
CFLAGS="$CFLAGS -Wmissing-declarations"
|
|
|
|
CFLAGS="$CFLAGS -Wredundant-decls"
|
|
|
|
CFLAGS="$CFLAGS -Wcast-align"
|
|
|
|
CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
|
2008-12-23 13:04:54 +08:00
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
2006-08-16 18:54:06 +08:00
|
|
|
AC_DEFUN([AC_FUNC_PPOLL], [
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_CHECK_FUNC(ppoll, dummy=yes, AC_DEFINE(NEED_PPOLL, 1,
|
|
|
|
[Define to 1 if you need the ppoll() function.]))
|
2006-08-16 18:54:06 +08:00
|
|
|
])
|
|
|
|
|
2004-08-13 00:00:35 +08:00
|
|
|
AC_DEFUN([AC_INIT_BLUEZ], [
|
2005-10-30 03:25:42 +08:00
|
|
|
AC_PREFIX_DEFAULT(/usr/local)
|
2004-08-13 00:00:35 +08:00
|
|
|
|
|
|
|
if (test "${prefix}" = "NONE"); then
|
|
|
|
dnl no prefix and no sysconfdir, so default to /etc
|
|
|
|
if (test "$sysconfdir" = '${prefix}/etc'); then
|
|
|
|
AC_SUBST([sysconfdir], ['/etc'])
|
|
|
|
fi
|
|
|
|
|
2005-04-22 04:18:09 +08:00
|
|
|
dnl no prefix and no localstatedir, so default to /var
|
|
|
|
if (test "$localstatedir" = '${prefix}/var'); then
|
|
|
|
AC_SUBST([localstatedir], ['/var'])
|
|
|
|
fi
|
|
|
|
|
2006-08-10 19:08:49 +08:00
|
|
|
dnl no prefix and no libexecdir, so default to /lib
|
2006-08-10 19:22:12 +08:00
|
|
|
if (test "$libexecdir" = '${exec_prefix}/libexec'); then
|
2006-08-10 19:08:49 +08:00
|
|
|
AC_SUBST([libexecdir], ['/lib'])
|
|
|
|
fi
|
|
|
|
|
2004-08-13 00:00:35 +08:00
|
|
|
dnl no prefix and no mandir, so use ${prefix}/share/man as default
|
|
|
|
if (test "$mandir" = '${prefix}/man'); then
|
|
|
|
AC_SUBST([mandir], ['${prefix}/share/man'])
|
|
|
|
fi
|
|
|
|
|
|
|
|
prefix="${ac_default_prefix}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (test "${libdir}" = '${exec_prefix}/lib'); then
|
|
|
|
libdir="${prefix}/lib"
|
|
|
|
fi
|
|
|
|
|
2008-08-05 02:09:56 +08:00
|
|
|
plugindir="${libdir}/bluetooth/plugins"
|
|
|
|
|
2004-08-13 00:00:35 +08:00
|
|
|
if (test "$sysconfdir" = '${prefix}/etc'); then
|
|
|
|
configdir="${prefix}/etc/bluetooth"
|
|
|
|
else
|
|
|
|
configdir="${sysconfdir}/bluetooth"
|
|
|
|
fi
|
|
|
|
|
2005-04-22 04:18:09 +08:00
|
|
|
if (test "$localstatedir" = '${prefix}/var'); then
|
|
|
|
storagedir="${prefix}/var/lib/bluetooth"
|
|
|
|
else
|
|
|
|
storagedir="${localstatedir}/lib/bluetooth"
|
|
|
|
fi
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_DEFINE_UNQUOTED(CONFIGDIR, "${configdir}",
|
|
|
|
[Directory for the configuration files])
|
|
|
|
AC_DEFINE_UNQUOTED(STORAGEDIR, "${storagedir}",
|
|
|
|
[Directory for the storage files])
|
2009-06-27 23:01:37 +08:00
|
|
|
|
|
|
|
AC_SUBST(CONFIGDIR, "${configdir}")
|
|
|
|
AC_SUBST(STORAGEDIR, "${storagedir}")
|
2009-07-06 00:48:24 +08:00
|
|
|
|
2009-07-07 15:57:10 +08:00
|
|
|
UDEV_DATADIR="`$PKG_CONFIG --variable=udevdir udev`"
|
2009-07-06 01:45:46 +08:00
|
|
|
if (test -z "${UDEV_DATADIR}"); then
|
|
|
|
UDEV_DATADIR="${sysconfdir}/udev/rules.d"
|
2009-07-07 15:57:10 +08:00
|
|
|
else
|
|
|
|
UDEV_DATADIR="${UDEV_DATADIR}/rules.d"
|
2009-07-06 01:45:46 +08:00
|
|
|
fi
|
2009-07-06 00:48:24 +08:00
|
|
|
AC_SUBST(UDEV_DATADIR)
|
2004-04-03 14:20:54 +08:00
|
|
|
])
|
|
|
|
|
2005-09-10 09:23:19 +08:00
|
|
|
AC_DEFUN([AC_PATH_DBUS], [
|
2008-06-04 04:20:46 +08:00
|
|
|
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
|
|
|
|
AC_MSG_ERROR(D-Bus library is required))
|
2007-10-04 22:01:06 +08:00
|
|
|
AC_CHECK_LIB(dbus-1, dbus_watch_get_unix_fd, dummy=yes,
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
|
2008-06-04 04:20:46 +08:00
|
|
|
[Define to 1 if you need the dbus_watch_get_unix_fd() function.]))
|
2010-01-31 00:26:23 +08:00
|
|
|
AC_CHECK_LIB(dbus-1, dbus_connection_can_send_type, dummy=yes,
|
|
|
|
AC_DEFINE(NEED_DBUS_CONNECTION_CAN_SEND_TYPE, 1,
|
|
|
|
[Define to 1 if you need the dbus_connection_can_send_type() function.]
|
|
|
|
))
|
2008-06-04 04:20:46 +08:00
|
|
|
AC_SUBST(DBUS_CFLAGS)
|
|
|
|
AC_SUBST(DBUS_LIBS)
|
2005-09-10 09:23:19 +08:00
|
|
|
])
|
|
|
|
|
2008-02-01 19:42:38 +08:00
|
|
|
AC_DEFUN([AC_PATH_GLIB], [
|
2011-02-03 04:04:05 +08:00
|
|
|
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
|
|
|
AC_MSG_ERROR(GLib library version 2.16 or later is required))
|
2008-02-01 19:42:38 +08:00
|
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
|
|
AC_SUBST(GLIB_LIBS)
|
|
|
|
])
|
|
|
|
|
2006-11-10 04:12:45 +08:00
|
|
|
AC_DEFUN([AC_PATH_GSTREAMER], [
|
2011-02-23 21:13:07 +08:00
|
|
|
PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 >= 0.10.30 gstreamer-plugins-base-0.10, gstreamer_found=yes,
|
|
|
|
AC_MSG_WARN(GStreamer library version 0.10.30 or later is required);gstreamer_found=no)
|
2006-11-10 04:12:45 +08:00
|
|
|
AC_SUBST(GSTREAMER_CFLAGS)
|
|
|
|
AC_SUBST(GSTREAMER_LIBS)
|
2007-08-22 22:09:24 +08:00
|
|
|
GSTREAMER_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-0.10`
|
|
|
|
AC_SUBST(GSTREAMER_PLUGINSDIR)
|
2006-11-10 04:12:45 +08:00
|
|
|
])
|
|
|
|
|
2007-08-25 00:55:28 +08:00
|
|
|
AC_DEFUN([AC_PATH_PULSE], [
|
2008-04-12 07:39:03 +08:00
|
|
|
PKG_CHECK_MODULES(PULSE, libpulse, pulse_found=yes, pulse_found=no)
|
|
|
|
AC_SUBST(PULSE_CFLAGS)
|
|
|
|
AC_SUBST(PULSE_LIBS)
|
2007-08-25 00:55:28 +08:00
|
|
|
])
|
|
|
|
|
2004-11-12 02:22:27 +08:00
|
|
|
AC_DEFUN([AC_PATH_ALSA], [
|
2007-01-15 18:47:30 +08:00
|
|
|
PKG_CHECK_MODULES(ALSA, alsa, alsa_found=yes, alsa_found=no)
|
2007-11-26 18:24:56 +08:00
|
|
|
AC_CHECK_LIB(rt, clock_gettime, ALSA_LIBS="$ALSA_LIBS -lrt", alsa_found=no)
|
2004-11-12 02:22:27 +08:00
|
|
|
AC_SUBST(ALSA_CFLAGS)
|
|
|
|
AC_SUBST(ALSA_LIBS)
|
|
|
|
])
|
|
|
|
|
2004-07-20 23:35:20 +08:00
|
|
|
AC_DEFUN([AC_PATH_USB], [
|
2007-01-15 18:47:30 +08:00
|
|
|
PKG_CHECK_MODULES(USB, libusb, usb_found=yes, usb_found=no)
|
2004-07-21 23:24:22 +08:00
|
|
|
AC_SUBST(USB_CFLAGS)
|
2004-07-16 02:29:31 +08:00
|
|
|
AC_SUBST(USB_LIBS)
|
2006-11-13 15:17:40 +08:00
|
|
|
AC_CHECK_LIB(usb, usb_get_busses, dummy=yes,
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_DEFINE(NEED_USB_GET_BUSSES, 1,
|
|
|
|
[Define to 1 if you need the usb_get_busses() function.]))
|
2006-11-13 15:17:40 +08:00
|
|
|
AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes,
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_DEFINE(NEED_USB_INTERRUPT_READ, 1,
|
|
|
|
[Define to 1 if you need the usb_interrupt_read() function.]))
|
2006-11-13 15:17:40 +08:00
|
|
|
])
|
|
|
|
|
2007-10-25 19:06:39 +08:00
|
|
|
AC_DEFUN([AC_PATH_SNDFILE], [
|
|
|
|
PKG_CHECK_MODULES(SNDFILE, sndfile, sndfile_found=yes, sndfile_found=no)
|
|
|
|
AC_SUBST(SNDFILE_CFLAGS)
|
|
|
|
AC_SUBST(SNDFILE_LIBS)
|
2004-08-13 00:00:35 +08:00
|
|
|
])
|
|
|
|
|
2011-02-14 23:07:18 +08:00
|
|
|
AC_DEFUN([AC_PATH_READLINE], [
|
|
|
|
AC_CHECK_HEADER(readline/readline.h,
|
|
|
|
AC_CHECK_LIB(readline, main,
|
|
|
|
[ readline_found=yes
|
|
|
|
AC_SUBST(READLINE_LIBS, "-lreadline")
|
|
|
|
], readline_found=no),
|
|
|
|
[])
|
|
|
|
])
|
|
|
|
|
2010-09-06 22:43:48 +08:00
|
|
|
AC_DEFUN([AC_PATH_OUI], [
|
|
|
|
AC_ARG_WITH(ouifile,
|
|
|
|
AS_HELP_STRING([--with-ouifile=PATH],[Path to the oui.txt file @<:@auto@:>@]),
|
|
|
|
[ac_with_ouifile=$withval],
|
|
|
|
[ac_with_ouifile="/var/lib/misc/oui.txt"])
|
|
|
|
AC_DEFINE_UNQUOTED(OUIFILE, ["$ac_with_ouifile"], [Define the OUI file path])
|
|
|
|
])
|
|
|
|
|
2004-08-13 00:00:35 +08:00
|
|
|
AC_DEFUN([AC_ARG_BLUEZ], [
|
|
|
|
debug_enable=no
|
2009-07-16 00:09:02 +08:00
|
|
|
optimization_enable=yes
|
2008-06-16 08:49:28 +08:00
|
|
|
fortify_enable=yes
|
2008-08-05 02:20:44 +08:00
|
|
|
pie_enable=yes
|
2007-10-25 19:06:39 +08:00
|
|
|
sndfile_enable=${sndfile_found}
|
2010-09-06 18:44:31 +08:00
|
|
|
hal_enable=no
|
2007-01-23 15:29:27 +08:00
|
|
|
usb_enable=${usb_found}
|
2007-04-04 17:39:23 +08:00
|
|
|
alsa_enable=${alsa_found}
|
2007-08-22 21:19:41 +08:00
|
|
|
gstreamer_enable=${gstreamer_found}
|
2008-02-10 13:12:11 +08:00
|
|
|
audio_enable=yes
|
|
|
|
input_enable=yes
|
|
|
|
serial_enable=yes
|
|
|
|
network_enable=yes
|
2011-02-24 20:13:24 +08:00
|
|
|
sap_enable=no
|
2008-09-03 06:17:55 +08:00
|
|
|
service_enable=yes
|
2010-07-27 22:11:29 +08:00
|
|
|
health_enable=no
|
2010-01-26 21:24:14 +08:00
|
|
|
pnat_enable=no
|
2010-05-26 06:01:23 +08:00
|
|
|
attrib_enable=no
|
2009-12-24 23:37:54 +08:00
|
|
|
tracer_enable=no
|
2008-06-18 23:35:40 +08:00
|
|
|
tools_enable=yes
|
2008-02-10 13:12:11 +08:00
|
|
|
hidd_enable=no
|
|
|
|
pand_enable=no
|
|
|
|
dund_enable=no
|
2004-07-29 00:31:26 +08:00
|
|
|
cups_enable=no
|
2008-02-10 13:27:22 +08:00
|
|
|
test_enable=no
|
2008-06-18 23:35:40 +08:00
|
|
|
bccmd_enable=no
|
2009-06-30 22:30:16 +08:00
|
|
|
pcmcia_enable=no
|
2008-06-18 23:35:40 +08:00
|
|
|
hid2hci_enable=no
|
|
|
|
dfutool_enable=no
|
2009-06-30 22:30:16 +08:00
|
|
|
udevrules_enable=yes
|
2006-09-01 08:20:45 +08:00
|
|
|
configfiles_enable=yes
|
2008-09-02 03:55:09 +08:00
|
|
|
telephony_driver=dummy
|
2010-07-09 17:05:56 +08:00
|
|
|
maemo6_enable=no
|
2011-03-16 20:10:20 +08:00
|
|
|
sap_driver=dummy
|
2004-08-13 00:00:35 +08:00
|
|
|
|
2009-07-16 00:09:02 +08:00
|
|
|
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [disable code optimization]), [
|
2009-07-16 00:15:49 +08:00
|
|
|
optimization_enable=${enableval}
|
2009-07-16 00:09:02 +08:00
|
|
|
])
|
|
|
|
|
2005-10-10 06:45:07 +08:00
|
|
|
AC_ARG_ENABLE(fortify, AC_HELP_STRING([--disable-fortify], [disable compile time buffer checks]), [
|
|
|
|
fortify_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(pie, AC_HELP_STRING([--disable-pie], [disable position independent executables flag]), [
|
2008-06-16 08:49:28 +08:00
|
|
|
pie_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(network, AC_HELP_STRING([--disable-network], [disable network plugin]), [
|
|
|
|
network_enable=${enableval}
|
2004-07-27 22:08:43 +08:00
|
|
|
])
|
|
|
|
|
2011-02-24 20:13:24 +08:00
|
|
|
AC_ARG_ENABLE(sap, AC_HELP_STRING([--enable-sap], [enable sap plugin]), [
|
|
|
|
sap_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2011-03-16 20:10:20 +08:00
|
|
|
AC_ARG_WITH(sap, AC_HELP_STRING([--with-sap=DRIVER], [select SAP driver]), [
|
|
|
|
sap_driver=${withval}
|
|
|
|
])
|
|
|
|
AC_SUBST([SAP_DRIVER], [sap-${sap_driver}.c])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [disable serial plugin]), [
|
|
|
|
serial_enable=${enableval}
|
2007-01-23 15:29:27 +08:00
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(input, AC_HELP_STRING([--disable-input], [disable input plugin]), [
|
|
|
|
input_enable=${enableval}
|
2006-08-21 08:55:17 +08:00
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(audio, AC_HELP_STRING([--disable-audio], [disable audio plugin]), [
|
|
|
|
audio_enable=${enableval}
|
2007-08-22 21:19:41 +08:00
|
|
|
])
|
|
|
|
|
2008-09-03 06:17:55 +08:00
|
|
|
AC_ARG_ENABLE(service, AC_HELP_STRING([--disable-service], [disable service plugin]), [
|
|
|
|
service_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2010-07-27 22:11:29 +08:00
|
|
|
AC_ARG_ENABLE(health, AC_HELP_STRING([--enable-health], [enable health plugin]), [
|
|
|
|
health_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2010-01-26 21:24:14 +08:00
|
|
|
AC_ARG_ENABLE(pnat, AC_HELP_STRING([--enable-pnat], [enable pnat plugin]), [
|
|
|
|
pnat_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2010-05-26 06:01:23 +08:00
|
|
|
AC_ARG_ENABLE(attrib, AC_HELP_STRING([--enable-attrib], [enable attrib plugin]), [
|
|
|
|
attrib_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2007-08-22 21:19:41 +08:00
|
|
|
AC_ARG_ENABLE(gstreamer, AC_HELP_STRING([--enable-gstreamer], [enable GStreamer support]), [
|
|
|
|
gstreamer_enable=${enableval}
|
2007-04-04 17:39:23 +08:00
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], [enable ALSA support]), [
|
|
|
|
alsa_enable=${enableval}
|
2007-05-08 20:52:54 +08:00
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(usb, AC_HELP_STRING([--enable-usb], [enable USB support]), [
|
|
|
|
usb_enable=${enableval}
|
2007-01-23 15:18:07 +08:00
|
|
|
])
|
|
|
|
|
2009-12-24 23:37:54 +08:00
|
|
|
AC_ARG_ENABLE(tracer, AC_HELP_STRING([--enable-tracer], [install Tracing daemon]), [
|
|
|
|
tracer_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools], [install Bluetooth utilities]), [
|
|
|
|
tools_enable=${enableval}
|
2007-08-25 00:55:28 +08:00
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(bccmd, AC_HELP_STRING([--enable-bccmd], [install BCCMD interface utility]), [
|
|
|
|
bccmd_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2009-06-30 22:53:08 +08:00
|
|
|
AC_ARG_ENABLE(pcmcia, AC_HELP_STRING([--enable-pcmcia], [install PCMCIA serial script]), [
|
2009-06-30 22:30:16 +08:00
|
|
|
pcmcia_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2008-06-04 04:07:34 +08:00
|
|
|
AC_ARG_ENABLE(hid2hci, AC_HELP_STRING([--enable-hid2hci], [install HID mode switching utility]), [
|
|
|
|
hid2hci_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(dfutool, AC_HELP_STRING([--enable-dfutool], [install DFU firmware upgrade utility]), [
|
|
|
|
dfutool_enable=${enableval}
|
2007-04-09 03:56:52 +08:00
|
|
|
])
|
|
|
|
|
2007-01-24 19:02:52 +08:00
|
|
|
AC_ARG_ENABLE(hidd, AC_HELP_STRING([--enable-hidd], [install HID daemon]), [
|
|
|
|
hidd_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2007-03-22 05:33:12 +08:00
|
|
|
AC_ARG_ENABLE(pand, AC_HELP_STRING([--enable-pand], [install PAN daemon]), [
|
|
|
|
pand_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2008-02-10 13:12:11 +08:00
|
|
|
AC_ARG_ENABLE(dund, AC_HELP_STRING([--enable-dund], [install DUN daemon]), [
|
|
|
|
dund_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2004-07-27 21:01:42 +08:00
|
|
|
AC_ARG_ENABLE(cups, AC_HELP_STRING([--enable-cups], [install CUPS backend support]), [
|
|
|
|
cups_enable=${enableval}
|
|
|
|
])
|
2004-11-12 02:22:27 +08:00
|
|
|
|
2008-06-04 04:20:46 +08:00
|
|
|
AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test], [install test programs]), [
|
|
|
|
test_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2009-06-30 22:53:08 +08:00
|
|
|
AC_ARG_ENABLE(udevrules, AC_HELP_STRING([--enable-udevrules], [install Bluetooth udev rules]), [
|
2009-06-30 22:30:16 +08:00
|
|
|
udevrules_enable=${enableval}
|
2004-08-12 20:47:37 +08:00
|
|
|
])
|
|
|
|
|
2009-06-30 22:30:16 +08:00
|
|
|
AC_ARG_ENABLE(configfiles, AC_HELP_STRING([--enable-configfiles], [install Bluetooth configuration files]), [
|
|
|
|
configfiles_enable=${enableval}
|
2006-08-20 10:02:20 +08:00
|
|
|
])
|
|
|
|
|
2004-08-13 00:00:35 +08:00
|
|
|
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [
|
|
|
|
debug_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2008-09-02 03:55:09 +08:00
|
|
|
AC_ARG_WITH(telephony, AC_HELP_STRING([--with-telephony=DRIVER], [select telephony driver]), [
|
|
|
|
telephony_driver=${withval}
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST([TELEPHONY_DRIVER], [telephony-${telephony_driver}.c])
|
|
|
|
|
2010-07-09 17:05:56 +08:00
|
|
|
AC_ARG_ENABLE(maemo6, AC_HELP_STRING([--enable-maemo6], [compile with maemo6 plugin]), [
|
|
|
|
maemo6_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2010-09-06 18:44:31 +08:00
|
|
|
AC_ARG_ENABLE(hal, AC_HELP_STRING([--enable-hal], [Use HAL to determine adapter class]), [
|
|
|
|
hal_enable=${enableval}
|
|
|
|
])
|
|
|
|
|
2005-10-10 06:45:07 +08:00
|
|
|
if (test "${fortify_enable}" = "yes"); then
|
|
|
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
|
|
|
|
fi
|
|
|
|
|
2008-06-16 08:49:28 +08:00
|
|
|
if (test "${pie_enable}" = "yes" && test "${ac_cv_prog_cc_pie}" = "yes"); then
|
2008-08-05 02:20:44 +08:00
|
|
|
CFLAGS="$CFLAGS -fPIC"
|
2008-06-16 08:49:28 +08:00
|
|
|
LDFLAGS="$LDFLAGS -pie"
|
|
|
|
fi
|
|
|
|
|
2004-08-13 00:00:35 +08:00
|
|
|
if (test "${debug_enable}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then
|
2009-07-16 00:09:02 +08:00
|
|
|
CFLAGS="$CFLAGS -g"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (test "${optimization_enable}" = "no"); then
|
|
|
|
CFLAGS="$CFLAGS -O0"
|
2004-08-13 00:00:35 +08:00
|
|
|
fi
|
2008-06-04 04:07:34 +08:00
|
|
|
|
2007-01-23 15:29:27 +08:00
|
|
|
if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then
|
|
|
|
AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
|
|
|
|
fi
|
|
|
|
|
2007-10-25 19:06:39 +08:00
|
|
|
AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes")
|
2007-01-23 15:29:27 +08:00
|
|
|
AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes")
|
2010-03-09 07:01:32 +08:00
|
|
|
AM_CONDITIONAL(SBC, test "${alsa_enable}" = "yes" || test "${gstreamer_enable}" = "yes" ||
|
|
|
|
test "${test_enable}" = "yes")
|
2007-04-04 17:39:23 +08:00
|
|
|
AM_CONDITIONAL(ALSA, test "${alsa_enable}" = "yes" && test "${alsa_found}" = "yes")
|
2007-08-22 21:19:41 +08:00
|
|
|
AM_CONDITIONAL(GSTREAMER, test "${gstreamer_enable}" = "yes" && test "${gstreamer_found}" = "yes")
|
2008-06-04 04:07:34 +08:00
|
|
|
AM_CONDITIONAL(AUDIOPLUGIN, test "${audio_enable}" = "yes")
|
|
|
|
AM_CONDITIONAL(INPUTPLUGIN, test "${input_enable}" = "yes")
|
|
|
|
AM_CONDITIONAL(SERIALPLUGIN, test "${serial_enable}" = "yes")
|
|
|
|
AM_CONDITIONAL(NETWORKPLUGIN, test "${network_enable}" = "yes")
|
2011-02-24 20:13:24 +08:00
|
|
|
AM_CONDITIONAL(SAPPLUGIN, test "${sap_enable}" = "yes")
|
2008-09-03 06:17:55 +08:00
|
|
|
AM_CONDITIONAL(SERVICEPLUGIN, test "${service_enable}" = "yes")
|
2010-07-27 22:11:29 +08:00
|
|
|
AM_CONDITIONAL(HEALTHPLUGIN, test "${health_enable}" = "yes")
|
2010-09-18 15:58:32 +08:00
|
|
|
AM_CONDITIONAL(MCAP, test "${health_enable}" = "yes")
|
2010-09-06 18:44:31 +08:00
|
|
|
AM_CONDITIONAL(HAL, test "${hal_enable}" = "yes")
|
2011-02-14 23:07:18 +08:00
|
|
|
AM_CONDITIONAL(READLINE, test "${readline_found}" = "yes")
|
2010-05-26 06:01:23 +08:00
|
|
|
AM_CONDITIONAL(ATTRIBPLUGIN, test "${attrib_enable}" = "yes")
|
2009-08-23 15:40:59 +08:00
|
|
|
AM_CONDITIONAL(ECHOPLUGIN, test "no" = "yes")
|
2010-01-26 21:24:14 +08:00
|
|
|
AM_CONDITIONAL(PNATPLUGIN, test "${pnat_enable}" = "yes")
|
2009-12-24 23:37:54 +08:00
|
|
|
AM_CONDITIONAL(TRACER, test "${tracer_enable}" = "yes")
|
2007-01-24 19:21:31 +08:00
|
|
|
AM_CONDITIONAL(HIDD, test "${hidd_enable}" = "yes")
|
2007-03-22 05:33:12 +08:00
|
|
|
AM_CONDITIONAL(PAND, test "${pand_enable}" = "yes")
|
2008-02-10 13:12:11 +08:00
|
|
|
AM_CONDITIONAL(DUND, test "${dund_enable}" = "yes")
|
2004-07-21 23:24:22 +08:00
|
|
|
AM_CONDITIONAL(CUPS, test "${cups_enable}" = "yes")
|
2008-02-10 13:27:22 +08:00
|
|
|
AM_CONDITIONAL(TEST, test "${test_enable}" = "yes")
|
|
|
|
AM_CONDITIONAL(TOOLS, test "${tools_enable}" = "yes")
|
2007-01-23 15:29:27 +08:00
|
|
|
AM_CONDITIONAL(BCCMD, test "${bccmd_enable}" = "yes")
|
2009-06-30 22:30:16 +08:00
|
|
|
AM_CONDITIONAL(PCMCIA, test "${pcmcia_enable}" = "yes")
|
2004-07-27 22:23:55 +08:00
|
|
|
AM_CONDITIONAL(HID2HCI, test "${hid2hci_enable}" = "yes" && test "${usb_found}" = "yes")
|
2005-04-22 05:53:11 +08:00
|
|
|
AM_CONDITIONAL(DFUTOOL, test "${dfutool_enable}" = "yes" && test "${usb_found}" = "yes")
|
2009-06-30 22:30:16 +08:00
|
|
|
AM_CONDITIONAL(UDEVRULES, test "${udevrules_enable}" = "yes")
|
2008-06-04 04:07:34 +08:00
|
|
|
AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes")
|
2010-07-09 17:05:56 +08:00
|
|
|
AM_CONDITIONAL(MAEMO6PLUGIN, test "${maemo6_enable}" = "yes")
|
2004-08-13 00:00:35 +08:00
|
|
|
])
|