# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
-EXTRA_DIST = bootstrap.sh LICENSE doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in
+EXTRA_DIST = bootstrap.sh LICENSE
SUBDIRS = avahi-common avahi-core avahi-discover avahi-client avahi-daemon doxygen
pkgconfigdir = $(libdir)/pkgconfig
# This cool debug trap works on i386/gcc only
AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+if ENABLE_DBUS
bin_PROGRAMS = \
avahi
avahi_CFLAGS = $(AM_CFLAGS)
avahi_LDADD = $(AM_LDADD) ../avahi-core/libavahi-core.la ../avahi-common/libavahi-common.la
+endif
AC_SUBST(GLIB20_CFLAGS)
AC_SUBST(GLIB20_LIBS)
-# Check for DBUS
-PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.23, dbus-glib-1 >= 0.23 ])
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
AC_ARG_ENABLE(gtk,
AC_HELP_STRING([--enable-gtk],[use GTK+ (default=yes)]),
[case "${enableval}" in
AM_CONDITIONAL(ENABLE_DOXYGEN, test "x$ENABLE_DOXYGEN" = "xyes")
+AC_ARG_ENABLE(dbus,
+ AC_HELP_STRING([--enable-dbus],[use DBus (default=yes)]),
+ [case "${enableval}" in
+ yes) ENABLE_DBUS=yes ;;
+ no) ENABLE_DBUS=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbus) ;;
+ esac],
+ [ENABLE_DBUS=yes]) dnl Default value
+
+if test "x$ENABLE_DBUS" = "xyes"; then
+ PKG_CHECK_MODULES(DBUS, [ dbus-glib-1 >= 0.23])
+ AC_SUBST(DBUS_CFLAGS)
+ AC_SUBST(DBUS_LIBS)
+fi
+
+AM_CONDITIONAL(ENABLE_DBUS, test "x$ENABLE_DBUS" = "xyes")
+
+
# If using GCC specify some additional parameters
if test "x$GCC" = "xyes" ; then
CFLAGS="$CFLAGS -pipe -W -Wall -pedantic"