1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
From: Sebastian Ramacher <sramacher@debian.org>
Date: Mon, 16 Dec 2019 21:39:06 +0100
Subject: Make default plugin path configureable during build
---
jack-dssi-host/jack-dssi-host.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/jack-dssi-host/jack-dssi-host.c b/jack-dssi-host/jack-dssi-host.c
index f32ae69..d00ef16 100644
--- a/jack-dssi-host/jack-dssi-host.c
+++ b/jack-dssi-host/jack-dssi-host.c
@@ -63,6 +63,10 @@
#include "../message_buffer/message_buffer.h"
+#ifndef DEFAULT_DSSI_PATH
+#define DEFAULT_DSSI_PATH "/usr/local/lib/dssi:/usr/lib/dssi"
+#endif
+
#ifdef MIDI_ALSA
static snd_seq_t *alsaClient;
#endif
@@ -499,10 +503,10 @@ load(const char *dllName, void **dll, int quiet) /* returns directory where dll
if (!defaultDssiPath) {
const char *home = getenv("HOME");
if (home) {
- defaultDssiPath = malloc(strlen(home) + 60);
- sprintf(defaultDssiPath, "/usr/local/lib/dssi:/usr/lib/dssi:%s/.dssi", home);
+ defaultDssiPath = malloc(strlen(home) + strlen(DEFAULT_DSSI_PATH) + 8);
+ sprintf(defaultDssiPath, DEFAULT_DSSI_PATH ":%s/.dssi", home);
} else {
- defaultDssiPath = strdup("/usr/local/lib/dssi:/usr/lib/dssi");
+ defaultDssiPath = strdup(DEFAULT_DSSI_PATH);
}
}
dssiPath = defaultDssiPath;
|