]> git.meshlink.io Git - catta/blobdiff - avahi-utils/Makefile.am
* many trivial fix to make avahi compile on OpenBSD
[catta] / avahi-utils / Makefile.am
index 1e10f2592e8a87fef8433e5301220aece2ce7f4e..d3a1f392f674b213fbf3e8763ba43a40c1a37a63 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.
 
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
 EXTRA_DIST = \
        avahi-publish-address.in \
        avahi-publish-service.in \
-       avahi-browse.in \
        avahi-bookmarks.in \
        avahi-resolve-host-name.in \
        avahi-resolve-address.in \
@@ -36,7 +40,6 @@ if HAVE_PYGTK
 pythonscripts = \
        avahi-publish-address \
        avahi-publish-service \
-       avahi-browse \
        avahi-bookmarks \
        avahi-resolve-host-name \
        avahi-resolve-address \
@@ -62,10 +65,6 @@ avahi-publish-service: avahi-publish-service.in
        sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
        chmod +x $@
 
-avahi-browse: avahi-browse.in
-       sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
-       chmod +x $@
-
 avahi-bookmarks: avahi-bookmarks.in
        sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
        chmod +x $@
@@ -84,3 +83,18 @@ CLEANFILES = $(pythonscripts) $(desktop_DATA)
 endif
 endif
 endif
+
+if HAVE_DBUS
+
+bin_PROGRAMS = avahi-browse
+
+avahi_browse_SOURCES = avahi-browse.c sigint.c sigint.h
+avahi_browse_CFLAGS = $(AM_CFLAGS)
+avahi_browse_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la -lgdbm
+
+if HAVE_GDBM
+avahi_browse_SOURCES += stdb.h stdb.c
+avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\"
+endif
+
+endif