diff options
Diffstat (limited to 'avahi-python/avahi/Makefile.am')
-rw-r--r-- | avahi-python/avahi/Makefile.am | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am index b1ebe22..5673d5e 100644 --- a/avahi-python/avahi/Makefile.am +++ b/avahi-python/avahi/Makefile.am @@ -25,10 +25,27 @@ avahidir = $(pythondir)/avahi avahi_SCRIPTS = ServiceTypeDatabase.py +if HAVE_GDBM ServiceTypeDatabase.py: ServiceTypeDatabase.py.in sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@DBM\@,gdbm,g' \ + -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \ + -e 's,@CHECK_KEY\@,while key is not None:,g' \ + -e 's,@NEXT_KEY\@,key = self.db.nextkey(),g' \ -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ chmod +x $@ +endif + +if HAVE_DBM +ServiceTypeDatabase.py: ServiceTypeDatabase.py.in + sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@DBM\@,dbm,g' \ + -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \ + -e 's,@CHECK_KEY\@,for key in keys:,g' \ + -e 's,@NEXT_KEY\@,,g' \ + -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ + chmod +x $@ +endif if HAVE_PYGTK if HAVE_PYTHON_DBUS |