Bug 1320621 - Make sure --enable-system-hunspell picks up system headers. r=glandium, a=gchang
authorJan Beich <jbeich@FreeBSD.org>
Mon, 28 Nov 2016 03:54:39 +0000
changeset 352798 42b05ed4b81490ddfde1439c08d6861b791ad687
parent 352797 379652ddad1fc98c9da5c95e4289e3de9459b143
child 352799 16b0b8d30804927c93c70dc7aee279f3a279f593
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, gchang
bugs1320621
milestone52.0a2
Bug 1320621 - Make sure --enable-system-hunspell picks up system headers. r=glandium, a=gchang MozReview-Commit-ID: ALlx4wGuvRH
extensions/spellcheck/hunspell/glue/moz.build
extensions/spellcheck/src/moz.build
--- a/extensions/spellcheck/hunspell/glue/moz.build
+++ b/extensions/spellcheck/hunspell/glue/moz.build
@@ -6,22 +6,24 @@
 
 SOURCES += [
     'mozHunspell.cpp',
     'mozHunspellDirProvider.cpp',
     'RemoteSpellCheckEngineChild.cpp',
     'RemoteSpellCheckEngineParent.cpp',
 ]
 
-CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
-
 FINAL_LIBRARY = 'xul'
 
+if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+    CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
+else:
+    LOCAL_INCLUDES += ['../src']
+
 LOCAL_INCLUDES += [
-    '../src',
     '/dom/base',
     '/extensions/spellcheck/src',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 IPDL_SOURCES = [
     'PRemoteSpellcheckEngine.ipdl',
--- a/extensions/spellcheck/src/moz.build
+++ b/extensions/spellcheck/src/moz.build
@@ -12,19 +12,23 @@ SOURCES += [
     'mozPersonalDictionary.cpp',
     'mozSpellChecker.cpp',
     'mozSpellCheckerFactory.cpp',
     'mozSpellI18NManager.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
+if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+    CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
+else:
+    LOCAL_INCLUDES += ['../hunspell/src']
+
 LOCAL_INCLUDES += [
     '../hunspell/glue',
-    '../hunspell/src',
     '/dom/base',
 ]
 EXPORTS.mozilla += [
      'mozSpellChecker.h',
 ]
 
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']