[gspell] Include config.h only if HAVE_CONFIG_H



commit ba0039f84bc4ac13b0c30821d0d9dbbf131d95ab
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Apr 14 13:03:58 2017 +0200

    Include config.h only if HAVE_CONFIG_H
    
    This is a good practice when using the Autotools.

 gspell/gspell-checker-dialog.c             |    5 ++++-
 gspell/gspell-checker.c                    |    5 ++++-
 gspell/gspell-context-menu.c               |    5 ++++-
 gspell/gspell-current-word-policy.c        |    5 ++++-
 gspell/gspell-entry-buffer.c               |    5 ++++-
 gspell/gspell-entry-utils.c                |    5 ++++-
 gspell/gspell-entry.c                      |    5 ++++-
 gspell/gspell-enum-types.c.template        |    5 ++++-
 gspell/gspell-init.c                       |    5 ++++-
 gspell/gspell-inline-checker-text-buffer.c |    5 ++++-
 gspell/gspell-language-chooser-button.c    |    5 ++++-
 gspell/gspell-language-chooser-dialog.c    |    5 ++++-
 gspell/gspell-language-chooser.c           |    5 ++++-
 gspell/gspell-language.c                   |    5 ++++-
 gspell/gspell-navigator-text-view.c        |    5 ++++-
 gspell/gspell-navigator.c                  |    5 ++++-
 gspell/gspell-osx.c                        |    5 ++++-
 gspell/gspell-text-buffer.c                |    5 ++++-
 gspell/gspell-text-iter.c                  |    5 ++++-
 gspell/gspell-text-view.c                  |    5 ++++-
 gspell/gspell-utils.c                      |    5 ++++-
 gspell/gspellregion.c                      |    5 ++++-
 22 files changed, 88 insertions(+), 22 deletions(-)
---
diff --git a/gspell/gspell-checker-dialog.c b/gspell/gspell-checker-dialog.c
index 38ef7e6..0fe94cc 100644
--- a/gspell/gspell-checker-dialog.c
+++ b/gspell/gspell-checker-dialog.c
@@ -18,7 +18,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-checker-dialog.h"
 #include <glib/gi18n-lib.h>
 #include "gspell-checker.h"
diff --git a/gspell/gspell-checker.c b/gspell/gspell-checker.c
index eac450b..1f9e2ce 100644
--- a/gspell/gspell-checker.c
+++ b/gspell/gspell-checker.c
@@ -18,7 +18,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-checker.h"
 #include "gspell-checker-private.h"
 #include <enchant.h>
diff --git a/gspell/gspell-context-menu.c b/gspell/gspell-context-menu.c
index 1e4d55f..abf44f8 100644
--- a/gspell/gspell-context-menu.c
+++ b/gspell/gspell-context-menu.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-context-menu.h"
 #include <glib/gi18n-lib.h>
 
diff --git a/gspell/gspell-current-word-policy.c b/gspell/gspell-current-word-policy.c
index 6835cc5..de07d3c 100644
--- a/gspell/gspell-current-word-policy.c
+++ b/gspell/gspell-current-word-policy.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-current-word-policy.h"
 
 /* An object that decides whether to check the current word. When a word is
diff --git a/gspell/gspell-entry-buffer.c b/gspell/gspell-entry-buffer.c
index 9070559..da12005 100644
--- a/gspell/gspell-entry-buffer.c
+++ b/gspell/gspell-entry-buffer.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-entry-buffer.h"
 
 /**
diff --git a/gspell/gspell-entry-utils.c b/gspell/gspell-entry-utils.c
index db78c2f..781a878 100644
--- a/gspell/gspell-entry-utils.c
+++ b/gspell/gspell-entry-utils.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-entry-utils.h"
 #include <string.h>
 #include "gspell-utils.h"
diff --git a/gspell/gspell-entry.c b/gspell/gspell-entry.c
index b61b1c1..fe96d55 100644
--- a/gspell/gspell-entry.c
+++ b/gspell/gspell-entry.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-entry.h"
 #include "gspell-entry-private.h"
 #include "gspell-entry-buffer.h"
diff --git a/gspell/gspell-enum-types.c.template b/gspell/gspell-enum-types.c.template
index 38f0eed..46a69d1 100644
--- a/gspell/gspell-enum-types.c.template
+++ b/gspell/gspell-enum-types.c.template
@@ -1,5 +1,8 @@
 /*** BEGIN file-header ***/
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-enum-types.h"
 
 /*** END file-header ***/
