# libtool stuff
AC_PROG_LIBTOOL
+#
+# Detecting the linux distro for specific things like initscripts.
+#
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the Linux distribution to target: One of debian, 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-version,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
+ echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
+ exit 1
+else
+case $with_distro in
+ debian|arch)
+ ;;
+ *)
+ echo "Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome)"
+ ;;
+esac
+fi
+
+#AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
+#AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
+AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
+AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
+
+
test_gcc_flag() {
AC_LANG_CONFTEST([int main() {}])
$CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
# If using GCC specify some additional parameters
if test "x$GCC" = "xyes" ; then
- DESIRED_FLAGS="-std=c99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+ DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+
+ # Work around a kernel header bug in arch linux where rtnetlink.h
+ # can't be included with -std=c99
+ if test "x$with_distro" != "xarchlinux" ; then
+ DESIRED_FLAGS="$DESIRED_FLAGS -std=c99"
+ fi
for flag in $DESIRED_FLAGS ; do
AC_MSG_CHECKING([whether $CC accepts $flag])
fi
AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
-#
-# Detecting the linux distro for specific things like initscripts.
-#
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, slackware or none]))
-if test "z$with_distro" = "z"; then
- AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
- AC_CHECK_FILE(/etc/fedora-release,with_distro="redhat")
- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
- AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
- AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
-fi
-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
-
-if test "z$with_distro" = "z"; then
- echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
- exit 1
-else
-case $with_distro in
- debian|gentoo|suse)
- ;;
- *)
- echo "Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome)"
- ;;
-esac
-
-fi
-AM_CONDITIONAL(TARGET_REDHAT, test x"$with_distro" = xredhat)
-AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
-AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
-AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
-AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
-
#
# Defining Avahi User and Group.
#
SUBDIRS += Debian
endif
+if TARGET_ARCHLINUX
+SUBDIRS += archlinux
+endif
+
# We disable shipping of Gentoo and SUSE init scripts for now as they are out of date
#if TARGET_GENTOO
--- /dev/null
+# $Id: Makefile.am 267 2005-08-08 10:19:22Z lennart $
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+initddir = $(sysconfdir)/rc.d
+
+EXTRA_DIST = \
+ avahi-daemon.in \
+ avahi-dnsconfd.in
+
+initd_SCRIPTS = \
+ avahi-daemon \
+ avahi-dnsconfd
+
+CLEANFILES = \
+ avahi-daemon \
+ avahi-dnsconfd
+
+avahi-daemon: avahi-daemon.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
+
+avahi-dnsconfd: avahi-dnsconfd.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
--- /dev/null
+#!/bin/bash
+
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+#
+# Authors: <lathiat@bur.st>
+#
+
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Avahi mDNS/DNS-SD Daemon"
+NAME="avahi-daemon"
+DAEMON="@sbindir@/$NAME"
+
+case "$1" in
+ start)
+ stat_busy "Starting $DESC"
+ $DAEMON -D
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon avahi-daemon
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $DESC"
+ $DAEMON -k
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon avahi-daemon
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ reload)
+ stat_busy "Reloading services for $DESC"
+ $DAEMON -r
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ endif
+ *)
+ echo "usage: $0 {start|stop|restart|reload}"
+ ;;
+esac
+exit 0
--- /dev/null
+#!/bin/bash
+
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+#
+# Authors: <lathiat@bur.st>
+#
+
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Avahi mDNS/DNS-SD DNS Server Configuration Daemon"
+NAME="avahi-dnsconfd"
+DAEMON="@sbindir@/$NAME"
+
+case "$1" in
+ start)
+ stat_busy "Starting $DESC"
+ $DAEMON -D
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon avahi-daemon
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $DESC"
+ $DAEMON -k
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon avahi-daemon
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ reload)
+ stat_busy "Reloading services for $DESC"
+ $DAEMON -r
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ endif
+ *)
+ echo "usage: $0 {start|stop|restart|reload}"
+ ;;
+esac
+exit 0