Commit 09231eae authored by Jan Alexander Steffens's avatar Jan Alexander Steffens Committed by Arun Raghavan

meson: Fix build of padsp

 - Rename "pulsedspdir" to the same "padsplibdir" that Autotools uses.

 - Add a new option "pulsedsp-location" that is only used for padsp.in,
   just like Autotools' --with-pulsedsp-location.

 - Use 'set' instead of 'set_quoted' to avoid PULSEDSP_LOCATION getting
   quoted twice.
parent 9e70d052
...@@ -50,7 +50,7 @@ datadir = join_paths(prefix, get_option('datadir')) ...@@ -50,7 +50,7 @@ datadir = join_paths(prefix, get_option('datadir'))
localedir = join_paths(prefix, get_option('localedir')) localedir = join_paths(prefix, get_option('localedir'))
localstatedir = join_paths(prefix, get_option('localstatedir')) localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir')) sysconfdir = join_paths(prefix, get_option('sysconfdir'))
privlibdir = join_paths(get_option('libdir'), 'pulseaudio') privlibdir = join_paths(libdir, 'pulseaudio')
alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer') alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer')
pkgconfigdir = join_paths(libdir, 'pkgconfig') pkgconfigdir = join_paths(libdir, 'pkgconfig')
...@@ -62,9 +62,14 @@ if modlibexecdir == '' ...@@ -62,9 +62,14 @@ if modlibexecdir == ''
modlibexecdir = join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules') modlibexecdir = join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules')
endif endif
pulsedspdir = get_option('pulsedspdir') padsplibdir = get_option('padsplibdir')
if pulsedspdir == '' if padsplibdir == ''
pulsedspdir = join_paths(libdir, 'pulseaudio') padsplibdir = privlibdir
endif
pulsedsp_location = get_option('pulsedsp-location')
if pulsedsp_location == ''
pulsedsp_location = join_paths(prefix, padsplibdir)
endif endif
systemduserunitdir = get_option('systemduserunitdir') systemduserunitdir = get_option('systemduserunitdir')
...@@ -419,7 +424,7 @@ endif ...@@ -419,7 +424,7 @@ endif
if cc.has_header('sys/soundcard.h') if cc.has_header('sys/soundcard.h')
cdata.set('HAVE_OSS_OUTPUT', 1) cdata.set('HAVE_OSS_OUTPUT', 1)
cdata.set('HAVE_OSS_WRAPPER', 1) cdata.set('HAVE_OSS_WRAPPER', 1)
cdata.set_quoted('PULSEDSP_LOCATION', pulsedspdir) cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
endif endif
if get_option('hal-compat') if get_option('hal-compat')
......
...@@ -30,9 +30,15 @@ option('running-from-build-tree', ...@@ -30,9 +30,15 @@ option('running-from-build-tree',
# Paths # Paths
option('pulsedspdir', option('padsplibdir',
type : 'string', type : 'string',
description : 'Specify location where OSS wrapper will be installed') description : 'Specify location where OSS wrapper library will be installed')
# This one gets inserted into a shell double-quoted string, so needs to be escaped (\$LIB). Meson
# removes a layer of escapes when parsing the description string, so we need to double the
# backslashes for "meson configure" to display the right text.
option('pulsedsp-location',
type : 'string',
description : 'Specify location where OSS wrapper library will be loaded from; can use \\$LIB')
option('modlibexecdir', option('modlibexecdir',
type : 'string', type : 'string',
description : 'Specify location where modules will be installed') description : 'Specify location where modules will be installed')
......
...@@ -85,7 +85,7 @@ if cc.has_header('sys/soundcard.h') ...@@ -85,7 +85,7 @@ if cc.has_header('sys/soundcard.h')
libpulsedsp = shared_library('pulsedsp', libpulsedsp = shared_library('pulsedsp',
libpulsecommon_sources, libpulsecommon_sources,
install: true, install: true,
install_dir : pulsedspdir, install_dir : padsplibdir,
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse], link_with : [libpulsecommon, libpulse],
link_args : ['-ldl'], link_args : ['-ldl'],
......
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