Code

switch from intltoolize to autopoint ... for a more happy gettext experiance
[rrdtool-all.git] / program / src / rrd_i18n.h
index adeed3795cb2b976ec987f1ac4c91c6df0ac8de2..c7ea78c56e0241b7ed2649f0983a8ff64dfa154b 100644 (file)
@@ -11,19 +11,23 @@ extern    "C" {
 #ifndef _RRD_I18N_H
 #define _RRD_I18N_H
 
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
-   When compiling libc, the _ macro is predefined.  */
-#if defined(HAVE_LIBINTL_H) && defined(BUILD_LIBINTL)
-#  include <libintl.h>
-#define _(String) gettext (String)
+#ifdef ENABLE_NLS
+#  ifdef _LIBC
+#    include <libintl.h>
+#  else
+#    include "gettext.h"
+#    define _(String) gettext (String)
+#  endif
 #else
-#define _(String) (String)
-#endif
-#define N_(String) (String)
+#  define _(String) (String)
 #endif
 
+#define N_(String) String
+
+#endif
 
+#ifdef  __cplusplus
+}
 #endif
 
 #ifdef  __cplusplus