summaryrefslogtreecommitdiff
path: root/net-dns/avahi-gtk/files/avahi-0.6.30-optional-gtk-utils.patch
blob: 2c615a2b3a0a43e556830073bb1bbb00e69bb27d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- avahi-discover-standalone/Makefile.am
+++ avahi-discover-standalone/Makefile.am
@@ -23,7 +23,7 @@
 # This cool debug trap works on i386/gcc only
 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
 
-if HAVE_GTK2OR3
+if ENABLE_GTK_UTILS
 if HAVE_GLIB
 bin_PROGRAMS = \
 	avahi-discover-standalone
--- avahi-ui/Makefile.am
+++ avahi-ui/Makefile.am
@@ -76,6 +76,7 @@
 libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
 endif
 
+if ENABLE_GTK_UTILS
 bin_PROGRAMS = bssh
 desktop_DATA += bssh.desktop bvnc.desktop
 @INTLTOOL_DESKTOP_RULE@
@@ -102,6 +103,7 @@
 bvnc.desktop.in: bvnc.desktop.in.in
 	$(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@
 
+endif # ENABLE_GTK_UTILS
 endif # HAVE_GLIB
 endif
 endif
--- configure.ac
+++ configure.ac
@@ -564,7 +564,29 @@
 fi
 AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
 
-AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes" )
+#
+# Check for GTK+ Utils
+#
+AC_ARG_ENABLE(gtk-utils,
+        AS_HELP_STRING([--disable-gtk-utils],[Disable GTK+ utilities]),
+        [case "${enableval}" in
+                yes) WANT_GTK_UTILS=yes ;;
+                no)  WANT_GTK_UTILS=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk-utils) ;;
+        esac],
+        [WANT_GTK_UTILS=yes])
+
+ENABLE_GTK_UTILS=no
+HAVE_GTK2OR3=no
+if test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
+	HAVE_GTK2OR3=yes
+	if test "x$WANT_GTK_UTILS" = "xyes"; then
+		ENABLE_GTK_UTILS=yes
+	fi
+fi
+
+AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK2OR3" = "xyes")
+AM_CONDITIONAL(ENABLE_GTK_UTILS, test "x$ENABLE_GTK_UTILS" = "xyes")
 
 #
 # D-Bus
@@ -1199,11 +1221,6 @@
    ENABLE_AUTOIPD="no   (You need libdaemon!)"
 fi
 
-HAVE_GTK2OR3=no
-if test "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes" ; then
-   HAVE_GTK2OR3=yes
-fi
-
 BUILD_UI="no"
 if test "x$HAVE_GTK2OR3" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
    BUILD_UI="yes"
@@ -1223,7 +1240,7 @@
     Building avahi-python:              ${BUILD_PYTHON}
     Building libavahi-glib:             ${HAVE_GLIB}
     Building libavahi-gobject:          ${BUILD_GOBJECT}
-    Building avahi-discover-standalone: ${HAVE_GTK2OR3}
+    Building avahi-discover-standalone: ${ENABLE_GTK_UTILS}
     Building libavahi-qt3:              ${HAVE_QT3}
     Building libavahi-qt4:              ${HAVE_QT4}
     Building avahi-sharp:               ${HAVE_MONO}