]> code.delx.au - pulseaudio/commitdiff
pulse/context: add --enable-legacy-runtime-dir
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Wed, 18 Feb 2009 14:51:37 +0000 (16:51 +0200)
committerMarc-André Lureau <marc-andre.lureau@nokia.com>
Wed, 18 Feb 2009 15:16:01 +0000 (17:16 +0200)
configure.ac
src/pulse/context.c

index c28a72cd8b729e96701a50f6a0db5b76a25645bf..2ac40cc6edc68f350aadea51ea484c1809604f91 100644 (file)
@@ -1220,6 +1220,12 @@ AC_SUBST(PA_SYSTEM_STATE_PATH)
 #            Output               #
 ###################################
 
+AC_ARG_ENABLE([legacy-runtime-dir],
+        AS_HELP_STRING([--disable-legacy-runtime-dir], [Try to connect on legacy (< 0.9.12) socket paths.]))
+if test "x$enable_legacy_runtime_dir" != "xno" ; then
+        AC_DEFINE(ENABLE_LEGACY_RUNTIME_DIR, [1], [Legacy runtime dir])
+fi
+
 AC_ARG_ENABLE(
         [static-bins],
         AS_HELP_STRING([--enable-static-bins],[Statically link executables.]),
index 8686e0deafaf28a89f98066aae5834e26b7fb05c..9cc1ea783a856c528e64c44f40e4aebd7dbed4a3 100644 (file)
@@ -555,6 +555,7 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
     pa_context_unref(c);
 }
 
+#if ENABLE_LEGACY_RUNTIME_DIR
 static char *get_old_legacy_runtime_dir(void) {
     char *p, u[128];
     struct stat st;
@@ -598,10 +599,12 @@ static char *get_very_old_legacy_runtime_dir(void) {
 
     return p;
 }
-
+#endif
 
 static pa_strlist *prepend_per_user(pa_strlist *l) {
     char *ufn;
+
+#if ENABLE_LEGACY_RUNTIME_DIR
     static char *legacy_dir;
 
     /* The very old per-user instance path (< 0.9.11). This is supported only to ease upgrades */
@@ -619,6 +622,7 @@ static pa_strlist *prepend_per_user(pa_strlist *l) {
         pa_xfree(p);
         pa_xfree(legacy_dir);
     }
+#endif
 
     /* The per-user instance */
     if ((ufn = pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET))) {