Remove gettext autogenerated/copied files in 'make maintainer-clean'.
MAINTAINERCLEANFILES = \
ChangeLog \
+ INSTALL \
+ ABOUT-NLS \
$(top_srcdir)/Makefile.in \
$(top_srcdir)/aclocal.m4 \
$(top_srcdir)/configure \
$(ac_aux_dir)/config.guess \
$(ac_aux_dir)/config.sub \
$(ac_aux_dir)/ltmain.sh \
- $(ac_aux_dir)/compile
+ $(ac_aux_dir)/compile \
+ $(ac_aux_dir)/config.rpath
changelog:
@if test -d $(srcdir)/.git; then \
# To test that we are really in the top-level directory
TEST_FILE=src/grip.c
+# Where to copy gettext.h
+GETTEXT_INC_DIR=src
+
test -f ${TEST_FILE} || {
echo "Error: You must run this script in the top-level project directory"
exit 1
autoreconf -v --install --force
+# Update gettext files
+if [ -f po/Makevars ]; then
+ rm po/Makevars.template
+fi
+
+# If po/POTFILES.in is not present, po/Makefile won't be generated when running
+# ./configure
+if [ ! -f po/POTFILES.in ]; then
+ touch po/POTFILES.in
+fi
+
+if [ ! -f ${GETTEXT_INC_DIR}/gettext.h ]; then
+ cp /usr/share/gettext/gettext.h ${GETTEXT_INC_DIR}
+fi
+
rm -rf autom4te.cache
AC_CONFIG_SRCDIR(src/main.c)
AM_INIT_AUTOMAKE(check-news -Wall std-options)
AM_SILENT_RULES([yes])
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.18.1])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h:config.h.in)
AC_CHECK_HEADER(curl/curl.h, [], [AC_MSG_ERROR(libcurl headers are missing)])
AC_CHECK_LIB(curl,curl_global_init, [LIBS="$LIBS `curl-config --libs`"], [AC_MSG_ERROR(curl libs are missing)])
-GETTEXT_PACKAGE=grip-2.2
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-ALL_LINGUAS="fr de zh_CN zh_HK zh_TW ja pt_BR ru es ca it be fi bg nl hu pl_PL"
-AM_GLIB_GNU_GETTEXT
-
dnl do cdparanoia check
if test "$enable_cdpar" = "yes"; then
LIBS="$LIBS -lm"
--- /dev/null
+DOMAIN = $(PACKAGE)
+subdir = po
+top_builddir = ..
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+COPYRIGHT_HOLDER = Hugo Villeneuve
+MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT)
+EXTRA_LOCALE_CATEGORIES =
-I$(includedir) \
-DGNOME_ICONDIR=\""$(datadir)/pixmaps"\" \
-DG_LOG_DOMAIN=\"grip\" \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
+ -DLOCALEDIR=\"$(localedir)\" \
-I../intl -I$(top_srcdir)/intl \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
CLEANFILES = *~
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ gettext.h
* USA
*/
+#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
-#include <locale.h>
-#include <libintl.h>
-#define _(STRING) gettext(STRING)
+#include "gettext.h"
+
+#define _(String) gettext(String)
+#define N_(String) gettext_noop(String)
/* Routines from main.c */
void Debug(char *fmt,...);
/* setup locale, i18n */
gtk_set_locale();
- bindtextdomain(GETTEXT_PACKAGE,GNOMELOCALEDIR);
- textdomain(GETTEXT_PACKAGE);
+ bindtextdomain(PACKAGE_TARNAME, LOCALEDIR);
+ textdomain(PACKAGE_TARNAME);
gtk_init(&argc, &argv);
context = poptGetContext(NULL, argc, (const char **) argv, options, 0);
exit(1);
}
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF8");
+ bind_textdomain_codeset(PACKAGE_TARNAME, "UTF8");
setenv("CHARSET","UTF-8",1);
do_debug=verbose;