$(OBJDIR)/pluginlv2ui.o \
$(OBJDIR)/pluginlv2config.o \
$(OBJDIR)/forkbase.o
+LIBS += `pkg-config --libs lilv-0`
endif
CFLAGS := \
ifneq ($(WANT_LV2),no)
GTK2_INCS := `pkg-config --cflags gtk+-2.0` -Wno-deprecated-declarations
GTK2_LIBS := `pkg-config --libs gtk+-2.0`
+LV2_LIBS := `pkg-config --libs lilv-0` `pkg-config --libs suil-0`
$(OBJDIR)/pluginlv2ui.o: pluginlv2ui.C
$(OBJDIR)/lv2ui.o: lv2ui.C
$(OBJDIR)/lv2ui: $(LV2OBJS)
@echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@
- @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS)
+ @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(LV2_LIBS) $(GTK2_LIBS)
$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo)
$(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
CHECK_HEADERS([libusbx], [libusb headers], [libusb-1.0/libusb.h])])
CHECK_WANT([LV2], [auto], [use lv2], [
+ AC_MSG_CHECKING([for lv2 availability])
+ saved_LIBS="$LIBS"
saved_CFLAGS="$CFLAGS"
+ LIBS=" $(pkg-config --libs lilv-0)"
CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
CHECK_LIB([sord], [sord-0], [sord_world_new])
CHECK_LIB([serd], [serd-0], [serd_reader_new])
CHECK_LIB([sratom], [sratom-0], [sratom_new])
- CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0"
- CHECK_HEADERS([lv2], [lilv headers], [lilv/lilv.h])
+ CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0 `pkg-config --cflags lilv-0`"
+ CHECK_HEADERS([lilv], [lilv headers], [lilv/lilv.h])
+ CFLAGS="-I/usr/include/serd-0 -I/usr/local/include/serd-0 `pkg-config --cflags serd-0`"
+ CHECK_HEADERS([serd], [serd headers], [serd/serd.h])
+ CFLAGS="-I/usr/include/sord-0 -I/usr/local/include/sord-0 `pkg-config --cflags sord-0`"
+ CHECK_HEADERS([sord], [sord headers], [sord/sord.h])
+ CFLAGS="-I/usr/include/sratom-0 -I/usr/local/include/sratom-0 `pkg-config --cflags sratom-0`"
+ CHECK_HEADERS([sratom], [sratom headers], [sratom/sratom.h])
CHECK_LIB([suil], [suil-0], [suil_instance_new])
- CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0"
- CHECK_HEADERS([lv2], [suil headers], [suil/suil.h])
+ CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0 `pkg-config --cflags suil-0`"
+ CHECK_HEADERS([suil], [suil headers], [suil/suil.h])
+ CFG_CFLAGS+=" $(pkg-config --cflags lilv-0) $(pkg-config --cflags suil-0)"
+ LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"])
# have all or none
-test "x$HAVE_lv2" = "xyes" && \
test "x$HAVE_lilv" = "xyes" && \
test "x$HAVE_sord" = "xyes" && \
test "x$HAVE_serd" = "xyes" && \
HAVE_ilmbase=no \
HAVE_OPENEXR=no
+if test "x$WANT_CIN_3RDPARTY" = "xno"; then
+ if test "x$HAVE_LV2" != "xyes" -a "x$WANT_LV2" = "xyes"; then
+ AC_MSG_ERROR([lv2 requested but no lv2 headers found])
+ fi
+fi
+
# build global_config
OBJDIR=`uname -m`
AC_SUBST(OBJDIR)