]> git.meshlink.io Git - catta/commitdiff
* Fix building of python scripts to exclude things needing DBUS or GTK if they are...
authorTrent Lloyd <lathiat@bur.st>
Tue, 30 Aug 2005 11:22:31 +0000 (11:22 +0000)
committerTrent Lloyd <lathiat@bur.st>
Tue, 30 Aug 2005 11:22:31 +0000 (11:22 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@503 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-utils/Makefile.am
configure.ac

index edbd2cbb65f3db219b5c3749d9985824b98ddac6..3adf84c506b601804e8ce9efbce4b4cf213580e8 100644 (file)
@@ -21,7 +21,6 @@ pythonscripts = \
        avahi-publish-address \
        avahi-publish-service \
        avahi-browse \
-       avahi-discover \
        avahi-bookmarks \
        avahi-resolve-host-name \
        avahi-resolve-address
@@ -30,25 +29,36 @@ EXTRA_DIST = \
        avahi-publish-address.in \
        avahi-publish-service.in \
        avahi-browse.in \
-       avahi-discover.in \
        avahi-bookmarks.in \
        avahi-resolve-host-name.in \
-       avahi-resolve-address.in \
-       avahi-discover.desktop.in
+       avahi-resolve-address.in
+
 
 if HAVE_PYTHON
 if HAVE_DBUS
 SUBDIRS=avahi
 
+
+if HAVE_GTK
 desktopdir = $(datadir)/applications
 desktop_DATA = avahi-discover.desktop
 
-bin_SCRIPTS = $(pythonscripts)
+pythonscripts += avahi-discover
+
+EXTRA_DIST += \
+       avahi-discover.in
+       avahi-discover.desktop.in
 
 avahi-discover.desktop: avahi-discover.desktop.in
        sed -e 's,@bindir\@,$(bindir),g' $< > $@
        chmod +x $@
 
+avahi-discover: avahi-discover.in
+       sed -e 's,@PYTHON\@,$(PYTHON),g' \
+               -e 's,@interfacesdir\@,$(interfacesdir),g' $< > $@
+       chmod +x $@
+endif
+
 avahi-publish-address: avahi-publish-address.in
        sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
        chmod +x $@
@@ -61,11 +71,6 @@ avahi-browse: avahi-browse.in
        sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
        chmod +x $@
 
-avahi-discover: avahi-discover.in
-       sed -e 's,@PYTHON\@,$(PYTHON),g' \
-               -e 's,@interfacesdir\@,$(interfacesdir),g' $< > $@
-       chmod +x $@
-
 avahi-bookmarks: avahi-bookmarks.in
        sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
        chmod +x $@
@@ -77,8 +82,8 @@ avahi-resolve-host-name: avahi-resolve-host-name.in
 avahi-resolve-address: avahi-resolve-address.in
        sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
        chmod +x $@
-
-CLEANFILES = $(pythonscripts) $(desktop_DATA)
-
 endif
 endif
+
+bin_SCRIPTS = $(pythonscripts)
+CLEANFILES = $(pythonscripts) $(desktop_DATA)
index 5daa502f623d797f41521843a2858d2fcebdf93c..5cab52c44ed848ff1b1636a7aa4f50888a20e764 100644 (file)
@@ -342,8 +342,12 @@ AC_ARG_ENABLE(python,
 
 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)])
+    if test "x$HAVE_GTK" = "xyes" ; then
+        AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module pygtk)])
+    fi
+    if test "x$HAVE_DBUS" = "xyes" ; then
+        AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
+    fi
     AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
     AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
     AM_CHECK_PYMOD(anydbm,,,[AC_MSG_ERROR(Could not find Python module anydbm)])