]> git.meshlink.io Git - catta/commitdiff
* added support in autoconf for multiple architecture
authorSebastien Estienne <sebastien.estienne@gmail.com>
Wed, 12 Oct 2005 13:27:08 +0000 (13:27 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Wed, 12 Oct 2005 13:27:08 +0000 (13:27 +0000)
 * only compile netlink support on linux

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@734 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/Makefile.am
avahi-core/iface.h
configure.ac

index 643c2a396258eadb3944439093f4f6e40a75f52e..e525c1caf4714f2320da6ba6cc9a76fc3835f820 100644 (file)
@@ -44,11 +44,16 @@ noinst_PROGRAMS = \
        hashmap-test \
        querier-test
 
+if HAVE_NETLINK
+NETLINK = \
+       iface-linux.c iface-linux.h \
+       netlink.c netlink.h
+endif
+
 libavahi_core_la_SOURCES = \
        timeeventq.c timeeventq.h\
        iface.c iface.h \
-       iface-linux.c iface-linux.h \
-       netlink.c netlink.h \
+       $(NETLINK) \
        server.c server.h \
        prioq.c prioq.h \
        cache.c cache.h\
@@ -77,6 +82,7 @@ libavahi_core_la_SOURCES = \
        multicast-lookup.c multicast-lookup.h \
        querier.c querier.h
 
+
 libavahi_core_la_CFLAGS = $(AM_CFLAGS)
 libavahi_core_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
 libavahi_core_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_CORE_VERSION_INFO)
index d9f9cba77d1ba7696bfecd80ac4a4d88f7d9f7a1..0ad6338d4872b2cbcc40b0079837040efe6e1098 100644 (file)
@@ -39,7 +39,10 @@ typedef struct AvahiHwInterface AvahiHwInterface;
 #include "announce.h"
 #include "browse.h"
 #include "querier.h"
+
+#ifdef HAVE_NETLINK
 #include "iface-linux.h"
+#endif
 
 #define AVAHI_MAX_MAC_ADDRESS 32
 
index 427dcdbb73bc91592c145e47d7e669e313f1007d..8db8c53dca8f9aa91cad64202b9d908a5b529bd7 100644 (file)
@@ -56,6 +56,39 @@ AC_PROG_LIBTOOL
 
 ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support]))
 
+#
+# Host specific stuffs
+#
+case "$host" in
+  *-netbsd* | *-knetbsd*-gnu)
+    AC_DEFINE([NETBSD],[],[ Support for NetBSD])
+    avahi_platform=netbsd
+    ;;
+  *-openbsd*)
+    AC_DEFINE([OPENBSD],[],[ Support for OpenBSD])
+    avahi_platform=openbsd
+    ;;
+  *-solaris*)
+    AC_DEFINE([SOLARIS],[],[ Support for Sun Solaris])
+    avahi_platform=solaris
+    ;;
+  *-linux*)
+    AC_DEFINE([LINUX],[],[ Support for GNU/Linux])
+    AC_DEFINE([HAVE_NETLINK],[],[ Support for netlink.h])
+    avahi_platform=linux
+    ;;
+  *-freebsd* | *-kfreebsd*-gnu)
+    AC_DEFINE([FREEBSD],[],[ Support for FreeBSD])
+    avahi_platform=freebsd
+    ;;
+  *-apple-darwin*)
+    AC_DEFINE([DARWIN],[],[ Support for AppleDarwin])
+    avahi_platform=darwin
+    ;;
+esac
+
+AM_CONDITIONAL(HAVE_NETLINK, [ test x"$avahi_platform" = xlinux ])
+
 #
 # Detecting the linux distribution for specific things like init scripts.
 #