aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris E Ferron <chris.e.ferron@linux.intel.com>2012-05-29 15:46:26 -0700
committerChris E Ferron <chris.e.ferron@linux.intel.com>2012-05-29 15:46:26 -0700
commit3e1ec9b02c8eb48d690c9f0ca6de5ae6b7a7590c (patch)
tree73a3b78d6e074d021be0d4f31ac84c66c7f0af8b
parentfe6b440bf29ca8a6018c6086ae18aff9e1d35849 (diff)
Add localdir to cppflags to be included in bindtextdomain.
Thanks Patrick Mccarty for his help in locale stuff
-rw-r--r--Makefile.am1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/main.cpp5
3 files changed, 4 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index a4fb12b..23a5128 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,4 +4,3 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = pevent src po
EXTRA_DIST = README TODO Android.mk COPYING autogen.sh
-
diff --git a/src/Makefile.am b/src/Makefile.am
index 3e8294a..61d91be 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,7 +36,7 @@ powertop_SOURCES = parameters/persistent.cpp parameters/learn.cpp parameters/par
powertop_CXXFLAGS = -fno-omit-frame-pointer -fstack-protector -Wall -Wshadow -Wformat -I/usr/include/ $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS)
-powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS)
+powertop_CPPFLAGS = -D_FORTIFY_SOURCE=2 $(NCURSES_CFLAGS) $(PCIUTILS_CFLAGS) $(LIBNL_CFLAGS) $(GLIB2_CFLAGS) $(LIBZ_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
powertop_LDADD = ../pevent/libparseevent.la
diff --git a/src/main.cpp b/src/main.cpp
index 5e3c3b7..43c75af 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -42,6 +42,7 @@
#include "perf/perf.h"
#include "perf/perf_bundle.h"
#include "lib.h"
+#include "../config.h"
#include "devices/device.h"
@@ -349,8 +350,8 @@ int main(int argc, char **argv)
setlocale (LC_ALL, "");
#ifndef DISABLE_I18N
- bindtextdomain ("powertop", "/usr/share/locale");
- textdomain ("powertop");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
#endif
while (1) { /* parse commandline options */