diff options
author | lukefromdc <[email protected]> | 2023-08-23 18:31:17 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-08-24 21:19:41 +0200 |
commit | 42eed3794f5098797e704fc1a68f17f205af7f15 (patch) | |
tree | d34071bdd1430f962c3310b9a23de37d6d480de7 /configure.ac | |
parent | 50207d611f25070fe307c0b670886b293379e088 (diff) | |
download | mate-sensors-applet-42eed3794f5098797e704fc1a68f17f205af7f15.tar.bz2 mate-sensors-applet-42eed3794f5098797e704fc1a68f17f205af7f15.tar.xz |
Allow building in or out of process
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bd17105..203a70e 100644 --- a/configure.ac +++ b/configure.ac @@ -244,6 +244,28 @@ GLIB_GSETTINGS PLUGIN_LIBTOOL_FLAGS="-module -avoid-version" AC_SUBST(PLUGIN_LIBTOOL_FLAGS) +# ==========Whether to build in-process or out ========= # +AC_ARG_ENABLE([in-process], + [AS_HELP_STRING([--enable-in-process], + [Build all applet in-process])], + [enable_in_process=$enableval], + [enable_in_process=no]) + +# Automake conditional on whether to build in-process +AM_CONDITIONAL([ENABLE_IN_PROCESS], [test "x$enable_in_process" = "xyes"]) +# Automake value expected to be substitued in .mate-panel-apple.* for the value of "InProcess" +AS_IF([test "x$enable_in_process" = "xyes"], + [AC_SUBST([APPLET_IN_PROCESS], [true])], + [AC_SUBST([APPLET_IN_PROCESS], [false])]) +# C conditional on whether to build in-process +AS_IF([test "x$enable_in_process" = "xyes"], + [AC_DEFINE([ENABLE_IN_PROCESS], [1], [building in-process])]) +# Convenience C define selecting the right applet factory +AS_IF([test "x$enable_in_process" = "xyes"], + [factory=MATE_PANEL_APPLET_IN_PROCESS_FACTORY], + [factory=MATE_PANEL_APPLET_OUT_PROCESS_FACTORY]) +AC_DEFINE_UNQUOTED([PANEL_APPLET_FACTORY], [$factory], [Panel applet factory]) + # ================= generate files =================== # AC_CONFIG_FILES([ Makefile @@ -286,4 +308,5 @@ echo " compiler: ${CC} cflags: ${CFLAGS} warning flags: ${WARN_CFLAGS} + Build in-process: $enable_in_process " |