-AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
-
-#
-# D-BUS
-#
-AC_ARG_ENABLE(dbus,
- AS_HELP_STRING([--disable-dbus],[Disable use of D-BUS]),
- [case "${enableval}" in
- yes) HAVE_DBUS=yes ;;
- no) HAVE_DBUS=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
- esac],
- [HAVE_DBUS=yes])
-
-AC_ARG_WITH(dbus-sys, AS_HELP_STRING([--with-dbus-sys=<dir>], [where D-BUS system.d directory is]))
-
-if test "x$HAVE_DBUS" = "xyes" ; then
- AC_DEFINE(HAVE_DBUS, 1, [Whether we have D-BUS or not])
-
- PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.30 ])
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
- AC_SUBST(DBUS_CFLAGS)
- AC_SUBST(DBUS_LIBS)
-
- if ! test -z "$with_dbus_sys" ; then
- DBUS_SYS_DIR="$with_dbus_sys"
- else
- DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
- fi
- AC_SUBST(DBUS_SYS_DIR)
-
-fi
-AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
-
-#
-# Expat
-#
-AC_ARG_ENABLE(expat,
- AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
- [case "${enableval}" in
- yes) HAVE_EXPAT=yes ;;
- no) HAVE_EXPAT=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
- esac],
- [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)
-
- if ! $have_expat ; then
- AC_MSG_ERROR([*** libexpat not found ***])
- fi
-fi
-AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
-
-#
-# libdaemon
-#
-AC_ARG_ENABLE(libdaemon,
- AS_HELP_STRING([--disable-libdaemon],[Disable use of libdaemon]),
- [case "${enableval}" in
- yes) HAVE_LIBDAEMON=yes ;;
- no) HAVE_LIBDAEMON=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdaemon) ;;
- esac],
- [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)
-fi
-AM_CONDITIONAL(HAVE_LIBDAEMON, test "x$HAVE_LIBDAEMON" = "xyes")
-
-#
-# Python stuff
-#
-AC_ARG_ENABLE(python,
- AS_HELP_STRING([--disable-python], [Disable scripts that depends on python]),
- [case "${enableval}" in
- yes) HAVE_PYTHON=yes ;;
- no) HAVE_PYTHON=no ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
- 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)])
-fi
-AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
-
-#
-# Defining Avahi User and Group.
-#
-AC_ARG_WITH(avahi_user, AS_HELP_STRING([--with-avahi-user=<user>],[User for running the Avahi daemon (avahi)]))
-if test -z "$with_avahi_user" ; then
- AVAHI_USER=avahi
-else
- AVAHI_USER=$with_avahi_user
-fi
-AC_SUBST(AVAHI_USER)
-AC_DEFINE_UNQUOTED(AVAHI_USER,"$AVAHI_USER", [User for running the Avahi daemon])
-
-AC_ARG_WITH(avahi_group,AS_HELP_STRING([--with-avahi-group=<group>],[Group for Avahi (avahi)]))
-if test -z "$with_avahi_group" ; then
- AVAHI_GROUP=avahi
-else
- AVAHI_GROUP=$with_avahi_group
-fi
-AC_SUBST(AVAHI_GROUP)
-AC_DEFINE_UNQUOTED(AVAHI_GROUP,"$AVAHI_GROUP", [Group for Avahi])
-
-#
-# Avahi runtime dir
-#
-avahi_runtime_dir="${localstatedir}/run"
-avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
-AC_SUBST(avahi_runtime_dir)
-AC_SUBST(avahi_socket)