005-fix-bluetooth-support.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. diff --git a/configure b/configure
  2. index 4c0435e..0068a9d 100755
  3. --- a/configure
  4. +++ b/configure
  5. @@ -7045,7 +7045,7 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/
  6. sys/termio.h sys/time.h \
  7. sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  8. sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
  9. -bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
  10. +linux/tipc.h spawn.h util.h alloca.h
  11. do :
  12. as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  13. ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  14. @@ -7267,6 +7267,24 @@ fi
  15. fi
  16. +# bluetooth/bluetooth.h has been known to not compile with -std=c99.
  17. +# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
  18. +SAVE_CFLAGS=$CFLAGS
  19. +CFLAGS="-std=c99 $CFLAGS"
  20. +for ac_header in bluetooth/bluetooth.h
  21. +do :
  22. + ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
  23. +if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
  24. + cat >>confdefs.h <<_ACEOF
  25. +#define HAVE_BLUETOOTH_BLUETOOTH_H 1
  26. +_ACEOF
  27. +
  28. +fi
  29. +
  30. +done
  31. +
  32. +CFLAGS=$SAVE_CFLAGS
  33. +
  34. # On Linux, netlink.h requires asm/types.h
  35. for ac_header in linux/netlink.h
  36. do :
  37. diff --git a/configure.ac b/configure.ac
  38. index 780f275..dceca1c 100644
  39. --- a/configure.ac
  40. +++ b/configure.ac
  41. @@ -1702,10 +1702,17 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/
  42. sys/termio.h sys/time.h \
  43. sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  44. sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
  45. -bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h)
  46. +linux/tipc.h spawn.h util.h alloca.h)
  47. AC_HEADER_DIRENT
  48. AC_HEADER_MAJOR
  49. +# bluetooth/bluetooth.h has been known to not compile with -std=c99.
  50. +# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
  51. +SAVE_CFLAGS=$CFLAGS
  52. +CFLAGS="-std=c99 $CFLAGS"
  53. +AC_CHECK_HEADERS(bluetooth/bluetooth.h)
  54. +CFLAGS=$SAVE_CFLAGS
  55. +
  56. # On Linux, netlink.h requires asm/types.h
  57. AC_CHECK_HEADERS(linux/netlink.h,,,[
  58. #ifdef HAVE_ASM_TYPES_H