summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-29 17:20:23 +0000
committerDavid Robillard <d@drobilla.net>2007-07-29 17:20:23 +0000
commitadd7dd9f6b1bc17519d7c64282a7f2295735951c (patch)
tree8d11bb0aa787fa563ca18471c795ca90d8429a1d
parentbd6f6beb3137bb637aced8b68873513b4c7dc769 (diff)
downloadlilv-add7dd9f6b1bc17519d7c64282a7f2295735951c.tar.gz
lilv-add7dd9f6b1bc17519d7c64282a7f2295735951c.tar.bz2
lilv-add7dd9f6b1bc17519d7c64282a7f2295735951c.zip
Build system fixes, building from top level doesn't recursively configure slv2, but slv2 is still independently packageable/buildable.
Think I've finally figured out how to do recursive autohell without resorting to suicide... git-svn-id: http://svn.drobilla.net/lad/slv2@650 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--Makefile.am3
-rwxr-xr-xautogen.sh1
-rw-r--r--configure.ac22
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/reference.doxygen.in28
-rw-r--r--src/Makefile.am3
-rw-r--r--src/plugin.c7
7 files changed, 39 insertions, 27 deletions
diff --git a/Makefile.am b/Makefile.am
index 8497095..ecddf2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,3 +19,6 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libslv2.pc
dist-hook: dist-check-doxygen
+
+distclean-local:
+ rm -rf doc
diff --git a/autogen.sh b/autogen.sh
index b85bb15..25cfb35 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,7 @@
#!/bin/sh
echo 'Generating necessary files...'
+rm -rf config
mkdir -p config
libtoolize --force
aclocal
diff --git a/configure.ac b/configure.ac
index 91117ee..56700e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,15 +29,23 @@ AM_INIT_AUTOMAKE
SLV2_SO_VERSION=${SLV2_API_CURRENT}:${SLV2_API_REVISION}:${SLV2_API_AGE}
AC_SUBST(SLV2_SO_VERSION)
+# This is cute... autohell FTW
+builddir=`pwd`
+cd $srcdir
+abs_srcdir=`pwd`
+cd $builddir
+
+SLV2_CFLAGS="-I$abs_srcdir"
+SLV2_LIBS="$abs_srcdir/src/.libs/libslv2.la"
+AC_SUBST(SLV2_CFLAGS)
+AC_SUBST(SLV2_LIBS)
+
+CONFIG_H_PATH="$builddir/config/config.h"
+AC_SUBST(CONFIG_H_PATH)
+AC_DEFINE(CONFIG_H_PATH, ["$CONFIG_H_PATH"], [Absolute location of config.h for this build])
+
# Checks for compiler
AC_PROG_CC
-AM_PROG_CC_C_O
-
-# Check pedantic other stuff autoscan says we should :)
-AC_C_CONST
-AC_C_INLINE
-AC_HEADER_STDBOOL
-AC_TYPE_SIZE_T
# Library building stuff
AC_PROG_LIBTOOL
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 000ab84..6119e2d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,5 +2,5 @@ EXTRA_DIST = mainpage.dox reference.doxygen
all-local: doc
-doc: reference.doxygen $(top_srcdir)/slv2/*.h
+doc: $(srcdir)/reference.doxygen.in reference.doxygen $(srcdir)/../slv2/*.h
doxygen reference.doxygen
diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in
index aad2ffc..584fb89 100644
--- a/doc/reference.doxygen.in
+++ b/doc/reference.doxygen.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER = @PACKAGE_VERSION@
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = @abs_top_srcdir@/doc
+OUTPUT_DIRECTORY = @abs_top_builddir@/doc
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -462,19 +462,19 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = @abs_top_srcdir@/doc/mainpage.dox \
- @abs_top_srcdir@/slv2/lv2.h \
- @abs_top_srcdir@/slv2/types.h \
- @abs_top_srcdir@/slv2/util.h \
- @abs_top_srcdir@/slv2/value.h \
- @abs_top_srcdir@/slv2/values.h \
- @abs_top_srcdir@/slv2/world.h \
- @abs_top_srcdir@/slv2/plugin.h \
- @abs_top_srcdir@/slv2/pluginclass.h \
- @abs_top_srcdir@/slv2/pluginclasses.h \
- @abs_top_srcdir@/slv2/plugininstance.h \
- @abs_top_srcdir@/slv2/plugins.h \
- @abs_top_srcdir@/slv2/port.h
+INPUT = @abs_srcdir@/../doc/mainpage.dox \
+ @abs_srcdir@/../slv2/lv2.h \
+ @abs_srcdir@/../slv2/types.h \
+ @abs_srcdir@/../slv2/util.h \
+ @abs_srcdir@/../slv2/value.h \
+ @abs_srcdir@/../slv2/values.h \
+ @abs_srcdir@/../slv2/world.h \
+ @abs_srcdir@/../slv2/plugin.h \
+ @abs_srcdir@/../slv2/pluginclass.h \
+ @abs_srcdir@/../slv2/pluginclasses.h \
+ @abs_srcdir@/../slv2/plugininstance.h \
+ @abs_srcdir@/../slv2/plugins.h \
+ @abs_srcdir@/../slv2/port.h
# This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
diff --git a/src/Makefile.am b/src/Makefile.am
index 43543b5..a85a1af 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,4 @@
-AM_CFLAGS = -std=c99 -I$(top_srcdir)/include -I$(top_srcdir) @REDLAND_CFLAGS@ -DLIBSLV2_SOURCE
-AM_LDFLAGS = `pkg-config --libs rasqal`
+AM_CFLAGS = -std=c99 @SLV2_CFLAGS@ @REDLAND_CFLAGS@ -DLIBSLV2_SOURCE
lib_LTLIBRARIES = libslv2.la
libslv2_la_LIBADD = @REDLAND_LIBS@
diff --git a/src/plugin.c b/src/plugin.c
index 7802fdd..fa7ebe6 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -611,9 +611,10 @@ slv2_plugin_get_gui_library_uri(SLV2Plugin plugin,
const char*
slv2_gui_type_get_uri(SLV2GUIType type)
{
- // Only one for now...
- assert(type == SLV2_GUI_TYPE_GTK2);
- return "http://ll-plugins.nongnu.org/lv2/ext/gtk2gui";
+ if (type == SLV2_GUI_TYPE_GTK2)
+ return "http://ll-plugins.nongnu.org/lv2/ext/gtk2gui";
+ else
+ return NULL;
}