cpupower: make NLS truly optional
authorDominik Brodowski <linux@dominikbrodowski.net>
Fri, 19 Aug 2011 15:00:02 +0000 (17:00 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Fri, 19 Aug 2011 15:00:02 +0000 (17:00 +0200)
Loosely based on a patch for cpufrequtils, submittted by
Sergey Dryabzhinsky <sergey.dryabzhinsky@gmail.com> and

signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
tools/power/cpupower/Makefile
tools/power/cpupower/utils/helpers/helpers.h

index edb021c5f8cda3ad00f4770a3ed5bd5331ca5476..e8a03aceceb11fe88b5552a0952431866213ee42 100644 (file)
@@ -137,6 +137,7 @@ CFLAGS +=   -pipe
 ifeq ($(strip $(NLS)),true)
        INSTALL_NLS += install-gmo
        COMPILE_NLS += create-gmo
+       CFLAGS += -DNLS
 endif
 
 ifeq ($(strip $(CPUFREQ_BENCH)),true)
index 7a83022733b2e49b2162f0eb14187756f4305ee6..2747e738efb04d3fa1a53e7686162240cfc7a7ec 100644 (file)
 #include "helpers/bitmask.h"
 
 /* Internationalization ****************************/
+#ifdef NLS
+
 #define _(String) gettext(String)
 #ifndef gettext_noop
 #define gettext_noop(String) String
 #endif
 #define N_(String) gettext_noop(String)
+
+#else /* !NLS */
+
+#define _(String) String
+#define N_(String) String
+
+#endif
 /* Internationalization ****************************/
 
 extern int run_as_root;