changeset 466:33d0632255b5 integration_library

Merge with the Kiosk branch
author mathieub <mathieu.barthet@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 21:04:31 +0100
parents b3b9cc8f5466 (diff) af0a2d9ece0c (current diff)
children a373a9cdbe13
files main/MainWindow.cpp main/MainWindow.h main/PreferencesDialog.cpp main/PreferencesDialog.h main/main.cpp sonic-visualiser.qrc
diffstat 15 files changed, 847 insertions(+), 503 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Fri Jul 22 14:23:46 2011 +0100
+++ b/configure	Mon Jul 25 21:04:31 2011 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for Sonic Visualiser 1.8.
+# Generated by GNU Autoconf 2.67 for Sonic Visualiser 1.9-hg.
 #
 # Report bugs to <cannam@all-day-breakfast.com>.
 #
@@ -552,8 +552,8 @@
 # Identity of this package.
 PACKAGE_NAME='Sonic Visualiser'
 PACKAGE_TARNAME='sonic-visualiser'
-PACKAGE_VERSION='1.8'
-PACKAGE_STRING='Sonic Visualiser 1.8'
+PACKAGE_VERSION='1.9-hg'
+PACKAGE_STRING='Sonic Visualiser 1.9-hg'
 PACKAGE_BUGREPORT='cannam@all-day-breakfast.com'
 PACKAGE_URL=''
 
@@ -646,6 +646,8 @@
 bz2_LIBS
 bz2_CFLAGS
 QMAKE
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
 PKG_CONFIG
 EGREP
 GREP
@@ -720,6 +722,8 @@
 CCC
 CXXCPP
 PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
 bz2_CFLAGS
 bz2_LIBS
 fftw3_CFLAGS
