summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorraphael.kubo.da.costa@intel.com <raphael.kubo.da.costa@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 15:16:06 +0000
committerraphael.kubo.da.costa@intel.com <raphael.kubo.da.costa@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 15:16:06 +0000
commit87ce6799ae3494b3ab59dd2b3dfcfd1f1fc697cc (patch)
tree4fd8b1ecf992462effbacd77305f68106c4903a7 /build
parent3d51f8cd483d788a7c290164d68673a1330ec099 (diff)
downloadchromium_src-87ce6799ae3494b3ab59dd2b3dfcfd1f1fc697cc.zip
chromium_src-87ce6799ae3494b3ab59dd2b3dfcfd1f1fc697cc.tar.gz
chromium_src-87ce6799ae3494b3ab59dd2b3dfcfd1f1fc697cc.tar.bz2
Make the build work with speech-dispatcher >= 0.8.
speech-dispatcher 0.8 has changed the location where the libspeechd.h header file is installed, and users are expected to reference it from the top-level directory, ie. #include <speech-dispatcher/libspeechd.h> Version 0.8 also installs a .pc pkg-config file. Since speech-dispatcher 0.7 is still very widespread, we cannot assume this new structure and .pc file are always available, so resort to adding the "speech-dispatcher/" prefix to the #include based on whether `pkg-config --exists' does not fail. Arguably, we should also start calling `pkg-config --{cflags,libs-only-l,etc}', but not having the .pc file always available would make the changes more complicated. Since everything has worked so far without that, keeping the status quo for now should be fine. BUG= TEST=Build with speech-dispatcher >= 0.8 installed. Review URL: https://chromiumcodereview.appspot.com/14296005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/linux/system.gyp19
1 files changed, 18 insertions, 1 deletions
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index d9e553d..cbd2e59 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -480,6 +480,21 @@
'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
'generator': '../../tools/generate_library_loader/generate_library_loader.py',
+
+ # speech-dispatcher >= 0.8 installs libspeechd.h into
+ # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
+ # puts libspeechd.h in the top-level include directory.
+ # Since we need to support both cases for now, we ship a copy of
+ # libspeechd.h in third_party/speech-dispatcher. If the user
+ # prefers to link against the speech-dispatcher directly, the
+ # `libspeechd_h_prefix' variable can be passed to gyp with a value
+ # such as "speech-dispatcher/" that will be prepended to
+ # "libspeechd.h" in the #include directive.
+ # TODO(phaldan.jr): Once we do not need to support
+ # speech-dispatcher < 0.8 we can get rid of all this (including
+ # third_party/speech-dispatcher) and just include
+ # speech-dispatcher/libspeechd.h unconditionally.
+ 'libspeechd_h_prefix%': '',
},
'action_name': 'generate_libspeechd_loader',
'inputs': [
@@ -494,7 +509,9 @@
'--name', 'LibSpeechdLoader',
'--output-h', '<(output_h)',
'--output-cc', '<(output_cc)',
- '--header', '<libspeechd.h>',
+ '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
+ '--bundled-header',
+ '"third_party/speech-dispatcher/libspeechd.h"',
'--link-directly=<(linux_link_libspeechd)',
'spd_open',
'spd_say',