-# libtool stuff
-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.
-#
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the Linux distribution to target: One of debian, gentoo, archlinux or none]))
-if test "z$with_distro" = "z"; then
- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
- AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
- AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
-fi
-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
-
-if test "z$with_distro" = "z"; then
- AC_MSG_ERROR([Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO, set DISTRO to none if your distribution is not supported.])
- exit 1
-else
-case $with_distro in
- debian|gentoo|archlinux|suse|none)
- ;;
- *)
- AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome), you can specify --with-distro=none to skip this check])
- ;;
-esac