default.pa: add module-gsettings
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 17 Apr 2018 06:07:33 +0000 (09:07 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 19 Apr 2018 11:31:18 +0000 (14:31 +0300)
This also makes the module-gconf section conditional on HAVE_GCONF,
because if only gsettings support is built, the gconf section in the
configuration file would be redundant and confusing.

configure.ac
src/daemon/default.pa.in

index bdaaef2..5720c28 100644 (file)
@@ -925,6 +925,7 @@ AS_IF([test "x$enable_gconf" = "xyes" && test "x$HAVE_GCONF" = "x0"],
     [AC_MSG_ERROR([*** GConf support not found])])
 
 AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = x1])
+AC_SUBST([HAVE_GCONF])
 
 #### GSettings support (optional) ####
 
@@ -939,6 +940,7 @@ AS_IF([test "x$enable_gsettings" = "xyes" && test "x$HAVE_GSETTINGS" = "x0"],
     [AC_MSG_ERROR([*** GSettings support not found])])
 
 AM_CONDITIONAL([HAVE_GSETTINGS], [test "x$HAVE_GSETTINGS" = x1])
+AC_SUBST([HAVE_GSETTINGS])
 
 if test "x$enable_gsettings" = "xyes" && test "x$HAVE_GSETTINGS" = "x1" ; then
     GLIB_GSETTINGS
index 7a68653..14b6a6f 100755 (executable)
@@ -110,6 +110,18 @@ ifelse(@OS_IS_WIN32@, 0, [dnl
 #load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
 #load-module module-rtp-send source=rtp.monitor
 
+ifelse(@HAVE_GSETTINGS@, 1, [dnl
+### Load additional modules from GSettings. This can be configured with the paprefs tool.
+### Please keep in mind that the modules configured by paprefs might conflict with manually
+### loaded modules.
+.ifexists module-gsettings@PA_SOEXT@
+.nofail
+load-module module-gsettings
+.fail
+.endif
+])dnl
+
+ifelse(@HAVE_GCONF@, 1, [dnl
 ### Load additional modules from GConf settings. This can be configured with the paprefs tool.
 ### Please keep in mind that the modules configured by paprefs might conflict with manually
 ### loaded modules.
@@ -118,6 +130,7 @@ ifelse(@OS_IS_WIN32@, 0, [dnl
 load-module module-gconf
 .fail
 .endif
+])dnl
 
 ### Automatically restore the default sink/source when changed by the user
 ### during runtime