Index: build/linux/system.gyp |
diff --git a/build/linux/system.gyp b/build/linux/system.gyp |
index d9e553d7ddea8935317a9234238560295414765c..1f34fbdd860f4f4833a5e493d5f81979cf072a59 100644 |
--- a/build/linux/system.gyp |
+++ b/build/linux/system.gyp |
@@ -480,6 +480,15 @@ |
'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 ships a .pc file and installs |
+ # libspeechd.h into speech-dispatcher/libspeechd.h, whereas |
+ # speech-dispatcher < 0.7 does not install a .pc file and puts |
+ # libspeechd.h in the top-level include directory. |
+ # Take both cases into account by assuming that if the .pc file |
+ # exists we have speech-dispatcher >= 0.8 and the header is in |
+ # speech-dispatcher/. |
+ 'header_prefix': '<!(<(pkg-config) --exists speech-dispatcher && echo "speech-dispatcher/" || echo)', |
Paweł Hajdan Jr.
2013/04/16 19:23:42
I'm not really happy about this. Auto-detection fo
|
}, |
'action_name': 'generate_libspeechd_loader', |
'inputs': [ |
@@ -494,7 +503,7 @@ |
'--name', 'LibSpeechdLoader', |
'--output-h', '<(output_h)', |
'--output-cc', '<(output_cc)', |
- '--header', '<libspeechd.h>', |
+ '--header', '<<(header_prefix)libspeechd.h>', |
'--link-directly=<(linux_link_libspeechd)', |
'spd_open', |
'spd_say', |