From ce170511234a040ea6f418b168beb3a6e51a1f2c Mon Sep 17 00:00:00 2001 From: Trent Lloyd Date: Wed, 8 Jun 2005 18:55:06 +0000 Subject: [PATCH] * Patch by Ross Burton to enable conditional use of dbus (--enable-dbus=no), disables daemon build * Remove doxygen from EXTRA_DIST as its built by default now git-svn-id: file:///home/lennart/svn/public/avahi/trunk@107 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- Makefile.am | 2 +- avahi-daemon/Makefile.am | 2 ++ configure.ac | 23 ++++++++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7de82c2..616a9a6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ # 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 diff --git a/avahi-daemon/Makefile.am b/avahi-daemon/Makefile.am index 8bf007d..3a03393 100644 --- a/avahi-daemon/Makefile.am +++ b/avahi-daemon/Makefile.am @@ -30,6 +30,7 @@ AM_LDADD+=$(DBUS_LIBS) # This cool debug trap works on i386/gcc only AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' +if ENABLE_DBUS bin_PROGRAMS = \ avahi @@ -38,3 +39,4 @@ avahi_SOURCES = \ avahi_CFLAGS = $(AM_CFLAGS) avahi_LDADD = $(AM_LDADD) ../avahi-core/libavahi-core.la ../avahi-common/libavahi-common.la +endif diff --git a/configure.ac b/configure.ac index b5492c5..1a295d4 100644 --- a/configure.ac +++ b/configure.ac @@ -62,11 +62,6 @@ PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ]) 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 @@ -100,6 +95,24 @@ AC_ARG_ENABLE(doxygen, 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" -- 2.7.4