mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 06:58:39 +01:00
python,python3: build bluetooth support if bluez-libs selected
This should hopefully fix the Python3 build on buildbot. For a while I assumed it may be a build-bot issue, but then looking through the packages repo [and finding the bluez package] it looks like, if you try to build all packages, Python3 detects the bluetooth headers installed by bluez. It looks like Python's bluetooth support was somewhat broken ; it was not detecting the <bluetooth/bluetooth.h> header, so a backport from Python3 to Python fixed that. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
diff --git a/configure b/configure
|
||||
index 4c0435e..0068a9d 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7045,7 +7045,7 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/
|
||||
sys/termio.h sys/time.h \
|
||||
sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
|
||||
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
|
||||
-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
|
||||
+linux/tipc.h spawn.h util.h alloca.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
@@ -7267,6 +7267,24 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
+# bluetooth/bluetooth.h has been known to not compile with -std=c99.
|
||||
+# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
|
||||
+SAVE_CFLAGS=$CFLAGS
|
||||
+CFLAGS="-std=c99 $CFLAGS"
|
||||
+for ac_header in bluetooth/bluetooth.h
|
||||
+do :
|
||||
+ ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
|
||||
+if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_BLUETOOTH_BLUETOOTH_H 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+done
|
||||
+
|
||||
+CFLAGS=$SAVE_CFLAGS
|
||||
+
|
||||
# On Linux, netlink.h requires asm/types.h
|
||||
for ac_header in linux/netlink.h
|
||||
do :
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 780f275..dceca1c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1702,10 +1702,17 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/
|
||||
sys/termio.h sys/time.h \
|
||||
sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
|
||||
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
|
||||
-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h)
|
||||
+linux/tipc.h spawn.h util.h alloca.h)
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_MAJOR
|
||||
|
||||
+# bluetooth/bluetooth.h has been known to not compile with -std=c99.
|
||||
+# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
|
||||
+SAVE_CFLAGS=$CFLAGS
|
||||
+CFLAGS="-std=c99 $CFLAGS"
|
||||
+AC_CHECK_HEADERS(bluetooth/bluetooth.h)
|
||||
+CFLAGS=$SAVE_CFLAGS
|
||||
+
|
||||
# On Linux, netlink.h requires asm/types.h
|
||||
AC_CHECK_HEADERS(linux/netlink.h,,,[
|
||||
#ifdef HAVE_ASM_TYPES_H
|
||||
Reference in New Issue
Block a user