From 1d88a697b1ac2c80f579ea7f1e02cd2abf51d4c5 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Wed, 20 Mar 2019 23:19:48 -0400 Subject: Allow disabling either statusicon or panelapplet Add --enable-statusicon (yes/no default is yes) and --enable-panelapplet (yes/no default is yes) configuration flags --- configure.ac | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'configure.ac') 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 "" -- cgit v1.2.1