aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core.lv2/ChangeLog6
-rw-r--r--core.lv2/lv2config.c9
-rw-r--r--core.lv2/wscript9
3 files changed, 23 insertions, 1 deletions
diff --git a/core.lv2/ChangeLog b/core.lv2/ChangeLog
index 9e04e76..7dabd70 100644
--- a/core.lv2/ChangeLog
+++ b/core.lv2/ChangeLog
@@ -1,3 +1,9 @@
+lv2core (UNRELEASED) unstable; urgency=low
+
+ * Build lv2config on systems without wordexp (e.g. Windows)
+
+ -- David Robillard <d@drobilla.net> UNRELEASED
+
lv2core (4.0) unstable; urgency=medium
* Make doap:license suggested, but not required (for wrappers)
diff --git a/core.lv2/lv2config.c b/core.lv2/lv2config.c
index 8764f23..51e0df5 100644
--- a/core.lv2/lv2config.c
+++ b/core.lv2/lv2config.c
@@ -34,12 +34,15 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <wordexp.h>
#include "serd-0.1.0.h"
#include "lv2-config.h"
+#ifdef HAVE_WORDEXP
+#include <wordexp.h>
+#endif
+
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_LV2 "http://lv2plug.in/ns/lv2core#"
@@ -168,6 +171,7 @@ discover_manifest(World* world, const char* uri)
static char*
expand(const char* path)
{
+#ifdef HAVE_WORDEXP
char* ret = NULL;
wordexp_t p;
@@ -184,6 +188,9 @@ expand(const char* path)
}
wordfree(&p);
+#else
+ char* ret = strdup(path);
+#endif
return ret;
}
diff --git a/core.lv2/wscript b/core.lv2/wscript
index 2680664..95a518c 100644
--- a/core.lv2/wscript
+++ b/core.lv2/wscript
@@ -57,8 +57,17 @@ def configure(conf):
autowaf.define(conf, 'LV2CORE_DEFAULT_LV2_PATH', Options.options.default_lv2_path)
+ conf.check(function_name='wordexp',
+ header_name='wordexp.h',
+ define_name='HAVE_WORDEXP',
+ mandatory=False)
+
conf.write_config_header('lv2-config.h', remove=False)
+ autowaf.display_msg(conf, "Path expansion via wordexp",
+ conf.is_defined('HAVE_WORDEXP'))
+ print('')
+
def build(bld):
# Header "library"
obj = bld(export_includes = ['.'],