@@ -1302,7 +1306,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Sonic Visualiser 1.8 to adapt to many kinds of systems.
+\`configure' configures Sonic Visualiser 1.9-hg to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1364,7 +1368,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Sonic Visualiser 1.8:";;
+     short | recursive ) echo "Configuration of Sonic Visualiser 1.9-hg:";;
    esac
   cat <<\_ACEOF
 
@@ -1386,6 +1390,10 @@
   CXXFLAGS    C++ compiler flags
   CXXCPP      C++ preprocessor
   PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
   bz2_CFLAGS  C compiler flags for bz2, overriding pkg-config
   bz2_LIBS    linker flags for bz2, overriding pkg-config
   fftw3_CFLAGS
@@ -1515,7 +1523,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Sonic Visualiser configure 1.8
+Sonic Visualiser configure 1.9-hg
 generated by GNU Autoconf 2.67
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1855,7 +1863,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Sonic Visualiser $as_me 1.8, which was
+It was created by Sonic Visualiser $as_me 1.9-hg, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
@@ -3825,6 +3833,10 @@
 
 
 
+
+
+
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -3937,7 +3949,6 @@
 $as_echo "no" >&6; }
 		PKG_CONFIG=""
 	fi
-
 fi
 
 
@@ -4261,11 +4272,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bz2" >&5
 $as_echo_n "checking for bz2... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$bz2_CFLAGS"; then
-        pkg_cv_bz2_CFLAGS="$bz2_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$bz2_CFLAGS"; then
+    pkg_cv_bz2_CFLAGS="$bz2_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4275,15 +4285,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$bz2_LIBS"; then
-        pkg_cv_bz2_LIBS="$bz2_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$bz2_LIBS"; then
+    pkg_cv_bz2_LIBS="$bz2_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4293,14 +4301,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -4308,18 +4317,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        bz2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        bz2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        bz2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        bz2_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$bz2_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -4412,11 +4421,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw3" >&5
 $as_echo_n "checking for fftw3... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$fftw3_CFLAGS"; then
-        pkg_cv_fftw3_CFLAGS="$fftw3_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$fftw3_CFLAGS"; then
+    pkg_cv_fftw3_CFLAGS="$fftw3_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4426,15 +4434,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$fftw3_LIBS"; then
-        pkg_cv_fftw3_LIBS="$fftw3_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$fftw3_LIBS"; then
+    pkg_cv_fftw3_LIBS="$fftw3_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4444,14 +4450,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -4459,18 +4466,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        fftw3_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        fftw3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        fftw3_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        fftw3_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$fftw3_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -4563,11 +4570,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw3f" >&5
 $as_echo_n "checking for fftw3f... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$fftw3f_CFLAGS"; then
-        pkg_cv_fftw3f_CFLAGS="$fftw3f_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$fftw3f_CFLAGS"; then
+    pkg_cv_fftw3f_CFLAGS="$fftw3f_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4577,15 +4583,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$fftw3f_LIBS"; then
-        pkg_cv_fftw3f_LIBS="$fftw3f_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$fftw3f_LIBS"; then
+    pkg_cv_fftw3f_LIBS="$fftw3f_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4595,14 +4599,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -4610,18 +4615,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        fftw3f_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        fftw3f_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        fftw3f_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        fftw3f_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$fftw3f_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -4714,11 +4719,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sndfile" >&5
 $as_echo_n "checking for sndfile... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$sndfile_CFLAGS"; then
-        pkg_cv_sndfile_CFLAGS="$sndfile_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$sndfile_CFLAGS"; then
+    pkg_cv_sndfile_CFLAGS="$sndfile_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4728,15 +4732,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$sndfile_LIBS"; then
-        pkg_cv_sndfile_LIBS="$sndfile_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$sndfile_LIBS"; then
+    pkg_cv_sndfile_LIBS="$sndfile_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4746,14 +4748,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -4761,18 +4764,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        sndfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        sndfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        sndfile_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        sndfile_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$sndfile_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -4865,11 +4868,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for samplerate" >&5
 $as_echo_n "checking for samplerate... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$samplerate_CFLAGS"; then
-        pkg_cv_samplerate_CFLAGS="$samplerate_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$samplerate_CFLAGS"; then
+    pkg_cv_samplerate_CFLAGS="$samplerate_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4879,15 +4881,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$samplerate_LIBS"; then
-        pkg_cv_samplerate_LIBS="$samplerate_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$samplerate_LIBS"; then
+    pkg_cv_samplerate_LIBS="$samplerate_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -4897,14 +4897,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -4912,18 +4913,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        samplerate_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        samplerate_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        samplerate_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        samplerate_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$samplerate_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5016,11 +5017,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vamp" >&5
 $as_echo_n "checking for vamp... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$vamp_CFLAGS"; then
-        pkg_cv_vamp_CFLAGS="$vamp_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$vamp_CFLAGS"; then
+    pkg_cv_vamp_CFLAGS="$vamp_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5030,15 +5030,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$vamp_LIBS"; then
-        pkg_cv_vamp_LIBS="$vamp_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$vamp_LIBS"; then
+    pkg_cv_vamp_LIBS="$vamp_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5048,14 +5046,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5063,18 +5062,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        vamp_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        vamp_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        vamp_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        vamp_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$vamp_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5167,11 +5166,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vamphostsdk" >&5
 $as_echo_n "checking for vamphostsdk... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$vamphostsdk_CFLAGS"; then
-        pkg_cv_vamphostsdk_CFLAGS="$vamphostsdk_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$vamphostsdk_CFLAGS"; then
+    pkg_cv_vamphostsdk_CFLAGS="$vamphostsdk_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5181,15 +5179,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$vamphostsdk_LIBS"; then
-        pkg_cv_vamphostsdk_LIBS="$vamphostsdk_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$vamphostsdk_LIBS"; then
+    pkg_cv_vamphostsdk_LIBS="$vamphostsdk_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5199,14 +5195,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5214,18 +5211,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        vamphostsdk_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        vamphostsdk_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        vamphostsdk_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        vamphostsdk_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$vamphostsdk_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5318,11 +5315,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rubberband" >&5
 $as_echo_n "checking for rubberband... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$rubberband_CFLAGS"; then
-        pkg_cv_rubberband_CFLAGS="$rubberband_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$rubberband_CFLAGS"; then
+    pkg_cv_rubberband_CFLAGS="$rubberband_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5332,15 +5328,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$rubberband_LIBS"; then
-        pkg_cv_rubberband_LIBS="$rubberband_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$rubberband_LIBS"; then
+    pkg_cv_rubberband_LIBS="$rubberband_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5350,14 +5344,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5365,18 +5360,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        rubberband_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        rubberband_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        rubberband_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        rubberband_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$rubberband_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5469,11 +5464,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for raptor" >&5
 $as_echo_n "checking for raptor... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$raptor_CFLAGS"; then
-        pkg_cv_raptor_CFLAGS="$raptor_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$raptor_CFLAGS"; then
+    pkg_cv_raptor_CFLAGS="$raptor_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5483,15 +5477,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$raptor_LIBS"; then
-        pkg_cv_raptor_LIBS="$raptor_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$raptor_LIBS"; then
+    pkg_cv_raptor_LIBS="$raptor_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5501,14 +5493,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5516,18 +5509,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        raptor_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        raptor_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        raptor_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        raptor_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$raptor_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5620,11 +5613,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rasqal" >&5
 $as_echo_n "checking for rasqal... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$rasqal_CFLAGS"; then
-        pkg_cv_rasqal_CFLAGS="$rasqal_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$rasqal_CFLAGS"; then
+    pkg_cv_rasqal_CFLAGS="$rasqal_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5634,15 +5626,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$rasqal_LIBS"; then
-        pkg_cv_rasqal_LIBS="$rasqal_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$rasqal_LIBS"; then
+    pkg_cv_rasqal_LIBS="$rasqal_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5652,14 +5642,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5667,18 +5658,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        rasqal_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        rasqal_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        rasqal_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        rasqal_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$rasqal_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5771,11 +5762,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for redland" >&5
 $as_echo_n "checking for redland... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$redland_CFLAGS"; then
-        pkg_cv_redland_CFLAGS="$redland_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$redland_CFLAGS"; then
+    pkg_cv_redland_CFLAGS="$redland_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5785,15 +5775,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$redland_LIBS"; then
-        pkg_cv_redland_LIBS="$redland_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$redland_LIBS"; then
+    pkg_cv_redland_LIBS="$redland_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5803,14 +5791,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5818,18 +5807,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        redland_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        redland_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        redland_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        redland_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$redland_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -5923,11 +5912,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblo" >&5
 $as_echo_n "checking for liblo... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$liblo_CFLAGS"; then
-        pkg_cv_liblo_CFLAGS="$liblo_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$liblo_CFLAGS"; then
+    pkg_cv_liblo_CFLAGS="$liblo_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5937,15 +5925,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$liblo_LIBS"; then
-        pkg_cv_liblo_LIBS="$liblo_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$liblo_LIBS"; then
+    pkg_cv_liblo_LIBS="$liblo_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -5955,14 +5941,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5970,18 +5957,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        liblo_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        liblo_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        liblo_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        liblo_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$liblo_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -6078,11 +6065,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for portaudio_2_0" >&5
 $as_echo_n "checking for portaudio_2_0... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$portaudio_2_0_CFLAGS"; then
-        pkg_cv_portaudio_2_0_CFLAGS="$portaudio_2_0_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$portaudio_2_0_CFLAGS"; then
+    pkg_cv_portaudio_2_0_CFLAGS="$portaudio_2_0_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6092,15 +6078,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$portaudio_2_0_LIBS"; then
-        pkg_cv_portaudio_2_0_LIBS="$portaudio_2_0_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$portaudio_2_0_LIBS"; then
+    pkg_cv_portaudio_2_0_LIBS="$portaudio_2_0_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6110,14 +6094,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6125,18 +6110,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        portaudio_2_0_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        portaudio_2_0_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        portaudio_2_0_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        portaudio_2_0_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$portaudio_2_0_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -6233,11 +6218,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5
 $as_echo_n "checking for JACK... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$JACK_CFLAGS"; then
-        pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$JACK_CFLAGS"; then
+    pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6247,15 +6231,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$JACK_LIBS"; then
-        pkg_cv_JACK_LIBS="$JACK_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$JACK_LIBS"; then
+    pkg_cv_JACK_LIBS="$JACK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6265,14 +6247,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6280,18 +6263,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        JACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$JACK_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -6388,11 +6371,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpulse" >&5
 $as_echo_n "checking for libpulse... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$libpulse_CFLAGS"; then
-        pkg_cv_libpulse_CFLAGS="$libpulse_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$libpulse_CFLAGS"; then
+    pkg_cv_libpulse_CFLAGS="$libpulse_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6402,15 +6384,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$libpulse_LIBS"; then
-        pkg_cv_libpulse_LIBS="$libpulse_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$libpulse_LIBS"; then
+    pkg_cv_libpulse_LIBS="$libpulse_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6420,14 +6400,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6435,18 +6416,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        libpulse_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        libpulse_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        libpulse_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        libpulse_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$libpulse_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -6543,11 +6524,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lrdf" >&5
 $as_echo_n "checking for lrdf... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$lrdf_CFLAGS"; then
-        pkg_cv_lrdf_CFLAGS="$lrdf_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$lrdf_CFLAGS"; then
+    pkg_cv_lrdf_CFLAGS="$lrdf_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6557,15 +6537,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$lrdf_LIBS"; then
-        pkg_cv_lrdf_LIBS="$lrdf_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$lrdf_LIBS"; then
+    pkg_cv_lrdf_LIBS="$lrdf_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6575,14 +6553,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6590,18 +6569,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        lrdf_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        lrdf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        lrdf_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        lrdf_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$lrdf_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -6698,11 +6677,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for oggz" >&5
 $as_echo_n "checking for oggz... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$oggz_CFLAGS"; then
-        pkg_cv_oggz_CFLAGS="$oggz_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$oggz_CFLAGS"; then
+    pkg_cv_oggz_CFLAGS="$oggz_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6712,15 +6690,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$oggz_LIBS"; then
-        pkg_cv_oggz_LIBS="$oggz_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$oggz_LIBS"; then
+    pkg_cv_oggz_LIBS="$oggz_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6730,14 +6706,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6745,18 +6722,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        oggz_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        oggz_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        oggz_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        oggz_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$oggz_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -6853,11 +6830,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fishsound" >&5
 $as_echo_n "checking for fishsound... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$fishsound_CFLAGS"; then
-        pkg_cv_fishsound_CFLAGS="$fishsound_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$fishsound_CFLAGS"; then
+    pkg_cv_fishsound_CFLAGS="$fishsound_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6867,15 +6843,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$fishsound_LIBS"; then
-        pkg_cv_fishsound_LIBS="$fishsound_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$fishsound_LIBS"; then
+    pkg_cv_fishsound_LIBS="$fishsound_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -6885,14 +6859,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -6900,18 +6875,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        fishsound_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        fishsound_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        fishsound_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        fishsound_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$fishsound_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -7008,11 +6983,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mad" >&5
 $as_echo_n "checking for mad... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$mad_CFLAGS"; then
-        pkg_cv_mad_CFLAGS="$mad_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$mad_CFLAGS"; then
+    pkg_cv_mad_CFLAGS="$mad_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -7022,15 +6996,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$mad_LIBS"; then
-        pkg_cv_mad_LIBS="$mad_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$mad_LIBS"; then
+    pkg_cv_mad_LIBS="$mad_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -7040,14 +7012,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -7055,18 +7028,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        mad_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        mad_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        mad_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        mad_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$mad_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -7163,11 +7136,10 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for id3tag" >&5
 $as_echo_n "checking for id3tag... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$id3tag_CFLAGS"; then
-        pkg_cv_id3tag_CFLAGS="$id3tag_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$id3tag_CFLAGS"; then
+    pkg_cv_id3tag_CFLAGS="$id3tag_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -7177,15 +7149,13 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$id3tag_LIBS"; then
-        pkg_cv_id3tag_LIBS="$id3tag_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+ else
+    pkg_failed=untried
+fi
+if test -n "$id3tag_LIBS"; then
+    pkg_cv_id3tag_LIBS="$id3tag_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5
   ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5
   ac_status=$?
@@ -7195,14 +7165,15 @@
 else
   pkg_failed=yes
 fi
-    fi
-else
-	pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -7210,18 +7181,18 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        id3tag_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        id3tag_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         else
-	        id3tag_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$SV_MODULE_VERSION_TEST"`
+	        id3tag_PKG_ERRORS=`$PKG_CONFIG --print-errors "$SV_MODULE_VERSION_TEST" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$id3tag_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
 $as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
 else
@@ -7858,7 +7829,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Sonic Visualiser $as_me 1.8, which was
+This file was extended by Sonic Visualiser $as_me 1.9-hg, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7911,7 +7882,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Sonic Visualiser config.status 1.8
+Sonic Visualiser config.status 1.9-hg
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
@@ -9025,7 +8996,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Sonic Visualiser $as_me 1.8, which was
+This file was extended by Sonic Visualiser $as_me 1.9-hg, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9078,7 +9049,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Sonic Visualiser config.status 1.8
+Sonic Visualiser config.status 1.9-hg
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
--- a/configure.ac	Fri Jul 22 14:23:46 2011 +0100
+++ b/configure.ac	Mon Jul 25 21:04:31 2011 +0100
@@ -1,5 +1,5 @@
 
-AC_INIT([Sonic Visualiser], 1.8, cannam@all-day-breakfast.com)
+AC_INIT([Sonic Visualiser], 1.9-hg, cannam@all-day-breakfast.com)
 
 AC_CONFIG_SRCDIR(main/main.cpp)
 
--- a/deploy/osx/deploy.sh	Fri Jul 22 14:23:46 2011 +0100
+++ b/deploy/osx/deploy.sh	Mon Jul 25 21:04:31 2011 +0100
@@ -9,6 +9,9 @@
 dmg="$2"
 if [ -z "$source" ] || [ ! -d "$source" ] || [ -z "$dmg" ]; then
 	echo "Usage: $0 <source.app> <target-dmg-basename>"
+	echo "  e.g. $0 MyApplication.app MyApplication"
+ 	echo "  Version number and .dmg will be appended automatically,"
+        echo "  but the .app name must include .app"
 	exit 2
 fi
 app=`basename "$source" .app`
--- a/main/MainWindow.cpp	Fri Jul 22 14:23:46 2011 +0100
+++ b/main/MainWindow.cpp	Mon Jul 25 21:04:31 2011 +0100
@@ -30,6 +30,7 @@
 #include "framework/TransformUserConfigurator.h"
 #include "view/ViewManager.h"
 #include "base/Preferences.h"
+#include "base/ResourceFinder.h"
 #include "layer/WaveformLayer.h"
 #include "layer/TimeRulerLayer.h"
 #include "layer/TimeInstantLayer.h"
@@ -112,6 +113,8 @@
 #include <QCheckBox>
 #include <QRegExp>
 #include <QScrollArea>
+#include <QDesktopServices>
+#include <QFileSystemWatcher>
 
 #include <iostream>
 #include <cstdio>
@@ -137,6 +140,7 @@
     m_sliceMenu(0),
     m_recentFilesMenu(0),
     m_recentTransformsMenu(0),
+    m_templatesMenu(0),
     m_rightButtonMenu(0),
     m_rightButtonLayerMenu(0),
     m_rightButtonTransformsMenu(0),
@@ -160,6 +164,7 @@
     m_layerTreeDialog(0),
     m_activityLog(new ActivityLog()),
     m_keyReference(new KeyReference()),
+    m_templateWatcher(0),
     m_fileMenu(0),
     m_editMenu(0),
     m_viewMenu(0),
@@ -183,7 +188,7 @@
 {
     Profiler profiler("MainWindow::MainWindow");
 
-    setWindowTitle(tr("Sonic Visualiser"));
+    setWindowTitle(tr("Sonic Visualiser (Kiosk edition)"));
 
     UnitDatabase *udb = UnitDatabase::getInstance();
     udb->registerUnit("Hz");
@@ -408,7 +413,7 @@
     m_keyReference->registerShortcut(action);
     m_fileMenu->addAction(action);
     m_fileToolBar->addAction(action);
-
+/*
     icon = il.load("fileopensession");
     action = new QAction(icon, tr("&Open Session..."), this);
     action->setShortcut(tr("Ctrl+O"));
@@ -416,14 +421,39 @@
     connect(action, SIGNAL(triggered()), this, SLOT(openSession()));
     m_keyReference->registerShortcut(action);
     m_fileMenu->addAction(action);
-
+*/
     icon = il.load("fileopen");
     icon.addPixmap(il.loadPixmap("fileopen-22"));
-
     action = new QAction(icon, tr("&Open..."), this);
+    action->setShortcut(tr("Ctrl+O"));
     action->setStatusTip(tr("Open a session file, audio file, or layer"));
     connect(action, SIGNAL(triggered()), this, SLOT(openSomething()));
     m_fileToolBar->addAction(action);
+    m_fileMenu->addAction(action);
+
+    // We want this one to go on the toolbar now, if we add it at all,
+    // but on the menu later
+    QAction *iaction = new QAction(tr("&Import More Audio..."), this);
+    iaction->setShortcut(tr("Ctrl+I"));
+    iaction->setStatusTip(tr("Import an extra audio file into a new pane"));
+    connect(iaction, SIGNAL(triggered()), this, SLOT(importMoreAudio()));
+    connect(this, SIGNAL(canImportMoreAudio(bool)), iaction, SLOT(setEnabled(bool)));
+    m_keyReference->registerShortcut(iaction);
+
+    action = new QAction(tr("Open Lo&cation..."), this);
+    action->setShortcut(tr("Ctrl+Shift+O"));
+    action->setStatusTip(tr("Open or import a file from a remote URL"));
+    connect(action, SIGNAL(triggered()), this, SLOT(openLocation()));
+    m_keyReference->registerShortcut(action);
+    m_fileMenu->addAction(action);
+
+    m_recentFilesMenu = menu->addMenu(tr("Open &Recent"));
+    m_recentFilesMenu->setTearOffEnabled(true);
+    setupRecentFilesMenu();
+    connect(&m_recentFiles, SIGNAL(recentChanged()),
+            this, SLOT(setupRecentFilesMenu()));
+
+    m_fileMenu->addSeparator();
 
     icon = il.load("filesave");
     icon.addPixmap(il.loadPixmap("filesave-22"));
@@ -447,6 +477,7 @@
 
     m_fileMenu->addSeparator();
 
+/*
     icon = il.load("fileopenaudio");
     action = new QAction(icon, tr("&Import Audio File..."), this);
     action->setShortcut(tr("Ctrl+I"));
@@ -454,15 +485,12 @@
     connect(action, SIGNAL(triggered()), this, SLOT(importAudio()));
     m_keyReference->registerShortcut(action);
     m_fileMenu->addAction(action);
-
-    action = new QAction(tr("Import Secondary Audio File..."), this);
-    action->setShortcut(tr("Ctrl+Shift+I"));
-    action->setStatusTip(tr("Import an extra audio file as a separate layer"));
-    connect(action, SIGNAL(triggered()), this, SLOT(importMoreAudio()));
-    connect(this, SIGNAL(canImportMoreAudio(bool)), action, SLOT(setEnabled(bool)));
-    m_keyReference->registerShortcut(action);
-    m_fileMenu->addAction(action);
-
+*/
+
+    // the Import action we made earlier
+    m_fileMenu->addAction(iaction);
+
+    /* //removes the Export Audio File functionnality from the File menu
     action = new QAction(tr("&Export Audio File..."), this);
     action->setStatusTip(tr("Export selection as an audio file"));
     connect(action, SIGNAL(triggered()), this, SLOT(exportAudio()));
@@ -470,6 +498,7 @@
     m_fileMenu->addAction(action);
 
     m_fileMenu->addSeparator();
+    */
 
     m_importAnnotationLayerAction = new QAction(tr("Import Annotation &Layer..."), this);
     m_importAnnotationLayerAction->setShortcut(tr("Ctrl+L"));
@@ -495,22 +524,28 @@
 
     m_fileMenu->addSeparator();
 
-    action = new QAction(tr("Open Lo&cation..."), this);
-    action->setShortcut(tr("Ctrl+Shift+O"));
-    action->setStatusTip(tr("Open or import a file from a remote URL"));
-    connect(action, SIGNAL(triggered()), this, SLOT(openLocation()));
-    m_keyReference->registerShortcut(action);
+    QString templatesMenuLabel = tr("Apply Session Template");
+    m_templatesMenu = m_fileMenu->addMenu(templatesMenuLabel);
+    m_templatesMenu->setTearOffEnabled(true);
+    // We need to have a main model for this option to be useful:
+    // canExportAudio captures that
+    connect(this, SIGNAL(canExportAudio(bool)), m_templatesMenu, SLOT(setEnabled(bool)));
+
+    // Set up the menu in a moment, after m_manageTemplatesAction constructed
+
+    action = new QAction(tr("Export Session as Template..."), this);
+    connect(action, SIGNAL(triggered()), this, SLOT(saveSessionAsTemplate()));
+    // We need to have something in the session for this to be useful:
+    // canDeleteCurrentLayer captures that
+    connect(this, SIGNAL(canExportAudio(bool)), action, SLOT(setEnabled(bool)));
     m_fileMenu->addAction(action);
 
-    m_fileMenu->addSeparator();
-
-    m_recentFilesMenu = m_fileMenu->addMenu(tr("&Recent Files"));
-    m_recentFilesMenu->setTearOffEnabled(true);
-    setupRecentFilesMenu();
-    connect(&m_recentFiles, SIGNAL(recentChanged()),
-            this, SLOT(setupRecentFilesMenu()));
-
-    m_fileMenu->addSeparator();
+    m_manageTemplatesAction = new QAction(tr("Manage Exported Templates"), this);
+    connect(m_manageTemplatesAction, SIGNAL(triggered()), this, SLOT(manageSavedTemplates()));
+    m_fileMenu->addAction(m_manageTemplatesAction);
+
+    setupTemplatesMenu();
+
     action = new QAction(tr("&Preferences..."), this);
     action->setStatusTip(tr("Adjust the application preferences"));
     connect(action, SIGNAL(triggered()), this, SLOT(preferences()));
@@ -1662,6 +1697,57 @@
 }
 
 void
+MainWindow::setupTemplatesMenu()
+{
+    m_templatesMenu->clear();
+
+    QAction *defaultAction = new QAction(tr("Standard Waveform"), this);
+    defaultAction->setObjectName("default");
+    connect(defaultAction, SIGNAL(triggered()), this, SLOT(applyTemplate()));
+    m_templatesMenu->addAction(defaultAction);
+
+    m_templatesMenu->addSeparator();
+
+    QAction *action = 0;
+
+    QStringList templates = ResourceFinder().getResourceFiles("templates", "svt");
+
+    bool havePersonal = false;
+
+    // (ordered by name)
+    std::set<QString> byName;
+    foreach (QString t, templates) {
+        if (!t.startsWith(":")) havePersonal = true;
+        byName.insert(QFileInfo(t).baseName());
+    }
+
+    foreach (QString t, byName) {
+        if (t.toLower() == "default") continue;
+        action = new QAction(t, this);
+        connect(action, SIGNAL(triggered()), this, SLOT(applyTemplate()));
+        m_templatesMenu->addAction(action);
+    }
+
+    if (!templates.empty()) m_templatesMenu->addSeparator();
+
+    if (!m_templateWatcher) {
+        m_templateWatcher = new QFileSystemWatcher(this);
+        m_templateWatcher->addPath(ResourceFinder().getResourceSaveDir("templates"));
+        connect(m_templateWatcher, SIGNAL(directoryChanged(const QString &)),
+                this, SLOT(setupTemplatesMenu()));
+    }
+
+    QAction *setDefaultAction = new QAction(tr("Choose Default Template..."), this);
+    setDefaultAction->setObjectName("set_default_template");
+    connect(setDefaultAction, SIGNAL(triggered()), this, SLOT(preferences()));
+    m_templatesMenu->addSeparator();
+    m_templatesMenu->addAction(setDefaultAction);
+
+    m_manageTemplatesAction->setEnabled(havePersonal);
+}
+
+
+void
 MainWindow::setupRecentTransformsMenu()
 {
     m_recentTransformsMenu->clear();
@@ -1781,7 +1867,7 @@
 
     m_playbackToolBar = addToolBar(tr("Playback Toolbar"));
     m_rwdStartAction = m_playbackToolBar->addAction(il.load("rewind-start"),
-                                                  tr("Rewind to Start"));
+                                                                           tr("Rewind to Start"));
     m_rwdStartAction->setShortcut(tr("Home"));
     m_rwdStartAction->setStatusTip(tr("Rewind to the start"));
     connect(m_rwdStartAction, SIGNAL(triggered()), this, SLOT(rewindStart()));
@@ -2193,7 +2279,7 @@
     QString path = getOpenFileName(FileFinder::AudioFile);
 
     if (path != "") {
-	if (openAudio(path, ReplaceMainModel) == FileOpenFailed) {
+	if (openAudio(path, ReplaceSession) == FileOpenFailed) {
             emit hideSplash();
 	    QMessageBox::critical(this, tr("Failed to open file"),
 				  tr("<b>File open failed</b><p>Audio file \"%1\" could not be opened").arg(path));
@@ -2215,6 +2301,7 @@
     }
 }
 
+/*
 void
 MainWindow::exportAudio()
 {
@@ -2384,6 +2471,7 @@
 	QMessageBox::critical(this, tr("Failed to write file"), error);
     }
 }
+*/
 
 void
 MainWindow::importLayer()
@@ -2679,7 +2767,7 @@
     m_timeRulerLayer = 0; // document owned this
 
     m_sessionFile = "";
-    setWindowTitle(tr("Sonic Visualiser"));
+    setWindowTitle(tr("Sonic Visualiser (Kiosk edition)"));
 
     CommandHistory::getInstance()->clear();
     CommandHistory::getInstance()->documentSaved();
@@ -2717,7 +2805,7 @@
 
     if (path.isEmpty()) return;
 
-    FileOpenStatus status = open(path, AskUser);
+    FileOpenStatus status = open(path, ReplaceSession);
 
     if (status == FileOpenFailed) {
         emit hideSplash();
@@ -2749,7 +2837,7 @@
 
     if (text.isEmpty()) return;
 
-    FileOpenStatus status = open(text);
+    FileOpenStatus status = open(text, AskUser);
 
     if (status == FileOpenFailed) {
         emit hideSplash();
@@ -2777,7 +2865,7 @@
     QString path = action->text();
     if (path == "") return;
 
-    FileOpenStatus status = open(path);
+    FileOpenStatus status = open(path, ReplaceSession);
 
     if (status == FileOpenFailed) {
         emit hideSplash();
@@ -2791,6 +2879,70 @@
 }
 
 void
+MainWindow::applyTemplate()
+{
+    QObject *s = sender();
+    QAction *action = qobject_cast<QAction *>(s);
+
+    if (!action) {
+	std::cerr << "WARNING: MainWindow::applyTemplate: sender is not an action"
+		  << std::endl;
+	return;
+    }
+
+    QString n = action->objectName();
+    if (n == "") n = action->text();
+
+    if (n == "") {
+        std::cerr << "WARNING: MainWindow::applyTemplate: sender has no name"
+                  << std::endl;
+        return;
+    }
+
+    QString mainModelLocation;
+    WaveFileModel *mm = getMainModel();
+    if (mm) mainModelLocation = mm->getLocation();
+    if (mainModelLocation != "") {
+        openAudio(mainModelLocation, ReplaceSession, n);
+    } else {
+        openSessionTemplate(n);
+    }
+}
+
+void
+MainWindow::saveSessionAsTemplate()
+{
+    QString name = QInputDialog::getText
+        (this, tr("Enter template name"),
+         tr("Please enter a name for the saved template:"));
+    if (name == "") return;
+    
+    name.replace(QRegExp("[^\\w\\s\\.\"'-]"), "_");
+
+    ResourceFinder rf;
+    QString dir = rf.getResourceSaveDir("templates");
+    QString filename = QString("%1/%2.svt").arg(dir).arg(name);
+    if (QFile(filename).exists()) {
+        if (QMessageBox::warning(this,
+                                 tr("Template file exists"),
+                                 tr("<b>Template file exists</b><p>The template \"%1\" already exists.<br>Overwrite it?").arg(name),
+                                 QMessageBox::Ok | QMessageBox::Cancel,
+                                 QMessageBox::Cancel) != QMessageBox::Ok) {
+            return;
+        }
+    }
+
+    saveSessionTemplate(filename);
+}
+
+void
+MainWindow::manageSavedTemplates()
+{
+    ResourceFinder rf;
+    QDesktopServices::openUrl("file:" + rf.getResourceSaveDir("templates"));
+}
+
+void
 MainWindow::paneAdded(Pane *pane)
 {
     if (m_overview) m_overview->registerView(pane);
@@ -3054,7 +3206,7 @@
 	QMessageBox::critical(this, tr("Failed to save file"),
 			      tr("<b>Save failed</b><p>Session file \"%1\" could not be saved.").arg(path));
     } else {
-	setWindowTitle(tr("Sonic Visualiser: %1")
+	setWindowTitle(tr("Sonic Visualiser (Kiosk edition): %1")
 		       .arg(QFileInfo(path).fileName()));
 	m_sessionFile = path;
 	CommandHistory::getInstance()->documentSaved();
@@ -3963,9 +4115,15 @@
 void
 MainWindow::preferences()
 {
+    bool goToTemplateTab =
+        (sender() && sender()->objectName() == "set_default_template");
+
     if (!m_preferencesDialog.isNull()) {
         m_preferencesDialog->show();
         m_preferencesDialog->raise();
+        if (goToTemplateTab) {
+            m_preferencesDialog->switchToTab(PreferencesDialog::TemplateTab);
+        }
         return;
     }
 
@@ -3980,6 +4138,9 @@
     m_preferencesDialog->setAttribute(Qt::WA_DeleteOnClose);
 
     m_preferencesDialog->show();
+    if (goToTemplateTab) {
+        m_preferencesDialog->switchToTab(PreferencesDialog::TemplateTab);
+    }
 }
 
 void
@@ -4036,8 +4197,8 @@
 
     QString aboutText;
 
-    aboutText += tr("<h3>About Sonic Visualiser</h3>");
-    aboutText += tr("<p>Sonic Visualiser is a program for viewing and exploring audio data for semantic music analysis and annotation.<br><a href=\"http://www.sonicvisualiser.org/\">http://www.sonicvisualiser.org/</a></p>");
+    aboutText += tr("<h3>About Sonic Visualiser (Kiosk edition)</h3>");
+    aboutText += tr("<p>Sonic Visualiser is a program for viewing and exploring audio data for semantic music analysis and annotation. The Kiosk edition provides all of the features of the full Sonic Visualiser, except that audio files cannot be saved from it. <br><a href=\"http://www.sonicvisualiser.org/\">http://www.sonicvisualiser.org/</a></p>");
     aboutText += tr("<p><small>%1 : %2 configuration</small></p>")
         .arg(version)
         .arg(debug ? tr("Debug") : tr("Release"));
--- a/main/MainWindow.h	Fri Jul 22 14:23:46 2011 +0100
+++ b/main/MainWindow.h	Mon Jul 25 21:04:31 2011 +0100
@@ -58,6 +58,7 @@
 class KeyReference;
 class Labeller;
 class ActivityLog;
+class QFileSystemWatcher;
 class QScrollArea;
 
 class MainWindow : public MainWindowBase
@@ -85,7 +86,8 @@
     virtual void openSomething();
     virtual void openLocation();
     virtual void openRecentFile();
-    virtual void exportAudio();
+    virtual void applyTemplate();
+   
     virtual void importLayer();
     virtual void exportLayer();
     virtual void exportImage();
@@ -142,6 +144,7 @@
 
     virtual void setupRecentFilesMenu();
     virtual void setupRecentTransformsMenu();
+    virtual void setupTemplatesMenu();
 
     virtual void playSpeedChanged(int);
     virtual void playSoloToggled();
@@ -171,6 +174,9 @@
     virtual void midiEventsAvailable();
     virtual void playStatusChanged(bool);
 
+    virtual void saveSessionAsTemplate();
+    virtual void manageSavedTemplates();
+
     virtual void website();
     virtual void help();
     virtual void about();
@@ -195,6 +201,7 @@
     QMenu                   *m_sliceMenu;
     QMenu                   *m_recentFilesMenu;
     QMenu                   *m_recentTransformsMenu;
+    QMenu                   *m_templatesMenu;
     QMenu                   *m_rightButtonMenu;
     QMenu                   *m_rightButtonLayerMenu;
     QMenu                   *m_rightButtonTransformsMenu;
@@ -216,6 +223,7 @@
     QAction                 *m_playAction;
     QAction                 *m_playSelectionAction;
     QAction                 *m_playLoopAction;
+    QAction                 *m_manageTemplatesAction;
     QAction                 *m_alAction;
 
     QAction                 *m_importAnnotationLayerAction;
@@ -250,6 +258,8 @@
     ActivityLog             *m_activityLog;
     KeyReference            *m_keyReference;
 
+    QFileSystemWatcher      *m_templateWatcher;
+
     struct LayerConfiguration {
 	LayerConfiguration(LayerFactory::LayerType _layer
 			                       = LayerFactory::TimeRuler,
--- a/main/PreferencesDialog.cpp	Fri Jul 22 14:23:46 2011 +0100
+++ b/main/PreferencesDialog.cpp	Mon Jul 25 21:04:31 2011 +0100
@@ -31,12 +31,16 @@
 #include <QFileDialog>
 #include <QMessageBox>
 #include <QSpinBox>
+#include <QListWidget>
 #include <QSettings>
 
+#include <set>
+
 #include "widgets/WindowTypeSelector.h"
 #include "widgets/IconLoader.h"
 #include "base/Preferences.h"
 #include "audioio/AudioTargetFactory.h"
+#include "base/ResourceFinder.h"
 
 PreferencesDialog::PreferencesDialog(QWidget *parent, Qt::WFlags flags) :
     QDialog(parent, flags),
@@ -50,10 +54,10 @@
     QGridLayout *grid = new QGridLayout;
     setLayout(grid);
 
-    QTabWidget *tab = new QTabWidget;
-    grid->addWidget(tab, 0, 0);
+    m_tabs = new QTabWidget;
+    grid->addWidget(m_tabs, 0, 0);
     
-    tab->setTabPosition(QTabWidget::North);
+    m_tabs->setTabPosition(QTabWidget::North);
 
     // Create this first, as slots that get called from the ctor will
     // refer to it
@@ -263,7 +267,8 @@
 
     subgrid->setRowStretch(row, 10);
     
-    tab->addTab(frame, tr("&General"));
+    m_tabOrdering[GeneralTab] = m_tabs->count();
+    m_tabs->addTab(frame, tr("&General"));
 
     // Appearance tab
 
@@ -300,15 +305,17 @@
     subgrid->addWidget(showSplash, row++, 1, 1, 1);
 
     subgrid->setRowStretch(row, 10);
-
+   
     subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
-                                                ("Start In Minimal Mode"))),
-                       row, 0);
+                                                ("Start In Minimal Mode"))), row, 0);
     subgrid->addWidget(startInMiniMode, row++, 1, 1, 1);
 
     subgrid->setRowStretch(row, 10);
     
-    tab->addTab(frame, tr("&Appearance"));
+    m_tabOrdering[AppearanceTab] = m_tabs->count();
+
+    m_tabs->addTab(frame, tr("&Appearance"));
+    
 
     // Analysis tab
 
@@ -341,7 +348,53 @@
     
     subgrid->setRowStretch(row, 10);
     
-    tab->addTab(frame, tr("Anal&ysis"));
+    m_tabOrdering[AnalysisTab] = m_tabs->count();
+    m_tabs->addTab(frame, tr("Anal&ysis"));
+
+    // Template tab
+
+    frame = new QFrame;
+    subgrid = new QGridLayout;
+    frame->setLayout(subgrid);
+    row = 0;
+    
+    subgrid->addWidget(new QLabel(tr("Default session template for audio files:")), row++, 0);
+
+    QListWidget *lw = new QListWidget();
+    subgrid->addWidget(lw, row, 0);
+    subgrid->setRowStretch(row, 10);
+    row++;
+
+    settings.beginGroup("MainWindow");
+    m_currentTemplate = settings.value("sessiontemplate", "").toString();
+    settings.endGroup();
+
+    lw->addItem(tr("Standard Waveform"));
+    if (m_currentTemplate == "" || m_currentTemplate == "default") {
+        lw->setCurrentRow(lw->count()-1);
+    }
+    m_templates.push_back("");
+
+    QStringList templates = ResourceFinder().getResourceFiles("templates", "svt");
+
+    std::set<QString> byName;
+    foreach (QString t, templates) {
+        byName.insert(QFileInfo(t).baseName());
+    }
+
+    foreach (QString t, byName) {
+        if (t.toLower() == "default") continue;
+        m_templates.push_back(t);
+        lw->addItem(t);
+        if (m_currentTemplate == t) {
+            lw->setCurrentRow(lw->count()-1);
+        }
+    }
+
+    connect(lw, SIGNAL(currentRowChanged(int)), this, SLOT(defaultTemplateChanged(int)));
+
+    m_tabOrdering[TemplateTab] = m_tabs->count();
+    m_tabs->addTab(frame, tr("Session &Template"));
 
     QDialogButtonBox *bb = new QDialogButtonBox(Qt::Horizontal);
     grid->addWidget(bb, 1, 0);
@@ -364,6 +417,14 @@
 }
 
 void
+PreferencesDialog::switchToTab(Tab t)
+{
+    if (m_tabOrdering.contains(t)) {
+        m_tabs->setCurrentIndex(m_tabOrdering[t]);
+    }
+}
+
+void
 PreferencesDialog::windowTypeChanged(WindowType type)
 {
     m_windowType = type;
@@ -430,6 +491,14 @@
 }
 
 void
+PreferencesDialog::defaultTemplateChanged(int i)
+{
+    m_currentTemplate = m_templates[i];
+    m_applyButton->setEnabled(true);
+}
+
+
+void
 PreferencesDialog::startInMiniModeChanged(int state)
 {
     m_startInMiniMode = (state == Qt::Checked);
@@ -510,10 +579,15 @@
         AudioTargetFactory::getInstance()->getCallbackTargetNames();
 
     QSettings settings;
+
     settings.beginGroup("Preferences");
     settings.setValue("audio-target", devices[m_audioDevice]);
     settings.endGroup();
 
+    settings.beginGroup("MainWindow");
+    settings.setValue("sessiontemplate", m_currentTemplate);
+    settings.endGroup();
+
     m_applyButton->setEnabled(false);
 
     if (m_changesOnRestart) {
--- a/main/PreferencesDialog.h	Fri Jul 22 14:23:46 2011 +0100
+++ b/main/PreferencesDialog.h	Mon Jul 25 21:04:31 2011 +0100
@@ -17,12 +17,14 @@
 #define _PREFERENCES_DIALOG_H_
 
 #include <QDialog>
+#include <QMap>
 
 #include "base/Window.h"
 
 class WindowTypeSelector;
 class QPushButton;
 class QLineEdit;
+class QTabWidget;
 
 class PreferencesDialog : public QDialog
 {
@@ -32,6 +34,14 @@
     PreferencesDialog(QWidget *parent = 0, Qt::WFlags flags = 0);
     virtual ~PreferencesDialog();
 
+    enum Tab {
+        GeneralTab,
+        AppearanceTab,
+        AnalysisTab,
+        TemplateTab
+    };
+    void switchToTab(Tab tab);
+
 public slots:
     void applicationClosing(bool quickly);
 
@@ -49,6 +59,7 @@
     void timeToTextModeChanged(int mode);
     void viewFontSizeChanged(int sz);
     void showSplashChanged(int state);
+    void defaultTemplateChanged(int);
 
     void startInMiniModeChanged(int state);
 
@@ -62,7 +73,13 @@
     WindowTypeSelector *m_windowTypeSelector;
     QPushButton *m_applyButton;
 
+    QTabWidget *m_tabs;
+    QMap<Tab, int> m_tabOrdering;
+
     QLineEdit *m_tempDirRootEdit;
+
+    QString m_currentTemplate;
+    QStringList m_templates;
     
     WindowType m_windowType;
     int m_spectrogramSmoothing;
--- a/main/main.cpp	Fri Jul 22 14:23:46 2011 +0100
+++ b/main/main.cpp	Mon Jul 25 21:04:31 2011 +0100
@@ -245,7 +245,7 @@
 
     if (args.contains("--help") || args.contains("-h") || args.contains("-?")) {
         std::cerr << QApplication::tr(
-            "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n  %1 [--no-audio] [--no-osc] [<file> ...]\n\n  --no-audio: Do not attempt to open an audio output device\n  --no-osc: Do not provide an Open Sound Control port for remote control\n  <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << std::endl;
+            "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation. The Kiosk edition provides all of the features of the full Sonic Visualiser, except that audio files cannot be saved from it.\n\nUsage:\n\n  %1 [--no-audio] [--no-osc] [<file> ...]\n\n  --no-audio: Do not attempt to open an audio output device\n  --no-osc: Do not provide an Open Sound Control port for remote control\n  <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]).toStdString() << std::endl;
         exit(2);
     }
 
@@ -254,7 +254,7 @@
 
     QApplication::setOrganizationName("sonic-visualiser");
     QApplication::setOrganizationDomain("sonicvisualiser.org");
-    QApplication::setApplicationName(QApplication::tr("Sonic Visualiser"));
+    QApplication::setApplicationName(QApplication::tr("Sonic Visualiser (Kiosk edition)"));
 
     QSplashScreen *splash = 0;
 
@@ -478,7 +478,7 @@
     }
     if (status != MainWindow::FileOpenSucceeded) {
         if (!haveMainModel) {
-            status = m_mainWindow->open(path, MainWindow::ReplaceMainModel);
+            status = m_mainWindow->open(path, MainWindow::ReplaceSession);
             if (status == MainWindow::FileOpenSucceeded) {
                 haveMainModel = true;
             }
--- a/misc/debian-dependencies.sh	Fri Jul 22 14:23:46 2011 +0100
+++ b/misc/debian-dependencies.sh	Mon Jul 25 21:04:31 2011 +0100
@@ -13,7 +13,7 @@
 trap "rm -f $pfile $rfile" 0
 echo
 
-ldd "$target" | awk '{ print $3; }' | while read lib; do
+ldd "$target" | awk '{ print $3; }' | grep '^/' | while read lib; do
     if test -n "$lib" ; then
 	dpkg-query -S "$lib"
     fi
@@ -24,6 +24,7 @@
 echo
 
 for p in `cat $pfile`; do 
+    echo Looking at $p 1>&2
     apt-cache showpkg "$p" | grep '^  ' | grep ',' | awk -F, '{ print $1; }' | \
 	while read d; do 
 	    if grep -q '^'$d'$' $pfile; then
Binary file samples/silent.wav has changed
--- a/sonic-visualiser.qrc	Fri Jul 22 14:23:46 2011 +0100
+++ b/sonic-visualiser.qrc	Mon Jul 25 21:04:31 2011 +0100
@@ -100,10 +100,15 @@
     <file>samples/kick.wav</file>
     <file>samples/organ.wav</file>
     <file>samples/piano.wav</file>
+    <file>samples/silent.wav</file>
     <file>samples/snare.wav</file>
     <file>samples/stick.wav</file>
     <file>samples/strike.wav</file>
     <file>samples/tap.wav</file>
+    <file>templates/default.svt</file>
+    <file>templates/Scrolling Waveforms.svt</file>
+    <file>templates/Spectrograms.svt</file>
+    <file>templates/Waveform and Melodic Range Spectrogram.svt</file>
     <file>i18n/sonic-visualiser_ru.qm</file>
     <file>i18n/sonic-visualiser_en_GB.qm</file>
     <file>i18n/sonic-visualiser_en_US.qm</file>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/Scrolling Waveforms.svt	Mon Jul 25 21:04:31 2011 +0100
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sonic-visualiser>
+<sv>
+<data>
+  <model id="7" name="placeholder" sampleRate="44100" type="wavefile" file=":samples/silent.wav" mainModel="true"/>
+  <playparameters mute="false" pan="0" gain="1" pluginId="" model="7"/>
+  <layer id="8" type="timeruler" name="Ruler &lt;2&gt;" model="7"  colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="3" type="spectrogram" name="Spectrogram &lt;3&gt;" model="7"  channel="0" windowSize="1024" windowHopLevel="2" gain="1" threshold="0" minFrequency="10" maxFrequency="0" colourScale="3" colourScheme="0" colourRotation="0" frequencyScale="0" binDisplay="0" normalizeColumns="false" normalizeVisibleArea="false"/>
+  <layer id="9" type="timeruler" name="Ruler &lt;4&gt;" model="7"  colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="10" type="waveform" name="Waveform &lt;3&gt;" model="7"  gain="1" showMeans="1" greyscale="1" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Purple" colour="#c832ff" darkBackground="false" />
+  <layer id="11" type="timeruler" name="Ruler &lt;3&gt;" model="7"  colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="12" type="spectrogram" name="Spectrogram &lt;2&gt;" model="7"  channel="-1" windowSize="4096" windowHopLevel="5" gain="1" threshold="0" minFrequency="40" maxFrequency="2000" colourScale="0" colourScheme="0" colourRotation="0" frequencyScale="1" binDisplay="2" normalizeColumns="true" normalizeVisibleArea="false"/>
+  <layer id="13" type="waveform" name="Waveform" model="7"  gain="1" showMeans="1" greyscale="0" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="14" type="waveform" name="Waveform &lt;2&gt;" model="7"  gain="1" showMeans="1" greyscale="1" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Blue" colour="#000080" darkBackground="false" />
+  <layer id="15" type="spectrogram" name="Spectrogram" model="7"  channel="-1" windowSize="8192" windowHopLevel="4" gain="1" threshold="0" minFrequency="40" maxFrequency="1500" colourScale="0" colourScheme="1" colourRotation="0" frequencyScale="1" binDisplay="0" normalizeColumns="false" normalizeVisibleArea="false"/>
+  <layer id="16" type="timeruler" name="Ruler" model="7"  colourName="Black" colour="#000000" darkBackground="false" />
+</data>
+<display>
+  <window width="1216" height="701"/>
+  <view centre="0" zoom="1024" followPan="1" followZoom="1" tracking="scroll"  type="pane" centreLineVisible="1" height="210" >
+    <layer id="14" type="waveform" name="Waveform &lt;2&gt;" model="7" visible="true"/>
+    <layer id="11" type="timeruler" name="Ruler &lt;3&gt;" model="7" visible="true"/>
+  </view>
+  <view centre="0" zoom="16" followPan="1" followZoom="0" tracking="scroll"  type="pane" centreLineVisible="1" height="335" >
+    <layer id="9" type="timeruler" name="Ruler &lt;4&gt;" model="7" visible="false"/>
+    <layer id="10" type="waveform" name="Waveform &lt;3&gt;" model="7" visible="true"/>
+  </view>
+</display>
+<selections >
+</selections>
+</sv>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/Spectrograms.svt	Mon Jul 25 21:04:31 2011 +0100
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sonic-visualiser>
+<sv>
+<data>
+  <model id="0" name="placeholder" sampleRate="44100" type="wavefile" file=":samples/silent.wav" mainModel="true"/>
+  <playparameters mute="false" pan="0" gain="1" pluginId="" model="0"/>
+  <layer id="1" type="timeruler" name="Ruler" model="0"  colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="2" type="waveform" name="Waveform" model="0"  gain="1" showMeans="1" greyscale="0" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="3" type="spectrogram" name="Spectrogram" model="0"  channel="-1" windowSize="8192" windowHopLevel="4" gain="1" threshold="0" minFrequency="40" maxFrequency="1500" colourScale="0" colourScheme="1" colourRotation="0" frequencyScale="1" binDisplay="0" normalizeColumns="false" normalizeVisibleArea="false"/>
+  <layer id="4" type="timeruler" name="Ruler &lt;2&gt;" model="0"  colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="5" type="spectrogram" name="Spectrogram &lt;2&gt;" model="0"  channel="-1" windowSize="4096" windowHopLevel="5" gain="1" threshold="0" minFrequency="40" maxFrequency="2000" colourScale="0" colourScheme="0" colourRotation="0" frequencyScale="1" binDisplay="2" normalizeColumns="true" normalizeVisibleArea="false"/>
+  <layer id="6" type="spectrogram" name="Spectrogram &lt;3&gt;" model="0"  channel="0" windowSize="1024" windowHopLevel="2" gain="1" threshold="0" minFrequency="10" maxFrequency="0" colourScale="3" colourScheme="0" colourRotation="0" frequencyScale="0" binDisplay="0" normalizeColumns="false" normalizeVisibleArea="false"/>
+</data>
+<display>
+  <window width="1413" height="925"/>
+  <view centre="0" zoom="512" followPan="1" followZoom="1" tracking="page"  type="pane" centreLineVisible="1" height="254" >
+    <layer id="1" type="timeruler" name="Ruler" model="0" visible="true"/>
+    <layer id="2" type="waveform" name="Waveform" model="0" visible="true"/>
+    <layer id="6" type="spectrogram" name="Spectrogram &lt;3&gt;" model="0" visible="true"/>
+  </view>
+  <view centre="0" zoom="512" followPan="1" followZoom="1" tracking="page"  type="pane" centreLineVisible="1" height="255" >
+    <layer id="4" type="timeruler" name="Ruler &lt;2&gt;" model="0" visible="true"/>
+    <layer id="3" type="spectrogram" name="Spectrogram" model="0" visible="true"/>
+  </view>
+  <view centre="0" zoom="512" followPan="1" followZoom="1" tracking="page"  type="pane" centreLineVisible="1" height="254" >
+    <layer id="4" type="timeruler" name="Ruler &lt;2&gt;" model="0" visible="true"/>
+    <layer id="5" type="spectrogram" name="Spectrogram &lt;2&gt;" model="0" visible="true"/>
+  </view>
+</display>
+<selections >
+</selections>
+</sv>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/Waveform and Melodic Range Spectrogram.svt	Mon Jul 25 21:04:31 2011 +0100
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sonic-visualiser>
+<sv>
+<data>
+  <model id="18" name="placeholder" sampleRate="44100" type="wavefile" file=":samples/silent.wav" mainModel="true"/>
+  <playparameters mute="false" pan="0" gain="1" pluginId="" model="18"/>
+  <layer id="19" type="waveform" name="Waveform" model="18"  gain="1" showMeans="1" greyscale="0" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Bright Blue" colour="#1e96ff" darkBackground="true" />
+  <layer id="20" type="timeruler" name="Ruler" model="18"  colourName="Bright Orange" colour="#ffbc50" darkBackground="true" />
+  <layer id="21" type="timeruler" name="Ruler &lt;2&gt;" model="18"  colourName="Bright Orange" colour="#ffbc50" darkBackground="true" />
+  <layer id="22" type="spectrogram" name="Spectrogram" model="18"  channel="-1" windowSize="8192" windowHopLevel="4" gain="1" threshold="0" minFrequency="40" maxFrequency="1500" colourScale="0" colourScheme="1" colourRotation="0" frequencyScale="1" binDisplay="0" normalizeColumns="false" normalizeVisibleArea="false"/>
+</data>
+<display>
+  <window width="1147" height="686"/>
+  <view centre="0" zoom="1024" followPan="1" followZoom="1" tracking="page"  type="pane" centreLineVisible="1" height="197" >
+    <layer id="20" type="timeruler" name="Ruler" model="18" visible="true"/>
+    <layer id="19" type="waveform" name="Waveform" model="18" visible="true"/>
+  </view>
+  <view centre="0" zoom="1024" followPan="1" followZoom="1" tracking="page"  type="pane" centreLineVisible="1" height="333" >
+    <layer id="21" type="timeruler" name="Ruler &lt;2&gt;" model="18" visible="true"/>
+    <layer id="22" type="spectrogram" name="Spectrogram" model="18" visible="true"/>
+  </view>
+</display>
+<selections >
+</selections>
+</sv>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/default.svt	Mon Jul 25 21:04:31 2011 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sonic-visualiser>
+<sv>
+<data>
+  <layer id="1" type="timeruler" name="Ruler" model="0"  colourName="Black" colour="#000000" darkBackground="false" />
+  <layer id="2" type="waveform" name="Waveform" model="0"  gain="1" showMeans="1" greyscale="1" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Black" colour="#000000" darkBackground="false" />
+</data>
+<display>
+  <view centre="0" zoom="1024" followPan="1" followZoom="1" tracking="page"  type="pane" centreLineVisible="1">
+    <layer id="1" type="timeruler" name="Ruler" model="0" visible="true"/>
+    <layer id="2" type="waveform" name="Waveform" model="0" visible="true"/>
+  </view>
+</display>
+</sv>