summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiqi <me@siqi.fr>2013-07-26 02:04:45 +0200
committerSiqi <me@siqi.fr>2013-07-26 02:05:05 +0200
commit0dc8821659ffcca5d48c9c3a133c4f793017f783 (patch)
tree8816c84500b7945ff97899f6185fb0b2722a24e5
parentbfa3f8584b2f2492f5c0573f22e4ebd96d9a8af5 (diff)
use config_features.h.in instead
Change-Id: I1332fc22caae759c65b64e6c43e73740245e4abd
-rw-r--r--config_host/config_features.h.in2
-rw-r--r--configure.ac1
-rw-r--r--sd/source/ui/remotecontrol/AvahiNetworkService.hxx20
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx5
4 files changed, 8 insertions, 20 deletions
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index fac764e1936b..e5d5187d81a1 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -66,4 +66,6 @@
#define HAVE_FEATURE_OPENCL 0
+#define HAVE_FEATURE_AVAHI 0
+
#endif
diff --git a/configure.ac b/configure.ac
index eb6c160fc160..10ffd2acb1d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11393,6 +11393,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
[ENABLE_AVAHI="TRUE"], [ENABLE_AVAHI=""])
if test "$ENABLE_AVAHI" = "TRUE"; then
AC_DEFINE(ENABLE_AVAHI)
+ AC_DEFINE(HAVE_FEATURE_AVAHI)
AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
fi
fi
diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.hxx b/sd/source/ui/remotecontrol/AvahiNetworkService.hxx
index 005ad359fb73..96e36db233e6 100644
--- a/sd/source/ui/remotecontrol/AvahiNetworkService.hxx
+++ b/sd/source/ui/remotecontrol/AvahiNetworkService.hxx
@@ -1,23 +1,7 @@
#ifndef AVAHI_NETWORK_SERVICE_H
#define AVAHI_NETWORK_SERVICE_H
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <algorithm>
-#include <vector>
-#include <iostream>
-
-#include <avahi-client/client.h>
-#include <avahi-client/publish.h>
-#include <avahi-common/thread-watch.h>
-
-#include <avahi-common/alternative.h>
-#include <avahi-common/malloc.h>
-#include <avahi-common/error.h>
-#include <avahi-common/timeval.h>
-
+#include <string>
#include "ZeroconfService.hxx"
namespace sd {
@@ -25,7 +9,7 @@ namespace sd {
class AvahiNetworkService : public ZeroconfService
{
public:
- AvahiNetworkService(const std::string& aname = "", uint aport = 1599)
+ AvahiNetworkService(const std::string& aname = "", unsigned int aport = 1599)
: ZeroconfService(aname, aport){}
virtual ~AvahiNetworkService(){}
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 62c3e6e2aaf9..22aca47fd33f 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -16,6 +16,7 @@
#include <comphelper/processfactory.hxx>
#include <rtl/strbuf.hxx>
+#include <config_features.h>
#include "DiscoveryService.hxx"
@@ -43,7 +44,7 @@
#import "OSXNetworkService.hxx"
#endif
-#ifdef LINUX
+#if HAVE_FEATURE_AVAHI
#include "AvahiNetworkService.hxx"
#endif
@@ -60,7 +61,7 @@ DiscoveryService::DiscoveryService()
zService = new OSXNetworkService();
#endif
-#ifdef ENABLE_AVAHI
+#if HAVE_FEATURE_AVAHI
// Avahi for Linux
char hostname[1024];
hostname[1023] = '\0';