From: pabs Date: Thu, 27 Dec 2007 04:50:43 +0000 (+0000) Subject: Only build in gettext support when gettext is available. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9bb17dbd43d0988caab3a1fa420aa52a32e4fdc5;p=synfig.git Only build in gettext support when gettext is available. git-svn-id: http://svn.voria.com/code@1233 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/general.h b/synfig-core/trunk/src/synfig/general.h index 86d1172..639eb51 100644 --- a/synfig-core/trunk/src/synfig/general.h +++ b/synfig-core/trunk/src/synfig/general.h @@ -30,14 +30,22 @@ #include #include "string.h" #include "version.h" -#include -#include +#ifdef ENABLE_NLS + #include + #include +#endif /* === M A C R O S ========================================================= */ +#ifdef ENABLE_NLS #define _(x) dgettext("synfig",x) #define gettext_noop(x) x #define N_(x) gettext_noop(x) +#else +#define dgettext(a,x) (x) +#define _(x) (x) +#define N_(x) (x) +#endif #define SYNFIG_COPYRIGHT "Copyright (c) 2001-2005 Robert B. Quattlebaum Jr., Adrian Bentley" diff --git a/synfig-core/trunk/src/synfig/main.cpp b/synfig-core/trunk/src/synfig/main.cpp index 4de4e72..fa2018e 100644 --- a/synfig-core/trunk/src/synfig/main.cpp +++ b/synfig-core/trunk/src/synfig/main.cpp @@ -213,7 +213,9 @@ synfig::Main::Main(const synfig::String& basepath,ProgressCallback *cb): // Add initialization after this point +#ifdef ENABLE_NLS bindtextdomain("synfig", LOCALEDIR); +#endif String prefix=basepath+"/.."; unsigned int i; diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index 66efb3c..04bf905 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -58,8 +58,13 @@ using namespace synfig; /* === M A C R O S ========================================================= */ +#ifdef ENABLE_NLS #undef _ #define _(x) gettext(x) +#else +#undef _ +#define _(x) (x) +#endif enum exit_code { @@ -840,9 +845,11 @@ int main(int argc, char *argv[]) arg_list_t arg_list; job_list_t job_list; +#ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain("synfig", LOCALEDIR); textdomain("synfig"); +#endif progname=argv[0]; Progress p(argv[0]);