hacked around LADSPA_PATH as suggested to wingo
authorThomas Vander Stichele <thomas@apestaart.org>
Tue, 4 Jun 2002 19:32:16 +0000 (19:32 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Tue, 4 Jun 2002 19:32:16 +0000 (19:32 +0000)
Original commit message from CVS:
hacked around LADSPA_PATH as suggested to wingo

ext/ladspa/load.c
ext/ladspa/search.c

index 148f98fbfaf02c6dc6358a03ba4869d79e23b804..c912106fa92f2874ece96c01b80107c4c0cbf949 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <glib.h>
 
 /*****************************************************************************/
 
@@ -53,7 +54,12 @@ dlopenLADSPA(const char * pcFilename, int iFlag) {
        LD_LIBRARY_PATH, whereas the LADSPA_PATH is the correct place
        to search. */
 
-    pcLADSPAPath = getenv("LADSPA_PATH");
+    /* thomasvs: I'm sorry, but I'm going to add glib stuff here.
+     * I'm appending logical values for LADSPA_PATH here
+     */
+
+    pcLADSPAPath = g_strdup_printf ("%s:/usr/lib/ladspa:/usr/local/lib/ladspa",
+       getenv("LADSPA_PATH"));
     
     if (pcLADSPAPath) {
 
index 67c42361a87d6bdf076cdf3b9191732bcfa098b0..aac4381b604c29dcfe775a854a9a1bf75bafa713 100644 (file)
@@ -12,6 +12,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <glib.h>
 
 /*****************************************************************************/
 
@@ -96,7 +97,13 @@ LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) {
   const char * pcLADSPAPath;
   const char * pcStart;
 
-  pcLADSPAPath = getenv("LADSPA_PATH");
+  /* thomasvs: I'm sorry, but I'm going to add glib stuff here.
+  * I'm appending logical values for LADSPA_PATH here
+  */
+
+  pcLADSPAPath = g_strdup_printf ("%s:/usr/lib/ladspa:/usr/local/lib/ladspa",
+                 getenv("LADSPA_PATH"));
+
   if (!pcLADSPAPath) {
 /*    fprintf(stderr, */
 /*         "Warning: You do not have a LADSPA_PATH " */