AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/Software/Avahi])
if type -p stow > /dev/null && test -d /usr/local/stow ; then
- AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
- ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
+ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+ ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
fi
# Checks for programs.
#
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")
+ #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])
- exit 1
+ AC_MSG_ERROR([Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO])
+ exit 1
else
case $with_distro in
- debian|gentoo|archlinux)
+ debian|gentoo|archlinux)
;;
- *)
+ *)
AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome)])
;;
esac
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
- ret=$?
- rm -f conftest.o
- return $ret
+ AC_LANG_CONFTEST([int main() {}])
+ $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
+ ret=$?
+ rm -f conftest.o
+ return $ret
}
# If using GCC specify some additional parameters
[HAVE_EXPAT=yes])
if test "x$HAVE_EXPAT" = "xyes" ; then
- AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
+ AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
- if ! $have_expat ; then
- AC_MSG_ERROR([*** libexpat not found ***])
- fi
+ if ! $have_expat ; then
+ AC_MSG_ERROR([*** libexpat not found ***])
+ fi
fi
AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
[HAVE_LIBDAEMON=yes])
if test "x$HAVE_LIBDAEMON" = "xyes" ; then
- PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
- AC_SUBST(LIBDAEMON_CFLAGS)
- AC_SUBST(LIBDAEMON_LIBS)
+ PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
+ AC_SUBST(LIBDAEMON_CFLAGS)
+ AC_SUBST(LIBDAEMON_LIBS)
fi
AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
esac],[HAVE_PYTHON=yes])
if test "x$HAVE_PYTHON" = "xyes" ; then
- AM_PATH_PYTHON([2.4])
- AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module pygtk)])
- AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
+ AM_PATH_PYTHON([2.4])
+ AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module pygtk)])
+ AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
fi
AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
esac],[xmltoman=yes])
if test x$xmltoman = xyes ; then
- AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
-
- if test x$have_xmltoman = xno ; then
- if ! test -e man/avahi-daemon.8 ; then
- AC_MSG_ERROR([*** xmltoman was not found, it is required to build the manpages and they have not been pre-built])
- exit 1
- fi
- AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
- xmltoman=no
- fi
+ AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
+
+ if test x$have_xmltoman = xno ; then
+ if ! test -e man/avahi-daemon.8 ; then
+ AC_MSG_ERROR([*** xmltoman was not found, it is required to build the manpages and they have not been pre-built])
+ exit 1
+ fi
+ AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
+ xmltoman=no
+ fi
fi
AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
BUILD_DAEMON="no (!)"
if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
- BUILD_DAEMON=yes
+ BUILD_DAEMON=yes
fi
BUILD_UTILS="no (!)"
if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" -a "x$HAVE_PYTHON" = "xyes" ; then
- BUILD_UTILS=yes
+ BUILD_UTILS=yes
fi
BUILD_CLIENT="no (!)"
if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
- BUILD_CLIENT=yes
+ BUILD_CLIENT=yes
fi