[alsa-devel] ALSA and SALSA install

Alan Horstmann gineera at aspect135.co.uk
Mon Mar 17 23:43:18 CET 2008

On Friday 07 March 2008 20:31, I wrote:
> On Thursday 06 March 2008 16:46, Clemens Ladisch wrote:
> > Alan Horstmann wrote:
> > > Is there a way to install both at the same time, so on a PC code can be
> > > compiled and experimented with first -lasound and then -lsalsa without
> > > alternately re-installing the libraries with make install?
> >
> > It should be possible to install salsa-lib into another directory (by
> > using the *prefix configure options) and then to change the include
> > and library paths when compiling the program that uses it.
> Thanks, that is the sort of thing I had hoped was possible; will try that
> at the next opportunity.

Just to tidy off this thread, here's what I have done to achieve this.  (I 
know it's not rocket science!)  The problem is actually with the headers, not 
the library, as both libs exist in /usr/lib.

First I manually created the salsa headers seperately in /usr/include/salsa.  
Then in the code put:
	#ifdef SALSA
	#include <salsa/asoundlib.h>
	#include <alsa/asoundlib.h>

Then on the gcc command line  
	... -D SALSA -lsalsa
builds with salsa, or
	... -lasound
with standard Alsa.  Is this all OK?

The salsa standard install prefixes etc seemed to always put the headers under 
a alsa/ subdirectory.  By editing salsa-lib..../src/Makefile.in
	L244    alsaincludedir = $(includedir)/salsa
the headers are put in usr/include/salsa.

I think the option of automatically installing salsa headers as above (ie /
usr/include/salsa/asoundlib.h, etc) would be useful but it doesn't seem that 
the value of 'alsaincludedir' can be set as a configure option.  Might it be 
worth adding it so
	./configure --alsaincludedir=...
is available?


More information about the Alsa-devel mailing list