1
Fork 0

Make LASH optional and detected by configure script

This commit is contained in:
Nedko Arnaudov 2009-09-22 03:06:07 +03:00
parent 7984afe6b8
commit ab216acec8
5 changed files with 24 additions and 19 deletions

View File

@ -14,11 +14,8 @@ as root to install to the default location.
When you run into problems, make sure you have the dependency libraries
installed. FLTK 2 and JACK with midi support (any recent version) is
required. Also, LASH is currently required to build. However if you want
LASH to actually work, you need the latest release candidate. At the
time I write this it is 0.6.0-rc2. LASH can easily be deactivated
by not defining HAVE_LASH. If you can add this to the autoconf script,
by all means do it and commit the changes.
required. If you want LASH to actually work, you need the latest
release candidate. At the time I write this it is 0.6.0-rc2.
*NOTE that FLTK2's default configuration will not build the shared libs.
Remember to use --enable-shared when building FLTK2.

View File

@ -53,8 +53,16 @@ if test "$fltk2found" == "no"; then
])
fi
PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0);
PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0, HAVE_LASH="yes", HAVE_LASH="no");
if test "$HAVE_LASH" = "yes"
then
AC_DEFINE([HAVE_LASH], 1, [Defined if LASH is present.])
fi
AM_CONDITIONAL(HAVE_LASH, test "$HAVE_LASH" = "yes")
AC_OUTPUT(Makefile src/Makefile doc/Makefile gfx/Makefile)
AC_MSG_RESULT([])
AC_MSG_RESULT([========================])
AC_MSG_RESULT([Prefix : $prefix])
AC_MSG_RESULT([LASH support : $HAVE_LASH])

View File

@ -36,11 +36,10 @@ some additional libs to build this program.
fltk-2.0 graphical user interface
jack-0.109.2 or any recent version of jack with midi support
lash use the latest version if you want to actually use lash
Lash is currently required because autoconf does not define-or-not HAVE_LASH
based on whether lash is available. If you would like to add this to the
configure.ac please do and contribute your changes.
optional dependencies:
lash use the latest version if you want to actually use lash
After installing those, you can build and do a default install by:

View File

@ -1,7 +1,10 @@
AM_CPPFLAGS = -DROOT_DATA_DIR="\"$(datadir)/@PACKAGE@/\"" @LASH_CFLAGS@
AM_CPPFLAGS = -DROOT_DATA_DIR="\"$(datadir)/@PACKAGE@/\""
CFLAGS = -g -O2 -Wall
AM_LDFLAGS = `fltk2-config --ldflags` -ljack -llash
#AM_LDFLAGS = -ljack -llash
AM_LDFLAGS = `fltk2-config --ldflags` -ljack
if HAVE_LASH
AM_CPPFLAGS += @LASH_CFLAGS@
AM_LDFLAGS += @LASH_LIBS@
endif
bin_PROGRAMS = epichord
epichord_SOURCES = main.cpp seq.cpp jack.cpp ui.cpp \

View File

@ -20,6 +20,8 @@
Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
@ -33,8 +35,6 @@
#include <jack/midiport.h>
#include <jack/transport.h>
#define HAVE_LASH
#ifdef HAVE_LASH
#include <lash/lash.h>
lash_client_t* lash_client;
@ -49,8 +49,6 @@ lash_client_t* lash_client;
#define PORT_COUNT 8
//#define HAVE_LASH
extern std::vector<track*> tracks;
jack_client_t* client;