summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2019-03-20 23:19:48 -0400
committerlukefromdc <[email protected]>2019-03-21 01:29:21 -0400
commit5dfb6527f45b012b328cdcc037c2510bae5039d9 (patch)
tree1e7a4cb215e2dd5802220a45fdb92d4ceb314ad2 /configure.ac
parent0b24e9e5aca8a93990103d752ced4967cc9bd82b (diff)
downloadmate-media-5dfb6527f45b012b328cdcc037c2510bae5039d9.tar.bz2
mate-media-5dfb6527f45b012b328cdcc037c2510bae5039d9.tar.xz
Allow disabling either statusicon or panelapplet
Add --enable-statusicon (yes/no default is yes) and --enable-panelapplet (yes/no default is yes) configuration flags
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac56
1 files changed, 56 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 66298df..5767b0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,46 @@ if test "x$enable_deprecated" = "xyes"; then
AC_SUBST(DISABLE_DEPRECATED)
fi
+#============================================================================
+# status icon
+#============================================================================
+
+dnl Whether to build the volume control statusicon
+dnl --
+
+AC_ARG_ENABLE(statusicon, AS_HELP_STRING([--enable-statusicon], [Enable volume control status icon (default: yes)]))
+if (test "${enable-statusicon}" == "no"); then
+ AC_DEFINE(ENABLE_STATUSICON, 0, [Enable if you want to build the tray applet])
+else
+
+ AC_DEFINE(ENABLE_STATUSICON, 1, [Enable if you want to build the tray applet])
+fi
+AM_CONDITIONAL(ENABLE_STATUSICON, test "${enable_statusicon}" != "no")
+
+#============================================================================
+# panel applet
+#============================================================================
+
+dnl Whether to build the standalone volume control applet
+dnl --
+
+
+AC_ARG_ENABLE(panelapplet, AS_HELP_STRING([--enable-panelapplet], [Enable volume control panel applet (gives better icon rendering than a status icon on hidpi displays) (default: yes)]))
+if (test "${enable-panelapplet}" == "no"); then
+ AC_DEFINE(ENABLE_PANELAPPLET, 0, [Enable if you want to build the panel applet])
+else
+ AC_DEFINE(ENABLE_PANELAPPLET, 1, [Enable if you want to build the panel applet])
+fi
+AM_CONDITIONAL(ENABLE_PANELAPPLET, test "${enable_panelapplet}" != "no")
+
+#============================================================================
+# Sanity check: must build either status icon or panel applet
+#============================================================================
+
+if test "x$enable_statusicon" == "xno" && test "x$enable_panelapplet" == "xno"; then
+ AC_MSG_ERROR([must build either volume control status icon or volume control applet])
+fi
+
# Turn on the additional warnings last, so warnings don't affect other tests.
AC_ARG_ENABLE(more-warnings,
[AC_HELP_STRING([--enable-more-warnings],
@@ -170,3 +210,19 @@ echo "
Compiler: ${CC}
CFLAGS: ${CFLAGS}
"
+#this is needed to get any output when the default is used
+#rather than explicitly specifying whether to build the applet or the tray icon
+
+if test "x$enable_statusicon" = "xno"; then
+ echo " Building status icon: no"
+else
+ echo " Building status icon: yes"
+fi
+
+if test "x$enable_panelapplet" = "xno"; then
+ echo " Building panel applet: no"
+else
+ echo " Building panel applet: yes"
+fi
+#get a newline in the terminal
+echo ""