003-Make-DNS-SD-functionality-optional-at-build-time.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From a88d6d31fc5a04be4378095e03b4aac133954026 Mon Sep 17 00:00:00 2001
  2. From: Christian Beier <dontmind@freeshell.org>
  3. Date: Tue, 15 Mar 2016 15:09:25 +0100
  4. Subject: [PATCH] Make DNS-SD functionality optional at build time.
  5. When building for embedded systems, for instance, we
  6. want to limit dependencies to a minimum and it seems
  7. that OLA is able to perform its core tasks without
  8. DNS-SD perfectly fine.
  9. Signed-off-by: Christian Beier <dontmind@freeshell.org>
  10. ---
  11. configure.ac | 27 +++++++++++++++------------
  12. 1 file changed, 15 insertions(+), 12 deletions(-)
  13. diff --git a/configure.ac b/configure.ac
  14. index 6654354..0d1947c 100644
  15. --- a/configure.ac
  16. +++ b/configure.ac
  17. @@ -411,23 +411,26 @@ AS_IF([test "x$use_ossp_uuid" = xyes],
  18. # DNS-SD support
  19. # We use either avahi or the Apple DNS-SD library.
  20. -
  21. -# dns_sd
  22. -AC_CHECK_HEADER(
  23. - [dns_sd.h],
  24. - [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])])
  25. +AC_ARG_WITH(dns-sd,
  26. +[AS_HELP_STRING([--without-dns-sd], [disable DNS-SD support])],,)
  27. +if test "x$with_dns_sd" != "xno"; then
  28. + # dns_sd
  29. + AC_CHECK_HEADER(
  30. + [dns_sd.h],
  31. + [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])])
  32. +
  33. + # avahi
  34. + PKG_CHECK_MODULES(
  35. + avahi,
  36. + [avahi-client],
  37. + [have_avahi="yes"],
  38. + [true])
  39. +fi
  40. AS_IF([test "x$have_dnssd" = xyes],
  41. [AC_DEFINE([HAVE_DNSSD], [1], [Defined to use Bonjour DNS_SD])])
  42. AM_CONDITIONAL([HAVE_DNSSD], [test "x$have_dnssd" = xyes])
  43. -# avahi
  44. -PKG_CHECK_MODULES(
  45. - avahi,
  46. - [avahi-client],
  47. - [have_avahi="yes"],
  48. - [true])
  49. -
  50. AS_IF([test "x$have_avahi" = xyes],
  51. [AC_DEFINE([HAVE_AVAHI], [1], [Defined to use Avahi])])
  52. AM_CONDITIONAL([HAVE_AVAHI], [test "x$have_avahi" = xyes])
  53. --
  54. 2.1.4