Commit aa550292 authored by Arnaud Rebillout's avatar Arnaud Rebillout Committed by Arun Raghavan
Browse files

meson: Add ORC support


Signed-off-by: default avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
parent 06e37b30
......@@ -342,6 +342,19 @@ if gtk_dep.found()
cdata.set('HAVE_GTK', 1)
endif
have_orcc = false
orcc_args = []
orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
orcc = find_program('orcc', required : get_option('orc'))
if orc_dep.found() and orcc.found()
have_orcc = true
orcc_args = [orcc]
#orcc_args = [orcc, '--include', 'glib.h']
cdata.set('HAVE_ORC', 1)
else
cdata.set('DISABLE_ORC', 1)
endif
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
if samplerate_dep.found()
cdata.set('HAVE_LIBSAMPLERATE', 1)
......@@ -374,9 +387,6 @@ if x11_dep.found()
cdata.set('HAVE_X11', 1)
endif
# FIXME: support ORC
cdata.set('DISABLE_ORC', 1)
# Module dependencies
if cc.has_header('sys/soundcard.h')
......@@ -590,7 +600,7 @@ summary = [
'Enable IPv6: @0@'.format(get_option('ipv6')),
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
'Enable FFTW: @0@'.format(fftw_dep.found()),
# 'Enable orc: @0@'.format(${ENABLE_ORC}),
'Enable ORC: @0@'.format(have_orcc),
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
......
......@@ -93,6 +93,9 @@ option('lirc',
option('openssl',
type : 'feature', value : 'auto',
description : 'Optional OpenSSL support (used for Airtunes/RAOP)')
option('orc',
type : 'feature', value : 'auto',
description : 'Optimized Inner Loop Runtime Compiler')
option('samplerate',
type : 'feature', value : 'disabled',
description : 'Optional libsamplerate support (DEPRECATED)')
......
......@@ -206,6 +206,7 @@ module_echo_cancel_sources = [
'echo-cancel/module-echo-cancel.c',
'echo-cancel/null.c',
]
module_echo_cancel_orc_sources = []
module_echo_cancel_flags = []
module_echo_cancel_deps = []
module_echo_cancel_libs = []
......@@ -216,15 +217,25 @@ if get_option('adrian-aec')
'echo-cancel/adrian-aec.c', 'echo-cancel/adrian-aec.h',
]
module_echo_cancel_flags += ['-DHAVE_ADRIAN_EC=1']
module_echo_cancel_deps = [libm_dep]
endif
module_echo_cancel_deps += [libm_dep]
if have_orcc
orcsrc = 'adrian-aec'
orc_h = custom_target(orcsrc + '-orc-gen.h',
input : join_paths('echo-cancel', orcsrc + '.orc'),
output : orcsrc + '-orc-gen.h',
command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
)
orc_c = custom_target(orcsrc + '-orc-gen.c',
input : join_paths('echo-cancel', orcsrc + '.orc'),
output : orcsrc + '-orc-gen.c',
command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']
)
module_echo_cancel_orc_sources += [orc_c, orc_h]
module_echo_cancel_deps += [orc_dep]
endif
# FIXME: support ORC (depends on Adrian)
#ORC_SOURCE += modules/echo-cancel/adrian-aec
#module_echo_cancel_sources += [
# 'echo-cancel/adrian-aec-orc-gen.c', 'echo-cancel/adrian-aec-orc-gen.h'
#]
#module_echo_cancel_deps += [orc_dep]
endif
if speex_dep.found()
module_echo_cancel_sources += ['echo-cancel/speex.c']
......@@ -238,7 +249,7 @@ endif
all_modules += [
[ 'module-echo-cancel',
module_echo_cancel_sources,
module_echo_cancel_sources + module_echo_cancel_orc_sources,
[],
module_echo_cancel_flags,
module_echo_cancel_deps,
......
......@@ -145,6 +145,24 @@ if x11_dep.found()
libpulsecore_headers += ['x11wrap.h']
endif
orc_sources = []
orc_headers = []
if have_orcc
orcsrc = 'svolume'
orc_h = custom_target(orcsrc + '-ocr-gen.h',
input : orcsrc + '.orc',
output : orcsrc + '-orc-gen.h',
command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
)
orc_c = custom_target(orcsrc + '-orc-gen.c',
input : orcsrc + '.orc',
output : orcsrc + '-orc-gen.c',
command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']
)
orc_sources = [orc_c, 'svolume_orc.c']
orc_headers = [orc_h]
endif
# FIXME: walk through dependencies and add files
# FIXME: SIMD support (ORC)
......@@ -167,14 +185,14 @@ cdata.merge_from(libpulsecore_simd[1])
#'thread-win32.c',
libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
libpulsecore_sources,
libpulsecore_headers,
libpulsecore_sources, libpulsecore_headers,
orc_sources, orc_headers,
include_directories : [configinc, topinc],
c_args : [pa_c_args, server_c_args],
install : true,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
implicit_include_directories : false)
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
......
......@@ -139,6 +139,7 @@ echo_cancel_test_sources = []
foreach s : module_echo_cancel_sources
echo_cancel_test_sources += '../modules/' + s
endforeach
echo_cancel_test_sources += module_echo_cancel_orc_sources
norun_tests += [
[ 'echo-cancel-test', echo_cancel_test_sources,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment