From f8c3b9839dfee51da1a7bef87bf92bcaf169c0d6 Mon Sep 17 00:00:00 2001
From: Jon Lund Steffensen <jonlst@gmail.com>
Date: Mon, 24 May 2010 18:24:56 +0200
Subject: Don't include gettext headers when NLS is disabled.

---
 src/colorramp.c | 2 --
 src/randr.c     | 8 ++++++--
 src/redshift.c  | 2 +-
 src/vidmode.c   | 8 ++++++--
 4 files changed, 13 insertions(+), 7 deletions(-)

(limited to 'src')

diff --git a/src/colorramp.c b/src/colorramp.c
index 9bc3b94..a154a9e 100644
--- a/src/colorramp.c
+++ b/src/colorramp.c
@@ -17,8 +17,6 @@
    Copyright (c) 2010  Jon Lund Steffensen <jonlst@gmail.com>
 */
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <math.h>
 
diff --git a/src/randr.c b/src/randr.c
index f401190..3ee0f42 100644
--- a/src/randr.c
+++ b/src/randr.c
@@ -21,8 +21,12 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <libintl.h>
-#define _(s) gettext(s)
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(s) gettext(s)
+#else
+# define _(s) s
+#endif
 
 #include <xcb/xcb.h>
 #include <xcb/randr.h>
diff --git a/src/redshift.c b/src/redshift.c
index ad151ce..430c732 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -260,7 +260,7 @@ print_help(const char *program_name)
 	fputs("\n", stdout);
 
 	/* TRANSLATORS: help output 6 */
-	printf("Please report bugs to <%s>\n", PACKAGE_BUGREPORT);
+	printf(_("Please report bugs to <%s>\n"), PACKAGE_BUGREPORT);
 }
 
 static void
diff --git a/src/vidmode.c b/src/vidmode.c
index 10da7d1..12bec8b 100644
--- a/src/vidmode.c
+++ b/src/vidmode.c
@@ -21,8 +21,12 @@
 #include <stdio.h>
 #include <stdint.h>
 
-#include <libintl.h>
-#define _(s) gettext(s)
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(s) gettext(s)
+#else
+# define _(s) s
+#endif
 
 #include <X11/Xlib.h>
 #include <X11/extensions/xf86vmode.h>
-- 
cgit v1.2.3-70-g09d2