Commit 47c33630 authored by Dominik Brodowski's avatar Dominik Brodowski

cpupower: make NLS truly optional

Loosely based on a patch for cpufrequtils, submittted by
Sergey Dryabzhinsky <sergey.dryabzhinsky@gmail.com> and
signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 63b37de1
...@@ -137,6 +137,7 @@ CFLAGS += -pipe ...@@ -137,6 +137,7 @@ CFLAGS += -pipe
ifeq ($(strip $(NLS)),true) ifeq ($(strip $(NLS)),true)
INSTALL_NLS += install-gmo INSTALL_NLS += install-gmo
COMPILE_NLS += create-gmo COMPILE_NLS += create-gmo
CFLAGS += -DNLS
endif endif
ifeq ($(strip $(CPUFREQ_BENCH)),true) ifeq ($(strip $(CPUFREQ_BENCH)),true)
......
...@@ -16,11 +16,20 @@ ...@@ -16,11 +16,20 @@
#include "helpers/bitmask.h" #include "helpers/bitmask.h"
/* Internationalization ****************************/ /* Internationalization ****************************/
#ifdef NLS
#define _(String) gettext(String) #define _(String) gettext(String)
#ifndef gettext_noop #ifndef gettext_noop
#define gettext_noop(String) String #define gettext_noop(String) String
#endif #endif
#define N_(String) gettext_noop(String) #define N_(String) gettext_noop(String)
#else /* !NLS */
#define _(String) String
#define N_(String) String
#endif
/* Internationalization ****************************/ /* Internationalization ****************************/
extern int run_as_root; extern int run_as_root;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment