Browse Source

Checking for libsamplerate in waf, fix ticket #89.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2956 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 16 years ago
parent
commit
f7cb7bb5d9
2 changed files with 19 additions and 7 deletions
  1. +1
    -0
      ChangeLog
  2. +18
    -7
      common/wscript

+ 1
- 0
ChangeLog View File

@@ -26,6 +26,7 @@ Michael Voigt
2008-10-02 Stephane Letz <letz@grame.fr>
* Correct file permission for jack-shm-registry POSIX shared memory segment.
* Checking for libsamplerate in waf, fix ticket #89."

2008-09-22 Stephane Letz <letz@grame.fr>


+ 18
- 7
common/wscript View File

@@ -6,6 +6,16 @@ import os

def configure(conf):
conf.check_tool('misc')
e = conf.create_header_configurator()
e.name = 'samplerate.h'
e.define = 'HAVE_SAMPLERATE'
e.run()
if conf.is_defined('HAVE_SAMPLERATE'):
conf.env['LIB_SAMPLERATE'] = ['samplerate']

conf.env['BUILD_ADAPTER'] = conf.is_defined('HAVE_SAMPLERATE')


# by default waf subst tool uses @VAR@ while scons legacy is ${VAR}
# so we use same template as scons for now
@@ -214,8 +224,9 @@ def build(bld):
'JackNetAdapter.cpp',
]

process = create_jack_process_obj(bld, 'netadapter', net_adapter_sources, serverlib)
process.env.append_value("LINKFLAGS", "-lsamplerate")
if bld.env()['BUILD_ADAPTER'] == True:
process = create_jack_process_obj(bld, 'netadapter', net_adapter_sources, serverlib)
process.uselib = 'SAMPLERATE'

audio_adapter_sources = [
'JackResampler.cpp',
@@ -225,16 +236,16 @@ def build(bld):
'JackAudioAdapterFactory.cpp',
]

if bld.env()['IS_MACOSX']:
if bld.env()['BUILD_ADAPTER'] and bld.env()['IS_MACOSX']:
audio_adapter_sources += ['../macosx/coreaudio/JackCoreAudioAdapter.cpp']
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.env.append_value("LINKFLAGS", "../macosx/libportaudio.a -framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreServices")
process.env.append_value("LINKFLAGS", "-lsamplerate")
process.env.append_value("LINKFLAGS", "-framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreServices")
process.uselib = 'SAMPLERATE'

if bld.env()['IS_LINUX']:
if bld.env()['BUILD_ADAPTER'] and bld.env()['IS_LINUX']:
audio_adapter_sources += ['../linux/alsa/JackAlsaAdapter.cpp']
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.env.append_value("LINKFLAGS", "-lasound -lsamplerate")
process.uselib = ['ALSA', 'SAMPLERATE']

#audio_adapter_sources += ['../windows/JackPortAudioAdapter.cpp']
#process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)


Loading…
Cancel
Save