4 # This script runs an installed version of Ardour. It sets a few environment variables
5 # and does a few checks before exec'ing the real executable.
8 export GTK_PATH=@CONFDIR@:@LIBDIR@${GTK_PATH:+:$GTK_PATH}
10 export LD_LIBRARY_PATH=@LIBDIR@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
14 MLOCK_LIMIT=$(ulimit -l)
15 if [ "$MLOCK_LIMIT" != "unlimited" ]; then
16 echo "WARNING: Your system has a limit for maximum amount of locked memory!"
17 echo " This might cause Ardour to run out of memory before your system runs"
18 echo " out of memory. You can view the memory limit with 'ulimit -l', and it"
19 echo " is normally controlled by /etc/security/limits.conf"
26 GLIB=$(ldd @LIBDIR@/ardour-@VERSION@ 2> /dev/null | grep glib-2.0 | sed 's/.*=> \([^ ]*\) .*/\1/')
28 if [ "$GLIB" = "" ]; then
29 echo "WARNING: Could not check your glib-2.0 for mutex locking atomic operations."
31 elif [ $(nm -D --radix=dec --defined-only -S $GLIB | grep -w g_atomic_int_add | cut -d ' ' -f 2) -gt 32 ]; then
32 echo "WARNING: Your system contains a suspect libglib-2.0. Your version might be built"
33 echo " to use mutex locking atomic operations. This is a fallback solution to"
34 echo " a more robust hardware supported atomicity. It might cause reduced "
35 echo " performance and/or deadlocks. Please contact your distribution support"
36 echo " about this issue."
37 echo " Unfortunately this check is not 100% accurate, so this might not be"
38 echo " the case with your system."
43 # Running Ardour requires these 3 variables to be set
46 export ARDOUR_DATA_PATH=@DATADIR@
47 export ARDOUR_CONFIG_PATH=@CONFDIR@
48 export ARDOUR_DLL_PATH=@LIBDIR@
51 # NSM needs a path to this script
54 export ARDOUR_SELF="$0"
57 # VAMP has its own lookup path
60 export VAMP_PATH=@LIBDIR@/vamp
62 if [ $# -gt 0 ] ; then
64 -g|--gdb) GDB=gdb; shift ;;
68 exec $GDB @LIBDIR@/ardour-@VERSION@ "$@"