diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2010-01-15 22:20:56 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2010-01-15 22:20:56 -0800 |
commit | 36659aa666808e5b42f5d98bce8f84bf82e88c0e (patch) | |
tree | 77f5b2310b0fac843c588ff549bfc5f6d7669064 /xload.c | |
parent | 6d96dd3d2df7d896a41d770ba380629948ead4d6 (diff) |
Integrate gettext support with autotools build system
Mostly cribbed from prior work for libXpm
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'xload.c')
-rw-r--r-- | xload.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -57,6 +57,10 @@ from the X Consortium. * xload - display system load average in a window */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <errno.h> #include <stdio.h> #include <stdlib.h> @@ -73,8 +77,12 @@ from the X Consortium. #include <X11/Xmu/SysUtil.h> #include "xload.h" -#include <libintl.h> -#include <X11/Xlocale.h> +#ifdef USE_GETTEXT +# include <X11/Xlocale.h> +# include <libintl.h> +#else +# define gettext(a) (a) +#endif #include "xload.bit" @@ -202,7 +210,7 @@ main(int argc, char **argv) textdomain("xload"); if ((domaindir = getenv ( "TEXTDOMAINDIR" )) == NULL) { - domaindir = "/usr/share/locale"; /*XLOCALEDIR;*/ + domaindir = LOCALEDIR; } bindtextdomain("xload", domaindir); |