diff --git a/gspell/gspell-init.c b/gspell/gspell-init.c
index 234b5a1..719c940 100644
--- a/gspell/gspell-init.c
+++ b/gspell/gspell-init.c
@@ -23,7 +23,10 @@
  * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-init.h"
 #include <glib/gi18n-lib.h>
 #include "gconstructor.h"
diff --git a/gspell/gspell-inline-checker-text-buffer.c b/gspell/gspell-inline-checker-text-buffer.c
index d24f6dd..6cc16f2 100644
--- a/gspell/gspell-inline-checker-text-buffer.c
+++ b/gspell/gspell-inline-checker-text-buffer.c
@@ -22,7 +22,10 @@
  * Copyright 2002 - Evan Martin
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-inline-checker-text-buffer.h"
 #include <string.h>
 #include <glib/gi18n-lib.h>
diff --git a/gspell/gspell-language-chooser-button.c b/gspell/gspell-language-chooser-button.c
index 04fda3c..c0fb950 100644
--- a/gspell/gspell-language-chooser-button.c
+++ b/gspell/gspell-language-chooser-button.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-language-chooser-button.h"
 #include <glib/gi18n-lib.h>
 #include "gspell-language-chooser.h"
diff --git a/gspell/gspell-language-chooser-dialog.c b/gspell/gspell-language-chooser-dialog.c
index ff07744..26501e2 100644
--- a/gspell/gspell-language-chooser-dialog.c
+++ b/gspell/gspell-language-chooser-dialog.c
@@ -18,7 +18,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-language-chooser-dialog.h"
 #include "gspell-language-chooser.h"
 
diff --git a/gspell/gspell-language-chooser.c b/gspell/gspell-language-chooser.c
index f92f7c7..0ab4b94 100644
--- a/gspell/gspell-language-chooser.c
+++ b/gspell/gspell-language-chooser.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-language-chooser.h"
 
 /**
diff --git a/gspell/gspell-language.c b/gspell/gspell-language.c
index 290eea3..be2ee03 100644
--- a/gspell/gspell-language.c
+++ b/gspell/gspell-language.c
@@ -19,7 +19,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-language.h"
 #include <string.h>
 #include <glib/gi18n-lib.h>
diff --git a/gspell/gspell-navigator-text-view.c b/gspell/gspell-navigator-text-view.c
index bd33b93..f92cbc4 100644
--- a/gspell/gspell-navigator-text-view.c
+++ b/gspell/gspell-navigator-text-view.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-navigator-text-view.h"
 #include <glib/gi18n-lib.h>
 #include "gspell-text-buffer.h"
diff --git a/gspell/gspell-navigator.c b/gspell/gspell-navigator.c
index 6951a11..b1ab229 100644
--- a/gspell/gspell-navigator.c
+++ b/gspell/gspell-navigator.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-navigator.h"
 
 /**
diff --git a/gspell/gspell-osx.c b/gspell/gspell-osx.c
index 87c4168..1ee4896 100644
--- a/gspell/gspell-osx.c
+++ b/gspell/gspell-osx.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-osx.h"
 #include <gtkosxapplication.h>
 #import <Cocoa/Cocoa.h>
diff --git a/gspell/gspell-text-buffer.c b/gspell/gspell-text-buffer.c
index ded8d4e..b357a40 100644
--- a/gspell/gspell-text-buffer.c
+++ b/gspell/gspell-text-buffer.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-text-buffer.h"
 
 /**
diff --git a/gspell/gspell-text-iter.c b/gspell/gspell-text-iter.c
index 99b5a56..3aa0b65 100644
--- a/gspell/gspell-text-iter.c
+++ b/gspell/gspell-text-iter.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-text-iter.h"
 #include "gspell-utils.h"
 
diff --git a/gspell/gspell-text-view.c b/gspell/gspell-text-view.c
index 241b6a6..74fe291 100644
--- a/gspell/gspell-text-view.c
+++ b/gspell/gspell-text-view.c
@@ -17,7 +17,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-text-view.h"
 #include <glib/gi18n-lib.h>
 #include "gspell-inline-checker-text-buffer.h"
diff --git a/gspell/gspell-utils.c b/gspell/gspell-utils.c
index 9807331..af2c5ee 100644
--- a/gspell/gspell-utils.c
+++ b/gspell/gspell-utils.c
@@ -18,7 +18,10 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspell-utils.h"
 #include <string.h>
 #include "gspell-text-iter.h"
diff --git a/gspell/gspellregion.c b/gspell/gspellregion.c
index 0115871..0f64b0d 100644
--- a/gspell/gspellregion.c
+++ b/gspell/gspellregion.c
@@ -22,7 +22,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "gspellregion.h"
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]