Example package demonstrating the use of gettext.

This commit is contained in:
Bruno Haible
2003-11-16 15:17:16 +00:00
parent d73a2fcfa6
commit f31d09ff2a
286 changed files with 15029 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
2003-11-15 Bruno Haible <bruno@clisp.org>
* Makefile.am: New file.
* README: New file.
* installpaths.in: New file.
* hello-c: New subdirectory.
* hello-c-gnome: New subdirectory.
* hello-c++: New subdirectory.
* hello-c++-qt: New subdirectory.
* hello-c++-kde: New subdirectory.
* hello-c++-gnome: New subdirectory.
* hello-objc: New subdirectory.
* hello-objc-gnustep: New subdirectory.
* hello-objc-gnome: New subdirectory.
* hello-sh: New subdirectory.
* hello-python: New subdirectory.
* hello-clisp: New subdirectory.
* hello-librep: New subdirectory.
* hello-smalltalk: New subdirectory.
* hello-java: New subdirectory.
* hello-java-awt: New subdirectory.
* hello-java-swing: New subdirectory.
* hello-gawk: New subdirectory.
* hello-pascal: New subdirectory.
* hello-ycp: New subdirectory.
* hello-tcl: New subdirectory.
* hello-tcl-tk: New subdirectory.
* hello-perl: New subdirectory.
* hello-php: New subdirectory.
+366
View File
@@ -0,0 +1,366 @@
## Makefile for the gettext-tools/examples subdirectory of GNU gettext
## Copyright (C) 2001-2003 Free Software Foundation, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = 1.2 gnits
SUBDIRS = po
EXTRA_DIST =
docdir = @docdir@
examplesdir = $(docdir)/examples
examples_DATA = installpaths
EXAMPLESFILES = \
\
hello-c/INSTALL \
hello-c/autogen.sh \
hello-c/autoclean.sh \
hello-c/hello.c \
hello-c/Makefile.am \
hello-c/configure.ac \
hello-c/m4/Makefile.am \
hello-c/po/Makevars \
hello-c/po/POTFILES.in \
hello-c/po/LINGUAS \
hello-c/po/de.po \
\
hello-c-gnome/INSTALL \
hello-c-gnome/autogen.sh \
hello-c-gnome/autoclean.sh \
hello-c-gnome/hello.c \
hello-c-gnome/Makefile.am \
hello-c-gnome/configure.ac \
hello-c-gnome/m4/Makefile.am \
hello-c-gnome/m4/gnome.m4 \
hello-c-gnome/m4/gnome-gnorba-check.m4 \
hello-c-gnome/m4/gnome-orbit-check.m4 \
hello-c-gnome/po/Makevars \
hello-c-gnome/po/POTFILES.in \
hello-c-gnome/po/LINGUAS \
hello-c-gnome/po/de.po \
\
hello-c++/INSTALL \
hello-c++/autogen.sh \
hello-c++/autoclean.sh \
hello-c++/hello.cc \
hello-c++/Makefile.am \
hello-c++/configure.ac \
hello-c++/m4/Makefile.am \
hello-c++/po/Makevars \
hello-c++/po/POTFILES.in \
hello-c++/po/LINGUAS \
hello-c++/po/de.po \
\
hello-c++-qt/INSTALL \
hello-c++-qt/autogen.sh \
hello-c++-qt/autoclean.sh \
hello-c++-qt/hello.cc \
hello-c++-qt/Makefile.am \
hello-c++-qt/configure.ac \
hello-c++-qt/m4/Makefile.am \
hello-c++-qt/m4/qt.m4 \
hello-c++-qt/po/Makefile.am \
hello-c++-qt/po/LINGUAS \
hello-c++-qt/po/de.po \
\
hello-c++-kde/INSTALL \
hello-c++-kde/autogen.sh \
hello-c++-kde/autoclean.sh \
hello-c++-kde/hello.cc \
hello-c++-kde/hellowindow.h \
hello-c++-kde/hellowindow.cc \
hello-c++-kde/Makefile.am \
hello-c++-kde/configure.in.in \
hello-c++-kde/m4/Makefile.am \
hello-c++-kde/po/Makevars \
hello-c++-kde/po/POTFILES.in \
hello-c++-kde/po/LINGUAS \
hello-c++-kde/po/de.po \
\
hello-c++-gnome/INSTALL \
hello-c++-gnome/autogen.sh \
hello-c++-gnome/autoclean.sh \
hello-c++-gnome/hello.cc \
hello-c++-gnome/Makefile.am \
hello-c++-gnome/configure.ac \
hello-c++-gnome/m4/Makefile.am \
hello-c++-gnome/m4/gnome.m4 \
hello-c++-gnome/m4/gnome-gnorba-check.m4 \
hello-c++-gnome/m4/gnome-orbit-check.m4 \
hello-c++-gnome/m4/gtk.m4 \
hello-c++-gnome/m4/gtk--.m4 \
hello-c++-gnome/po/Makevars \
hello-c++-gnome/po/POTFILES.in \
hello-c++-gnome/po/LINGUAS \
hello-c++-gnome/po/de.po \
\
hello-objc/INSTALL \
hello-objc/autogen.sh \
hello-objc/autoclean.sh \
hello-objc/hello.m \
hello-objc/Makefile.am \
hello-objc/configure.ac \
hello-objc/m4/Makefile.am \
hello-objc/po/Makevars \
hello-objc/po/POTFILES.in \
hello-objc/po/LINGUAS \
hello-objc/po/de.po \
\
hello-objc-gnustep/INSTALL \
hello-objc-gnustep/autogen.sh \
hello-objc-gnustep/autoclean.sh \
hello-objc-gnustep/main.m \
hello-objc-gnustep/AppController.h \
hello-objc-gnustep/AppController.m \
hello-objc-gnustep/Hello.h \
hello-objc-gnustep/Hello.m \
hello-objc-gnustep/GNUmakefile \
hello-objc-gnustep/po/GNUmakefile \
hello-objc-gnustep/po/LocaleAliases \
hello-objc-gnustep/po/LINGUAS \
hello-objc-gnustep/po/de.po \
\
hello-objc-gnome/INSTALL \
hello-objc-gnome/autogen.sh \
hello-objc-gnome/autoclean.sh \
hello-objc-gnome/hello.m \
hello-objc-gnome/Makefile.am \
hello-objc-gnome/configure.ac \
hello-objc-gnome/m4/Makefile.am \
hello-objc-gnome/m4/gnome.m4 \
hello-objc-gnome/m4/gnome-gnorba-check.m4 \
hello-objc-gnome/m4/gnome-orbit-check.m4 \
hello-objc-gnome/po/Makevars \
hello-objc-gnome/po/POTFILES.in \
hello-objc-gnome/po/LINGUAS \
hello-objc-gnome/po/de.po \
\
hello-sh/INSTALL \
hello-sh/autogen.sh \
hello-sh/autoclean.sh \
hello-sh/hello.sh \
hello-sh/Makefile.am \
hello-sh/configure.ac \
hello-sh/m4/Makefile.am \
hello-sh/po/Makefile.am \
hello-sh/po/LINGUAS \
hello-sh/po/de.po \
\
hello-python/INSTALL \
hello-python/autogen.sh \
hello-python/autoclean.sh \
hello-python/hello.py.in \
hello-python/Makefile.am \
hello-python/configure.ac \
hello-python/m4/Makefile.am \
hello-python/po/Makefile.am \
hello-python/po/LINGUAS \
hello-python/po/de.po \
\
hello-clisp/INSTALL \
hello-clisp/autogen.sh \
hello-clisp/autoclean.sh \
hello-clisp/hello.lisp.in \
hello-clisp/Makefile.am \
hello-clisp/configure.ac \
hello-clisp/m4/Makefile.am \
hello-clisp/po/Makefile.am \
hello-clisp/po/LINGUAS \
hello-clisp/po/de.po \
\
hello-librep/INSTALL \
hello-librep/autogen.sh \
hello-librep/autoclean.sh \
hello-librep/hello.jl.in \
hello-librep/Makefile.am \
hello-librep/configure.ac \
hello-librep/m4/Makefile.am \
hello-librep/po/Makefile.am \
hello-librep/po/LINGUAS \
hello-librep/po/de.po \
\
hello-smalltalk/INSTALL \
hello-smalltalk/autogen.sh \
hello-smalltalk/autoclean.sh \
hello-smalltalk/hello.st.in \
hello-smalltalk/Makefile.am \
hello-smalltalk/configure.ac \
hello-smalltalk/m4/Makefile.am \
hello-smalltalk/po/Makefile.am \
hello-smalltalk/po/LINGUAS \
hello-smalltalk/po/de.po \
\
hello-java/INSTALL \
hello-java/autogen.sh \
hello-java/autoclean.sh \
hello-java/Hello.java \
hello-java/Makefile.am \
hello-java/configure.ac \
hello-java/m4/Makefile.am \
hello-java/po/Makefile.am \
hello-java/po/LINGUAS \
hello-java/po/de.po \
\
hello-java-awt/INSTALL \
hello-java-awt/autogen.sh \
hello-java-awt/autoclean.sh \
hello-java-awt/Hello.java \
hello-java-awt/Makefile.am \
hello-java-awt/configure.ac \
hello-java-awt/m4/Makefile.am \
hello-java-awt/m4/TestAWT.java \
hello-java-awt/m4/TestAWT.class \
hello-java-awt/po/Makefile.am \
hello-java-awt/po/LINGUAS \
hello-java-awt/po/de.po \
\
hello-java-swing/INSTALL \
hello-java-swing/autogen.sh \
hello-java-swing/autoclean.sh \
hello-java-swing/Hello.java \
hello-java-swing/Makefile.am \
hello-java-swing/configure.ac \
hello-java-swing/m4/Makefile.am \
hello-java-swing/m4/TestAWT.java \
hello-java-swing/m4/TestAWT.class \
hello-java-swing/po/Makefile.am \
hello-java-swing/po/LINGUAS \
hello-java-swing/po/de.po \
\
hello-gawk/INSTALL \
hello-gawk/autogen.sh \
hello-gawk/autoclean.sh \
hello-gawk/hello.awk \
hello-gawk/Makefile.am \
hello-gawk/configure.ac \
hello-gawk/m4/Makefile.am \
hello-gawk/po/Makefile.am \
hello-gawk/po/LINGUAS \
hello-gawk/po/de.po \
\
hello-pascal/INSTALL \
hello-pascal/autogen.sh \
hello-pascal/autoclean.sh \
hello-pascal/hello.pas \
hello-pascal/Makefile.am \
hello-pascal/configure.ac \
hello-pascal/m4/Makefile.am \
hello-pascal/po/Makefile.am \
hello-pascal/po/LINGUAS \
hello-pascal/po/de.po \
\
hello-ycp/INSTALL \
hello-ycp/autogen.sh \
hello-ycp/autoclean.sh \
hello-ycp/hello.ycp \
hello-ycp/Makefile.am \
hello-ycp/configure.ac \
hello-ycp/m4/Makefile.am \
hello-ycp/po/Makefile.am \
hello-ycp/po/LINGUAS \
hello-ycp/po/de.po \
\
hello-tcl/INSTALL \
hello-tcl/autogen.sh \
hello-tcl/autoclean.sh \
hello-tcl/hello.tcl \
hello-tcl/Makefile.am \
hello-tcl/configure.ac \
hello-tcl/m4/Makefile.am \
hello-tcl/po/Makefile.am \
hello-tcl/po/LINGUAS \
hello-tcl/po/de.po \
\
hello-tcl-tk/INSTALL \
hello-tcl-tk/autogen.sh \
hello-tcl-tk/autoclean.sh \
hello-tcl-tk/hello.tcl \
hello-tcl-tk/Makefile.am \
hello-tcl-tk/configure.ac \
hello-tcl-tk/m4/Makefile.am \
hello-tcl-tk/po/Makefile.am \
hello-tcl-tk/po/LINGUAS \
hello-tcl-tk/po/de.po \
\
hello-perl/INSTALL \
hello-perl/autogen.sh \
hello-perl/autoclean.sh \
hello-perl/hello.pl \
hello-perl/Makefile.am \
hello-perl/configure.ac \
hello-perl/m4/Makefile.am \
hello-perl/po/Makefile.am \
hello-perl/po/LINGUAS \
hello-perl/po/de.po \
\
hello-php/INSTALL \
hello-php/README \
hello-php/autogen.sh \
hello-php/autoclean.sh \
hello-php/hello.php \
hello-php/Makefile.am \
hello-php/configure.ac \
hello-php/m4/Makefile.am \
hello-php/po/Makefile.am \
hello-php/po/LINGUAS \
hello-php/po/de.po \
\
README
install-data-local: $(EXAMPLESFILES)
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
for f in $(EXAMPLESFILES); do \
d=`echo /$$f | sed -e 's,/[^/]*$$,,'`; \
test -z "$$d" || $(mkinstalldirs) $(DESTDIR)$(examplesdir)$$d || exit 1; \
b=`echo $$f | sed -e 's,^.*/,,'`; \
if test $$b = autogen.sh || test $$b = autoclean.sh; then \
echo "$(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f"; \
$(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f; \
else \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f; \
fi; \
done
installdirs-local:
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
for f in $(EXAMPLESFILES); do \
d=`echo /$$f | sed -e 's,/[^/]*$$,,'`; \
test -z "$$d" || $(mkinstalldirs) $(DESTDIR)$(examplesdir)$$d || exit 1; \
done
uninstall-local:
for f in $(EXAMPLESFILES); do \
rm -f $(DESTDIR)$(examplesdir)/$$f; \
done
EXTRA_DIST += $(EXAMPLESFILES)
# Temporary directories created by po/Makefile.
CLEANFILES = tmp-hello-*
# VMS support.
EXTRA_DIST += Makefile.vms
# Woe32 support.
EXTRA_DIST += Makefile.msvc
+878
View File
@@ -0,0 +1,878 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDJAVA = @BUILDJAVA@
BUILDJAVAEXE = @BUILDJAVAEXE@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CLASSPATH = @CLASSPATH@
CLASSPATH_SEPARATOR = @CLASSPATH_SEPARATOR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CROSS_COMPILING = @CROSS_COMPILING@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DVIPS = @DVIPS@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMACS = @EMACS@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FNMATCH_H = @FNMATCH_H@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
HAVE_ASPRINTF = @HAVE_ASPRINTF@
HAVE_GCJ = @HAVE_GCJ@
HAVE_GCJ_C = @HAVE_GCJ_C@
HAVE_GCJ_IN_PATH = @HAVE_GCJ_IN_PATH@
HAVE_GIJ = @HAVE_GIJ@
HAVE_GIJ_IN_PATH = @HAVE_GIJ_IN_PATH@
HAVE_JAVA = @HAVE_JAVA@
HAVE_JAVAC = @HAVE_JAVAC@
HAVE_JAVAC_IN_PATH = @HAVE_JAVAC_IN_PATH@
HAVE_JAVA_IN_PATH = @HAVE_JAVA_IN_PATH@
HAVE_JIKES = @HAVE_JIKES@
HAVE_JIKES_IN_PATH = @HAVE_JIKES_IN_PATH@
HAVE_JRE = @HAVE_JRE@
HAVE_JRE_IN_PATH = @HAVE_JRE_IN_PATH@
HAVE_JVIEW = @HAVE_JVIEW@
HAVE_JVIEW_IN_PATH = @HAVE_JVIEW_IN_PATH@
HAVE_LIBEXPAT = @HAVE_LIBEXPAT@
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
HAVE_SNPRINTF = @HAVE_SNPRINTF@
HAVE_WPRINTF = @HAVE_WPRINTF@
HAVE__BOOL = @HAVE__BOOL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
JAR = @JAR@
JAVA = @JAVA@
JAVAC = @JAVAC@
LDFLAGS = @LDFLAGS@
LIBEXPAT = @LIBEXPAT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LOCALE_FR = @LOCALE_FR@
LTALLOCA = @LTALLOCA@
LTLIBEXPAT = @LTLIBEXPAT@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
RANLIB = @RANLIB@
RELOCATABLE = @RELOCATABLE@
RELOCATABLE_VIA_LD_FALSE = @RELOCATABLE_VIA_LD_FALSE@
RELOCATABLE_VIA_LD_TRUE = @RELOCATABLE_VIA_LD_TRUE@
SET_MAKE = @SET_MAKE@
SET_RELOCATABLE = @SET_RELOCATABLE@
SHELL = @SHELL@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
TESTJAVA = @TESTJAVA@
TEXI2PDF = @TEXI2PDF@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
aclocaldir = @aclocaldir@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
docdir = @docdir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
lispdir = @lispdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = 1.2 gnits
SUBDIRS = po
# VMS support.
# Woe32 support.
EXTRA_DIST = $(EXAMPLESFILES) Makefile.vms Makefile.msvc
examplesdir = $(docdir)/examples
examples_DATA = installpaths
EXAMPLESFILES = \
\
hello-c/INSTALL \
hello-c/autogen.sh \
hello-c/autoclean.sh \
hello-c/hello.c \
hello-c/Makefile.am \
hello-c/configure.ac \
hello-c/m4/Makefile.am \
hello-c/po/Makevars \
hello-c/po/POTFILES.in \
hello-c/po/LINGUAS \
hello-c/po/de.po \
\
hello-c-gnome/INSTALL \
hello-c-gnome/autogen.sh \
hello-c-gnome/autoclean.sh \
hello-c-gnome/hello.c \
hello-c-gnome/Makefile.am \
hello-c-gnome/configure.ac \
hello-c-gnome/m4/Makefile.am \
hello-c-gnome/m4/gnome.m4 \
hello-c-gnome/m4/gnome-gnorba-check.m4 \
hello-c-gnome/m4/gnome-orbit-check.m4 \
hello-c-gnome/po/Makevars \
hello-c-gnome/po/POTFILES.in \
hello-c-gnome/po/LINGUAS \
hello-c-gnome/po/de.po \
\
hello-c++/INSTALL \
hello-c++/autogen.sh \
hello-c++/autoclean.sh \
hello-c++/hello.cc \
hello-c++/Makefile.am \
hello-c++/configure.ac \
hello-c++/m4/Makefile.am \
hello-c++/po/Makevars \
hello-c++/po/POTFILES.in \
hello-c++/po/LINGUAS \
hello-c++/po/de.po \
\
hello-c++-qt/INSTALL \
hello-c++-qt/autogen.sh \
hello-c++-qt/autoclean.sh \
hello-c++-qt/hello.cc \
hello-c++-qt/Makefile.am \
hello-c++-qt/configure.ac \
hello-c++-qt/m4/Makefile.am \
hello-c++-qt/m4/qt.m4 \
hello-c++-qt/po/Makefile.am \
hello-c++-qt/po/LINGUAS \
hello-c++-qt/po/de.po \
\
hello-c++-kde/INSTALL \
hello-c++-kde/autogen.sh \
hello-c++-kde/autoclean.sh \
hello-c++-kde/hello.cc \
hello-c++-kde/hellowindow.h \
hello-c++-kde/hellowindow.cc \
hello-c++-kde/Makefile.am \
hello-c++-kde/configure.in.in \
hello-c++-kde/m4/Makefile.am \
hello-c++-kde/po/Makevars \
hello-c++-kde/po/POTFILES.in \
hello-c++-kde/po/LINGUAS \
hello-c++-kde/po/de.po \
\
hello-c++-gnome/INSTALL \
hello-c++-gnome/autogen.sh \
hello-c++-gnome/autoclean.sh \
hello-c++-gnome/hello.cc \
hello-c++-gnome/Makefile.am \
hello-c++-gnome/configure.ac \
hello-c++-gnome/m4/Makefile.am \
hello-c++-gnome/m4/gnome.m4 \
hello-c++-gnome/m4/gnome-gnorba-check.m4 \
hello-c++-gnome/m4/gnome-orbit-check.m4 \
hello-c++-gnome/m4/gtk.m4 \
hello-c++-gnome/m4/gtk--.m4 \
hello-c++-gnome/po/Makevars \
hello-c++-gnome/po/POTFILES.in \
hello-c++-gnome/po/LINGUAS \
hello-c++-gnome/po/de.po \
\
hello-objc/INSTALL \
hello-objc/autogen.sh \
hello-objc/autoclean.sh \
hello-objc/hello.m \
hello-objc/Makefile.am \
hello-objc/configure.ac \
hello-objc/m4/Makefile.am \
hello-objc/po/Makevars \
hello-objc/po/POTFILES.in \
hello-objc/po/LINGUAS \
hello-objc/po/de.po \
\
hello-objc-gnustep/INSTALL \
hello-objc-gnustep/autogen.sh \
hello-objc-gnustep/autoclean.sh \
hello-objc-gnustep/main.m \
hello-objc-gnustep/AppController.h \
hello-objc-gnustep/AppController.m \
hello-objc-gnustep/Hello.h \
hello-objc-gnustep/Hello.m \
hello-objc-gnustep/GNUmakefile \
hello-objc-gnustep/po/GNUmakefile \
hello-objc-gnustep/po/LocaleAliases \
hello-objc-gnustep/po/LINGUAS \
hello-objc-gnustep/po/de.po \
\
hello-objc-gnome/INSTALL \
hello-objc-gnome/autogen.sh \
hello-objc-gnome/autoclean.sh \
hello-objc-gnome/hello.m \
hello-objc-gnome/Makefile.am \
hello-objc-gnome/configure.ac \
hello-objc-gnome/m4/Makefile.am \
hello-objc-gnome/m4/gnome.m4 \
hello-objc-gnome/m4/gnome-gnorba-check.m4 \
hello-objc-gnome/m4/gnome-orbit-check.m4 \
hello-objc-gnome/po/Makevars \
hello-objc-gnome/po/POTFILES.in \
hello-objc-gnome/po/LINGUAS \
hello-objc-gnome/po/de.po \
\
hello-sh/INSTALL \
hello-sh/autogen.sh \
hello-sh/autoclean.sh \
hello-sh/hello.sh \
hello-sh/Makefile.am \
hello-sh/configure.ac \
hello-sh/m4/Makefile.am \
hello-sh/po/Makefile.am \
hello-sh/po/LINGUAS \
hello-sh/po/de.po \
\
hello-python/INSTALL \
hello-python/autogen.sh \
hello-python/autoclean.sh \
hello-python/hello.py.in \
hello-python/Makefile.am \
hello-python/configure.ac \
hello-python/m4/Makefile.am \
hello-python/po/Makefile.am \
hello-python/po/LINGUAS \
hello-python/po/de.po \
\
hello-clisp/INSTALL \
hello-clisp/autogen.sh \
hello-clisp/autoclean.sh \
hello-clisp/hello.lisp.in \
hello-clisp/Makefile.am \
hello-clisp/configure.ac \
hello-clisp/m4/Makefile.am \
hello-clisp/po/Makefile.am \
hello-clisp/po/LINGUAS \
hello-clisp/po/de.po \
\
hello-librep/INSTALL \
hello-librep/autogen.sh \
hello-librep/autoclean.sh \
hello-librep/hello.jl.in \
hello-librep/Makefile.am \
hello-librep/configure.ac \
hello-librep/m4/Makefile.am \
hello-librep/po/Makefile.am \
hello-librep/po/LINGUAS \
hello-librep/po/de.po \
\
hello-smalltalk/INSTALL \
hello-smalltalk/autogen.sh \
hello-smalltalk/autoclean.sh \
hello-smalltalk/hello.st.in \
hello-smalltalk/Makefile.am \
hello-smalltalk/configure.ac \
hello-smalltalk/m4/Makefile.am \
hello-smalltalk/po/Makefile.am \
hello-smalltalk/po/LINGUAS \
hello-smalltalk/po/de.po \
\
hello-java/INSTALL \
hello-java/autogen.sh \
hello-java/autoclean.sh \
hello-java/Hello.java \
hello-java/Makefile.am \
hello-java/configure.ac \
hello-java/m4/Makefile.am \
hello-java/po/Makefile.am \
hello-java/po/LINGUAS \
hello-java/po/de.po \
\
hello-java-awt/INSTALL \
hello-java-awt/autogen.sh \
hello-java-awt/autoclean.sh \
hello-java-awt/Hello.java \
hello-java-awt/Makefile.am \
hello-java-awt/configure.ac \
hello-java-awt/m4/Makefile.am \
hello-java-awt/m4/TestAWT.java \
hello-java-awt/m4/TestAWT.class \
hello-java-awt/po/Makefile.am \
hello-java-awt/po/LINGUAS \
hello-java-awt/po/de.po \
\
hello-java-swing/INSTALL \
hello-java-swing/autogen.sh \
hello-java-swing/autoclean.sh \
hello-java-swing/Hello.java \
hello-java-swing/Makefile.am \
hello-java-swing/configure.ac \
hello-java-swing/m4/Makefile.am \
hello-java-swing/m4/TestAWT.java \
hello-java-swing/m4/TestAWT.class \
hello-java-swing/po/Makefile.am \
hello-java-swing/po/LINGUAS \
hello-java-swing/po/de.po \
\
hello-gawk/INSTALL \
hello-gawk/autogen.sh \
hello-gawk/autoclean.sh \
hello-gawk/hello.awk \
hello-gawk/Makefile.am \
hello-gawk/configure.ac \
hello-gawk/m4/Makefile.am \
hello-gawk/po/Makefile.am \
hello-gawk/po/LINGUAS \
hello-gawk/po/de.po \
\
hello-pascal/INSTALL \
hello-pascal/autogen.sh \
hello-pascal/autoclean.sh \
hello-pascal/hello.pas \
hello-pascal/Makefile.am \
hello-pascal/configure.ac \
hello-pascal/m4/Makefile.am \
hello-pascal/po/Makefile.am \
hello-pascal/po/LINGUAS \
hello-pascal/po/de.po \
\
hello-ycp/INSTALL \
hello-ycp/autogen.sh \
hello-ycp/autoclean.sh \
hello-ycp/hello.ycp \
hello-ycp/Makefile.am \
hello-ycp/configure.ac \
hello-ycp/m4/Makefile.am \
hello-ycp/po/Makefile.am \
hello-ycp/po/LINGUAS \
hello-ycp/po/de.po \
\
hello-tcl/INSTALL \
hello-tcl/autogen.sh \
hello-tcl/autoclean.sh \
hello-tcl/hello.tcl \
hello-tcl/Makefile.am \
hello-tcl/configure.ac \
hello-tcl/m4/Makefile.am \
hello-tcl/po/Makefile.am \
hello-tcl/po/LINGUAS \
hello-tcl/po/de.po \
\
hello-tcl-tk/INSTALL \
hello-tcl-tk/autogen.sh \
hello-tcl-tk/autoclean.sh \
hello-tcl-tk/hello.tcl \
hello-tcl-tk/Makefile.am \
hello-tcl-tk/configure.ac \
hello-tcl-tk/m4/Makefile.am \
hello-tcl-tk/po/Makefile.am \
hello-tcl-tk/po/LINGUAS \
hello-tcl-tk/po/de.po \
\
hello-perl/INSTALL \
hello-perl/autogen.sh \
hello-perl/autoclean.sh \
hello-perl/hello.pl \
hello-perl/Makefile.am \
hello-perl/configure.ac \
hello-perl/m4/Makefile.am \
hello-perl/po/Makefile.am \
hello-perl/po/LINGUAS \
hello-perl/po/de.po \
\
hello-php/INSTALL \
hello-php/README \
hello-php/autogen.sh \
hello-php/autoclean.sh \
hello-php/hello.php \
hello-php/Makefile.am \
hello-php/configure.ac \
hello-php/m4/Makefile.am \
hello-php/po/Makefile.am \
hello-php/po/LINGUAS \
hello-php/po/de.po \
\
README
# Temporary directories created by po/Makefile.
CLEANFILES = tmp-hello-*
subdir = examples
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = installpaths
DIST_SOURCES =
DATA = $(examples_DATA)
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README $(srcdir)/Makefile.in ChangeLog Makefile.am \
installpaths.in
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits examples/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
installpaths: $(top_builddir)/config.status installpaths.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
examplesDATA_INSTALL = $(INSTALL_DATA)
install-examplesDATA: $(examples_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
@list='$(examples_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(examplesDATA_INSTALL) $$d$$p $(DESTDIR)$(examplesdir)/$$f"; \
$(examplesDATA_INSTALL) $$d$$p $(DESTDIR)$(examplesdir)/$$f; \
done
uninstall-examplesDATA:
@$(NORMAL_UNINSTALL)
@list='$(examples_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(examplesdir)/$$f"; \
rm -f $(DESTDIR)$(examplesdir)/$$f; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
else \
include_option=--include; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
$(mkinstalldirs) $(distdir)/hello-c $(distdir)/hello-c++ $(distdir)/hello-c++-gnome $(distdir)/hello-c++-gnome/m4 $(distdir)/hello-c++-gnome/po $(distdir)/hello-c++-kde $(distdir)/hello-c++-kde/m4 $(distdir)/hello-c++-kde/po $(distdir)/hello-c++-qt $(distdir)/hello-c++-qt/m4 $(distdir)/hello-c++-qt/po $(distdir)/hello-c++/m4 $(distdir)/hello-c++/po $(distdir)/hello-c-gnome $(distdir)/hello-c-gnome/m4 $(distdir)/hello-c-gnome/po $(distdir)/hello-c/m4 $(distdir)/hello-c/po $(distdir)/hello-clisp $(distdir)/hello-clisp/m4 $(distdir)/hello-clisp/po $(distdir)/hello-gawk $(distdir)/hello-gawk/m4 $(distdir)/hello-gawk/po $(distdir)/hello-java $(distdir)/hello-java-awt $(distdir)/hello-java-awt/m4 $(distdir)/hello-java-awt/po $(distdir)/hello-java-swing $(distdir)/hello-java-swing/m4 $(distdir)/hello-java-swing/po $(distdir)/hello-java/m4 $(distdir)/hello-java/po $(distdir)/hello-librep $(distdir)/hello-librep/m4 $(distdir)/hello-librep/po $(distdir)/hello-objc $(distdir)/hello-objc-gnome $(distdir)/hello-objc-gnome/m4 $(distdir)/hello-objc-gnome/po $(distdir)/hello-objc-gnustep $(distdir)/hello-objc-gnustep/po $(distdir)/hello-objc/m4 $(distdir)/hello-objc/po $(distdir)/hello-pascal $(distdir)/hello-pascal/m4 $(distdir)/hello-pascal/po $(distdir)/hello-perl $(distdir)/hello-perl/m4 $(distdir)/hello-perl/po $(distdir)/hello-php $(distdir)/hello-php/m4 $(distdir)/hello-php/po $(distdir)/hello-python $(distdir)/hello-python/m4 $(distdir)/hello-python/po $(distdir)/hello-sh $(distdir)/hello-sh/m4 $(distdir)/hello-sh/po $(distdir)/hello-smalltalk $(distdir)/hello-smalltalk/m4 $(distdir)/hello-smalltalk/po $(distdir)/hello-tcl $(distdir)/hello-tcl-tk $(distdir)/hello-tcl-tk/m4 $(distdir)/hello-tcl-tk/po $(distdir)/hello-tcl/m4 $(distdir)/hello-tcl/po $(distdir)/hello-ycp $(distdir)/hello-ycp/m4 $(distdir)/hello-ycp/po
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am: installdirs-local
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am: install-data-local install-examplesDATA
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-examplesDATA uninstall-info-am uninstall-local
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive ctags \
ctags-recursive distclean distclean-generic distclean-libtool \
distclean-recursive distclean-tags distdir dvi dvi-am \
dvi-recursive info info-am info-recursive install install-am \
install-data install-data-am install-data-local \
install-data-recursive install-examplesDATA install-exec \
install-exec-am install-exec-recursive install-info \
install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
pdf-recursive ps ps-am ps-recursive tags tags-recursive \
uninstall uninstall-am uninstall-examplesDATA uninstall-info-am \
uninstall-info-recursive uninstall-local uninstall-recursive
install-data-local: $(EXAMPLESFILES)
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
for f in $(EXAMPLESFILES); do \
d=`echo /$$f | sed -e 's,/[^/]*$$,,'`; \
test -z "$$d" || $(mkinstalldirs) $(DESTDIR)$(examplesdir)$$d || exit 1; \
b=`echo $$f | sed -e 's,^.*/,,'`; \
if test $$b = autogen.sh || test $$b = autoclean.sh; then \
echo "$(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f"; \
$(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f; \
else \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(examplesdir)/$$f; \
fi; \
done
installdirs-local:
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
for f in $(EXAMPLESFILES); do \
d=`echo /$$f | sed -e 's,/[^/]*$$,,'`; \
test -z "$$d" || $(mkinstalldirs) $(DESTDIR)$(examplesdir)$$d || exit 1; \
done
uninstall-local:
for f in $(EXAMPLESFILES); do \
rm -f $(DESTDIR)$(examplesdir)/$$f; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+27
View File
@@ -0,0 +1,27 @@
# -*- Makefile -*- for gettext-tools/projects
#### Start of system configuration section. ####
#### End of system configuration section. ####
SHELL = /bin/sh
all :
install : all
installdirs :
uninstall :
check :
mostlyclean : clean
clean : force
distclean : clean
maintainer-clean : distclean
force :
+32
View File
@@ -0,0 +1,32 @@
# -*- Makefile -*- for gettext-tools/projects on VMS using the MMS utility
#### Start of system configuration section. ####
#### End of system configuration section. ####
all :
write sys$output "Nothing to be done for 'all'."
install : all
write sys$output "Nothing else to be done for 'install'."
installdirs :
write sys$output "Nothing to be done for 'installdirs'."
uninstall :
write sys$output "Nothing to be done for 'uninstall'."
check :
write sys$output "Nothing to be done for 'check'."
mostlyclean : clean
write sys$output "Nothing else to be done for 'mostlyclean'."
clean :
write sys$output "Nothing to be done for 'clean'."
distclean : clean
write sys$output "Nothing else to be done for 'distclean'."
maintainer-clean : distclean
write sys$output "Nothing else to be done for 'maintainer-clean'."
+44
View File
@@ -0,0 +1,44 @@
This directory contains simple examples of the use of GNU gettext.
Each example is a simple "hello world" program with a very small message
catalog, written in a particular programming language for a particular
environment.
Example Language GUI Environment
hello-c C
hello-c-gnome C GNOME
hello-c++ C++
hello-c++-qt C++ Qt
hello-c++-kde C++ KDE
hello-c++-gnome C++ GNOME
hello-objc ObjectiveC
hello-objc-gnustep ObjectiveC GNUstep
hello-objc-gnome ObjectiveC GNOME
hello-sh Shell
hello-python Python
hello-clisp Lisp
hello-librep librep
hello-smalltalk Smalltalk
hello-java Java
hello-java-awt Java AWT
hello-java-swing Java Swing
hello-gawk awk
hello-pascal Pascal
hello-ycp YCP libyui
hello-tcl Tcl
hello-tcl-tk Tcl Tk
hello-perl Perl
hello-php PHP
Before building an example, you need to
1. Build and install the GNU gettext package, as described in the INSTALL
file.
2. cd to the example and do
./autogen.sh
3. Then you can build the example as usual:
./configure --prefix=/some/prefix
make
make install
and see it work by executing
/some/prefix/bin/hello
@@ -0,0 +1,10 @@
This example relies on:
- the GNOME libraries (libgnomeui, libgnome, libgnomesupport, libart_lgpl)
and their dependencies: imlib (libgdk_imlib), audiofile (libaudiofile),
esound (libesd), zlib (libz).
- the GTK libraries (libgtk, libgdk)
- the glib libraries (libglib, libgmodule)
- the X11 libraries
- the GTK / C++ bindings (libgtkmm, libgdkmm)
- the C++ signal/slot library (libsigc++)
- the C++ runtime libraries (libstdc++)
@@ -0,0 +1,31 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_PROGRAMS = hello
# The source files of the 'hello' program.
hello_SOURCES = hello.cc
# Define a C macro LOCALEDIR indicating where catalogs will be installed.
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
# Make sure the gnome.h include file is found.
INCLUDES = $(GTKMM_CFLAGS) $(GNOME_INCLUDEDIR)
# Link time dependencies.
LDADD = $(GTKMM_LIBS) $(GNOME_LIBDIR) $(GNOMEUI_LIBS) @LIBINTL@
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+51
View File
@@ -0,0 +1,51 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by autopoint.
rm -f ABOUT-NLS
rm -f config.rpath
rm -f m4/codeset.m4
rm -f m4/gettext.m4
rm -f m4/glibc21.m4
rm -f m4/iconv.m4
rm -f m4/intdiv0.m4
rm -f m4/inttypes-pri.m4
rm -f m4/inttypes.m4
rm -f m4/inttypes_h.m4
rm -f m4/isc-posix.m4
rm -f m4/lcmessage.m4
rm -f m4/lib-ld.m4
rm -f m4/lib-link.m4
rm -f m4/lib-prefix.m4
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
rm -f m4/stdint_h.m4
rm -f m4/uintmax_t.m4
rm -f m4/ulonglong.m4
rm -f mkinstalldirs
rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f install-sh
rm -f missing
rm -f config.guess
rm -f config.sub
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
autopoint -f # was: gettextize -f -c
rm po/Makevars.template
rm po/Rules-quot
rm po/boldquot.sed
rm po/en@boldquot.header
rm po/en@quot.header
rm po/insert-header.sin
rm po/quot.sed
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
fi
done
cd ..
@@ -0,0 +1,26 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.cc)
AM_INIT_AUTOMAKE(hello-c++-gnome, 0)
AC_PROG_CXX
GNOME_INIT
GTKMM_CFLAGS=`gtkmm-config --cflags`
AC_SUBST([GTKMM_CFLAGS])
GTKMM_LIBS=`gtkmm-config --libs`
AC_SUBST([GTKMM_LIBS])
AC_CHECK_HEADERS([unistd.h])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.12.1)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
@@ -0,0 +1,88 @@
/* Example for use of GNU gettext.
Copyright (C) 2003 Free Software Foundation, Inc.
This file is in the public domain.
Source code of the C++ program. */
/* Get GNOME declarations. */
#include <gnome.h>
#include <gtk--.h>
/* Get getpid() declaration. */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
static Gtk::Main *application;
static gint
quit_callback (GdkEventAny*)
{
application->quit ();
}
int
main (int argc, char *argv[])
{
Gtk::Window *window;
Gtk::VBox *panel;
Gtk::Label *label1;
Gtk::Alignment *label1aligned;
Gtk::Label *label2;
Gtk::Alignment *label2aligned;
Gtk::Button *button;
Gtk::HButtonBox *buttonbar;
/* Initializations. */
setlocale (LC_ALL, "");
application = new Gtk::Main (argc, argv);
textdomain ("hello-c++-gnome");
bindtextdomain ("hello-c++-gnome", LOCALEDIR);
/* Create the GUI elements. */
window = new Gtk::Window (GTK_WINDOW_TOPLEVEL);
window->set_title ("Hello example");
window->realize ();
window->delete_event.connect (SigC::slot (quit_callback));
label1 = new Gtk::Label (_("Hello, world!"));
label1aligned = new Gtk::Alignment (0.0, 0.5, 0, 0);
label1aligned->add (*label1);
label2 = new Gtk::Label (g_strdup_printf (_("This program is running as process number %d."), getpid ()));
label2aligned = new Gtk::Alignment (0.0, 0.5, 0, 0);
label2aligned->add (*label2);
button = new Gtk::Button ("OK");
button->clicked.connect (Gtk::Main::quit.slot()); //slot (quit_callback));
buttonbar = new Gtk::HButtonBox (GTK_BUTTONBOX_END);
buttonbar->pack_start (*button);
panel = new Gtk::VBox (false, GNOME_PAD_SMALL);
panel->pack_start (*label1aligned);
panel->pack_start (*label2aligned);
panel->pack_start (*buttonbar);
window->add (*panel);
/* Make the GUI elements visible. */
label1->show ();
label1aligned->show ();
label2->show ();
label2aligned->show ();
button->show ();
buttonbar->show ();
panel->show ();
window->show ();
/* Start the event loop. */
application->run ();
}
@@ -0,0 +1,7 @@
EXTRA_DIST = \
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \
inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \
lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
ulonglong.m4 \
gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 \
gtk.m4 gtk--.m4
@@ -0,0 +1,35 @@
dnl
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
dnl
dnl if failflag is "failure" it aborts if gnorba is not found.
dnl
AC_DEFUN([GNOME_GNORBA_HOOK],[
GNOME_ORBIT_HOOK([],$2)
AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
gnome_cv_gnorba_found=no
if test x$gnome_cv_orbit_found = xyes; then
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
if test -n "$GNORBA_LIBS"; then
gnome_cv_gnorba_found=yes
fi
fi
])
AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
if test x$gnome_cv_orbit_found = xyes; then
$1
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
AC_SUBST(GNORBA_CFLAGS)
AC_SUBST(GNORBA_LIBS)
else
if test x$2 = xfailure; then
AC_MSG_ERROR(gnorba library not installed or installation problem)
fi
fi
])
AC_DEFUN([GNOME_GNORBA_CHECK], [
GNOME_GNORBA_HOOK([],failure)
])
@@ -0,0 +1,33 @@
dnl
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
dnl
dnl if failflag is "failure" it aborts if orbit is not found.
dnl
AC_DEFUN([GNOME_ORBIT_HOOK],[
AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
gnome_cv_orbit_found=no
else
gnome_cv_orbit_found=yes
fi
])
AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
if test x$gnome_cv_orbit_found = xyes; then
$1
ORBIT_CFLAGS=`orbit-config --cflags client server`
ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
AC_SUBST(ORBIT_CFLAGS)
AC_SUBST(ORBIT_LIBS)
else
if test x$2 = xfailure; then
AC_MSG_ERROR(ORBit not installed or installation problem)
fi
fi
])
AC_DEFUN([GNOME_ORBIT_CHECK], [
GNOME_ORBIT_HOOK([],failure)
])
@@ -0,0 +1,128 @@
dnl
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
dnl
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
dnl is not found.
dnl
AC_DEFUN([GNOME_INIT_HOOK],[
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOMEUI_LIBS)
AC_SUBST(GNOMEGNORBA_LIBS)
AC_SUBST(GTKXMHTML_LIBS)
AC_SUBST(ZVT_LIBS)
AC_SUBST(GNOME_LIBDIR)
AC_SUBST(GNOME_INCLUDEDIR)
AC_ARG_WITH(gnome-includes,
[ --with-gnome-includes Specify location of GNOME headers],[
CFLAGS="$CFLAGS -I$withval"
])
AC_ARG_WITH(gnome-libs,
[ --with-gnome-libs Specify location of GNOME libs],[
LDFLAGS="$LDFLAGS -L$withval"
gnome_prefix=$withval
])
AC_ARG_WITH(gnome,
[ --with-gnome Specify prefix for GNOME files],
if test x$withval = xyes; then
want_gnome=yes
dnl Note that an empty true branch is not
dnl valid sh syntax.
ifelse([$1], [], :, [$1])
else
if test "x$withval" = xno; then
want_gnome=no
else
want_gnome=yes
LDFLAGS="$LDFLAGS -L$withval/lib"
CFLAGS="$CFLAGS -I$withval/include"
gnome_prefix=$withval/lib
fi
fi,
want_gnome=yes)
if test "x$want_gnome" = xyes; then
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
if test "$GNOME_CONFIG" = "no"; then
no_gnome_config="yes"
else
AC_MSG_CHECKING(if $GNOME_CONFIG works)
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
GNOME_GNORBA_HOOK([],$2)
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
$1
else
AC_MSG_RESULT(no)
no_gnome_config="yes"
fi
fi
if test x$exec_prefix = xNONE; then
if test x$prefix = xNONE; then
gnome_prefix=$ac_default_prefix/lib
else
gnome_prefix=$prefix/lib
fi
else
gnome_prefix=`eval echo \`echo $libdir\``
fi
if test "$no_gnome_config" = "yes"; then
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
if test -f $gnome_prefix/gnomeConf.sh; then
AC_MSG_RESULT(found)
echo "loading gnome configuration from" \
"$gnome_prefix/gnomeConf.sh"
. $gnome_prefix/gnomeConf.sh
$1
else
AC_MSG_RESULT(not found)
if test x$2 = xfail; then
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
fi
fi
fi
fi
if test -n "$3"; then
n="$3"
for i in $n; do
AC_MSG_CHECKING(extra library \"$i\")
case $i in
applets)
AC_SUBST(GNOME_APPLETS_LIBS)
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
docklets)
AC_SUBST(GNOME_DOCKLETS_LIBS)
GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
capplet)
AC_SUBST(GNOME_CAPPLET_LIBS)
GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
*)
AC_MSG_RESULT(unknown library)
esac
done
fi
])
dnl
dnl GNOME_INIT ([additional-inits])
dnl
AC_DEFUN([GNOME_INIT],[
GNOME_INIT_HOOK([],fail,$1)
])
@@ -0,0 +1,195 @@
# Configure paths for GTK--
# Erik Andersen 30 May 1998
# Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
# Modified by Thomas Langen 16 Jan 2000 (corrected CXXFLAGS)
dnl Test for GTKMM, and define GTKMM_CFLAGS and GTKMM_LIBS
dnl to be used as follows:
dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl
AC_DEFUN(AM_PATH_GTKMM,
[dnl
dnl Get the cflags and libraries from the gtkmm-config script
dnl
AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
Prefix where GTK-- is installed (optional)],
gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
Exec prefix where GTK-- is installed (optional)],
gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
, enable_gtkmmtest=yes)
if test x$gtkmm_config_exec_prefix != x ; then
gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
if test x${GTKMM_CONFIG+set} != xset ; then
GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
fi
fi
if test x$gtkmm_config_prefix != x ; then
gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
if test x${GTKMM_CONFIG+set} != xset ; then
GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
fi
fi
AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
min_gtkmm_version=ifelse([$1], ,0.10.0,$1)
AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
AC_LANG_SAVE
no_gtkmm=""
if test "$GTKMM_CONFIG" = "no" ; then
no_gtkmm=yes
else
AC_LANG_CPLUSPLUS
GTKMM_CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
GTKMM_LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtkmmtest" = "xyes" ; then
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS"
LIBS="$LIBS $GTKMM_LIBS"
dnl
dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
dnl checks the results of gtkmm-config to some extent
dnl
rm -f conf.gtkmmtest
AC_TRY_RUN([
#include <gtk--.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtkmmtest");
/* HP/UX 0 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtkmm_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtkmm_version");
exit(1);
}
if ((gtkmm_major_version != $gtkmm_config_major_version) ||
(gtkmm_minor_version != $gtkmm_config_minor_version) ||
(gtkmm_micro_version != $gtkmm_config_micro_version))
{
printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
$gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
printf ("*** was found! If gtkmm-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
/* GTK-- does not have the GTKMM_*_VERSION constants */
/*
else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
(gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
(gtkmm_micro_version != GTKMM_MICRO_VERSION))
{
printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
}
*/
else
{
if ((gtkmm_major_version > major) ||
((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtkmm" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTKMM_CONFIG" = "no" ; then
echo "*** The gtkmm-config script installed by GTK-- could not be found"
echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTKMM_CONFIG environment variable to the"
echo "*** full path to gtkmm-config."
echo "*** The gtkmm-config script was not available in GTK-- versions"
echo "*** prior to 0.9.12. Perhaps you need to update your installed"
echo "*** version to 0.9.12 or later"
else
if test -f conf.gtkmmtest ; then
:
else
echo "*** Could not run GTK-- test program, checking why..."
CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS"
LIBS="$LIBS $GTKMM_LIBS"
AC_TRY_LINK([
#include <gtk--.h>
#include <stdio.h>
], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTKMM_CFLAGS=""
GTKMM_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_LANG_RESTORE
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
rm -f conf.gtkmmtest
])
@@ -0,0 +1,194 @@
# Configure paths for GTK+
# Owen Taylor 97-11-3
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AM_PATH_GTK,
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
for module in . $4
do
case "$module" in
gthread)
gtk_config_args="$gtk_config_args gthread"
;;
esac
done
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GTK_LIBS $LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
#endif /* defined (GTK_MAJOR_VERSION) ... */
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found"
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,55 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--keyword=_ --flag=_:1:pass-c-format \
--keyword=N_ --flag=N_:1:pass-c-format \
--flag=g_log:3:c-format --flag=g_logv:3:c-format \
--flag=g_error:1:c-format --flag=g_message:1:c-format \
--flag=g_critical:1:c-format --flag=g_warning:1:c-format \
--flag=g_print:1:c-format \
--flag=g_printerr:1:c-format \
--flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \
--flag=g_printf_string_upper_bound:1:c-format \
--flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \
--flag=g_string_sprintf:2:c-format \
--flag=g_string_sprintfa:2:c-format \
--flag=g_scanner_error:2:c-format \
--flag=g_scanner_warn:2:c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# List of files which contain translatable strings.
hello.cc
@@ -0,0 +1,27 @@
# German translations for hello-c++-gnome package
# German messages for hello-c++-gnome.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-c++-gnome package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-c++-gnome\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 15:01+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.cc:51
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hello.cc:56
#, c-format
msgid "This program is running as process number %d."
msgstr "Dieses Programm läuft mit der Prozess-Nummer %d."
@@ -0,0 +1,4 @@
This example relies on:
- KDE (libkdeui, libkdecore) and its dependencies
- Qt (libqt) and its dependencies: OpenGL (libGL), libpng, zlib (libz)
- the C++ runtime libraries (libstdc++)
@@ -0,0 +1,58 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_PROGRAMS = hello
# The source files of the 'hello' program.
hello_SOURCES = hello.cc hellowindow.cc
# Use 'moc' for QObject subclasses.
METASOURCES = AUTO
# Define a C macro LOCALEDIR indicating where catalogs will be installed.
localedir = $(datadir)/locale
DEFS = -DPREFIX=\"$(prefix)\" @DEFS@
# Make sure the KDE, Qt, X include file is found.
INCLUDES = $(KDE_INCLUDES) $(QT_INCLUDES) $(X_INCLUDES)
# CXXFLAGS += $(QT_CXXFLAGS) $(PTHREAD_CFLAGS)
# Link time dependencies.
LDADD = $(KDE_LDFLAGS) $(QT_LDFLAGS)
LIBS += $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT)
# Generic KDE build mechanism.
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
package-messages:
$(MAKE) -f admin/Makefile.common package-messages
$(MAKE) -C po merge
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
# Additional files to be distributed.
EXTRA_DIST = admin/config.rpath autogen.sh autoclean.sh
+52
View File
@@ -0,0 +1,52 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by autopoint.
rm -f ABOUT-NLS
rm -f m4/codeset.m4
rm -f m4/gettext.m4
rm -f m4/glibc21.m4
rm -f m4/iconv.m4
rm -f m4/intdiv0.m4
rm -f m4/inttypes-pri.m4
rm -f m4/inttypes.m4
rm -f m4/inttypes_h.m4
rm -f m4/isc-posix.m4
rm -f m4/lcmessage.m4
rm -f m4/lib-ld.m4
rm -f m4/lib-link.m4
rm -f m4/lib-prefix.m4
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
rm -f m4/stdint_h.m4
rm -f m4/uintmax_t.m4
rm -f m4/ulonglong.m4
rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sin
# Brought in by explicit copy.
rm -rf admin
# Generated through admin/cvs.sh.
rm -f acinclude.m4
rm -f subdirs configure.files
rm -f configure.in
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
rm -f config.h.in stamp-h.in
rm -f Makefile.in m4/Makefile.in
# Generated.
rm -f po/Makefile.in
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+43
View File
@@ -0,0 +1,43 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
kdedir=
for d in /usr/lib/kde /usr/local/kde /usr/local /usr/kde /usr /opt/kde3 /opt/kde $KDEDIR; do
if test -f $d/share/apps/kdelibs/admin/cvs.sh; then
kdedir=$d
break
fi
done
if test -z "$kdedir"; then
echo "*** KDE directory not found. Try setting KDEDIR." 1>&2
exit 1
fi
cp -a $kdedir/share/apps/kdelibs/admin .
sed -e s/AC_FOREACH/INCOMPATIBLE_FOREACH/g < $kdedir/share/apps/kdelibs/admin/acinclude.m4.in > admin/acinclude.m4.in
autopoint -f # was: gettextize -f -c
mv config.rpath admin/config.rpath
rm -f mkinstalldirs
rm po/Makevars.template
rm po/Rules-quot
rm po/boldquot.sed
rm po/en@boldquot.header
rm po/en@quot.header
rm po/insert-header.sin
rm po/quot.sed
sh admin/cvs.sh cvs
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
fi
done
cd ..
@@ -0,0 +1,6 @@
#MIN_CONFIG
AC_CHECK_HEADERS([unistd.h])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.12.1)
AC_CONFIG_FILES([po/Makefile.in])
@@ -0,0 +1,73 @@
// Example for use of GNU gettext.
// Copyright (C) 2003 Free Software Foundation, Inc.
// This file is published under the GNU General Public License.
// Source code of the C++ program.
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
/* Declare KCmdLineArgs, KCmdLineOptions. */
#include <kcmdlineargs.h>
/* Declare KApplication. */
#include <kapplication.h>
/* Declare KAboutData. */
#include <kaboutdata.h>
/* Declare main window widget. */
#include "hellowindow.h"
// Comment line options.
static KCmdLineOptions options[] =
{
{ 0, 0, 0 } // End of options.
};
int
main (int argc, char *argv[])
{
// Initializations.
{
// Add our installation directory to KDE's search list for message
// catalogs. By default it looks only in $KDEHOME/share/locale and
// $KDEDIR/share/locale.
QString kdedirs = getenv ("KDEDIRS");
if (kdedirs.isEmpty ())
kdedirs = PREFIX;
else
kdedirs = kdedirs + ":" + PREFIX;
setenv ("KDEDIRS", (const char *) kdedirs.local8Bit(), true);
}
KAboutData aboutData ("hello-c++-kde",
I18N_NOOP ("Hello example"),
VERSION,
I18N_NOOP ("Hello world example"),
KAboutData::License_GPL,
"(C) 2003 Free Software Foundation",
NULL,
NULL,
"bug-gnu-gettext@gnu.org");
KCmdLineArgs::init (argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions (options);
KApplication application;
// Create the GUI elements.
HelloMainWindow *window = new HelloMainWindow ();
QObject::connect (window->button, SIGNAL (clicked ()),
&application, SLOT (quit ()));
application.setMainWidget (window);
// Make the GUI elements visible.
window->show ();
// Start the event loop.
return application.exec ();
}
@@ -0,0 +1,63 @@
// Example for use of GNU gettext.
// Copyright (C) 2003 Free Software Foundation, Inc.
// This file is published under the GNU General Public License.
#if HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "hellowindow.h"
/* Declare i18n. */
#include <klocale.h>
/* Declare KMainWindow. */
#include <kmainwindow.h>
/* Declare QLabel. */
#include <qlabel.h>
/* Declare QPushButton. */
#include <qpushbutton.h>
/* Declare QString. */
#include <qstring.h>
/* Declare QVBox. */
#include <qvbox.h>
/* Declare QHBox. */
#include <qhbox.h>
/* Get getpid() declaration. */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
// The main window widget.
HelloMainWindow::HelloMainWindow (QWidget * parent, const char * name)
: KMainWindow (parent, name)
{
setCaption ("Hello example");
QVBox *panel = new QVBox (this);
panel->setSpacing (2);
QLabel *label1 = new QLabel (i18n ("Hello, world!"), panel);
QString label2text;
// NOT using QString::sprintf because it doesn't support reordering of
// arguments.
//label2text.sprintf (i18n ("This program is running as process number %d"),
// getpid ());
label2text = i18n ("This program is running as process number %1.").arg(getpid ());
QLabel *label2 = new QLabel (label2text, panel);
QHBox *buttonbar = new QHBox (panel);
QWidget *filler = new QWidget (buttonbar); // makes the button right-aligned
button = new QPushButton ("OK", buttonbar);
button->setMaximumWidth (button->sizeHint().width() + 20);
panel->resize (panel->sizeHint ());
resize (panel->frameSize ());
}
HelloMainWindow::~HelloMainWindow ()
{
}
@@ -0,0 +1,20 @@
// Example for use of GNU gettext.
// Copyright (C) 2003 Free Software Foundation, Inc.
// This file is published under the GNU General Public License.
/* Declare KMainWindow. */
#include <kmainwindow.h>
/* Declare QPushButton. */
#include <qpushbutton.h>
// The main window widget.
class HelloMainWindow : public KMainWindow
{
Q_OBJECT
public:
HelloMainWindow (QWidget * parent = NULL, const char * name = NULL);
~HelloMainWindow ();
public:
QPushButton *button;
};
@@ -0,0 +1,5 @@
EXTRA_DIST = \
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \
inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \
lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
ulonglong.m4
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,51 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--qt \
--keyword=i18n --flag=i18n:1:pass-c-format --flag=i18n:1:pass-qt-format \
--keyword=tr2i18n --flag=tr2i18n:1:pass-c-format --flag=tr2i18n:1:pass-qt-format \
--keyword=I18N_NOOP --flag=I18N_NOOP:1:pass-c-format --flag=I18N_NOOP:1:pass-qt-format \
--keyword=tr --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format \
--keyword=translate:2 --flag=translate:2:pass-c-format --flag=translate:2:pass-qt-format \
--keyword=QT_TR_NOOP --flag=QT_TR_NOOP:1:pass-c-format --flag=QT_TR_NOOP:1:pass-qt-format \
--keyword=QT_TRANSLATE_NOOP:2 --flag=QT_TRANSLATE_NOOP:2:pass-c-format --flag=QT_TRANSLATE_NOOP:2:pass-qt-format \
--keyword=_ --flag=_:1:pass-c-format --flag=_:1:pass-qt-format \
--keyword=N_ --flag=N_:1:pass-c-format --flag=N_:1:pass-qt-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
@@ -0,0 +1,7 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# List of files which contain translatable strings.
hello.cc
hellowindow.cc
@@ -0,0 +1,35 @@
# German translations for hello-c++-kde package
# German messages for hello-c++-kde.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-c++-kde package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-c++-kde\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 15:01+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.cc:46
msgid "Hello example"
msgstr "Beispiel Hallo"
#: hello.cc:48
msgid "Hello world example"
msgstr "Beispiel Hallo-Welt"
#: hellowindow.cc:42
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hellowindow.cc:49
#, qt-format
msgid "This program is running as process number %1."
msgstr "Dieses Programm läuft mit der Prozess-Nummer %1."
@@ -0,0 +1,3 @@
This example relies on:
- Qt (libqt) and its dependencies: OpenGL (libGL), libpng, zlib (libz)
- the C++ runtime libraries (libstdc++)
@@ -0,0 +1,33 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_PROGRAMS = hello
# The source files of the 'hello' program.
hello_SOURCES = hello.cc
# Define C macros LOCALEDIR and PKGLOCALEDIR indicating where catalogs will be
# installed.
localedir = $(datadir)/locale
pkglocaledir = $(pkgdatadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" -DPKGLOCALEDIR=\"$(pkglocaledir)\" @DEFS@
CXXFLAGS += $(QT_CXXFLAGS) $(PTHREAD_CFLAGS)
# Link time dependencies.
LDADD = $(QT_LDFLAGS)
LIBS += $(QT_LIBS)
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by explicit copy.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f po/Makefile.in
rm -f install-sh
rm -f mkinstalldirs
rm -f missing
rm -f config.guess
rm -f config.sub
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.qm
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
test -r ../Makefile.am || . ../installpaths
cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c --qt -o $lang.qm $lang.po
fi
done
cd ..
@@ -0,0 +1,25 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.cc)
AM_INIT_AUTOMAKE(hello-c++-qt, 0)
AC_PROG_CXX
FUN_TYPE_BOOL
AC_CHECK_HEADERS([unistd.h])
FUN_HEADER_STDCXX
FUN_CHECK_PTHREAD
FUN_CHECK_QT(220)
dnl Support for the po directory.
AM_NLS
AM_PO_SUBDIRS
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE])
AC_OUTPUT
@@ -0,0 +1,74 @@
// Example for use of GNU gettext.
// Copyright (C) 2003 Free Software Foundation, Inc.
// This file is in the public domain.
// Source code of the C++ program.
#include <qapplication.h>
#include <qmainwindow.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qvbox.h>
#include <qhbox.h>
#include <qtextcodec.h>
/* Get getpid() declaration. */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
int
main (int argc, char *argv[])
{
// Initializations.
QApplication application (argc, argv);
#if 0
GettextTranslator *translator =
new GettextTranslator (&application, "hello-c++-qt", LOCALEDIR);
#else
QTranslator *translator = new QTranslator (NULL);
translator->load (QString ("hello-c++-qt") + "_" + QTextCodec::locale(),
PKGLOCALEDIR);
#endif
application.installTranslator (translator);
#define _(string) application.translate ("", string)
// Create the GUI elements.
QMainWindow *window = new QMainWindow ();
window->setCaption ("Hello example");
QVBox *panel = new QVBox (window);
panel->setSpacing (2);
QLabel *label1 = new QLabel (_("Hello, world!"), panel);
QString label2text;
// NOT using QString::sprintf because it doesn't support reordering of
// arguments.
//label2text.sprintf (_("This program is running as process number %d"),
// getpid ());
label2text = _("This program is running as process number %1.").arg(getpid ());
QLabel *label2 = new QLabel (label2text, panel);
QHBox *buttonbar = new QHBox (panel);
QWidget *filler = new QWidget (buttonbar); // makes the button right-aligned
QPushButton *button = new QPushButton ("OK", buttonbar);
button->setMaximumWidth (button->sizeHint().width() + 20);
QObject::connect (button, SIGNAL (clicked ()), &application, SLOT (quit ()));
panel->resize (panel->sizeHint ());
window->resize (panel->frameSize ());
application.setMainWidget (window);
// Make the GUI elements visible.
window->show ();
// Start the event loop.
return application.exec ();
}
@@ -0,0 +1,3 @@
EXTRA_DIST = \
nls.m4 po.m4 \
qt.m4
@@ -0,0 +1,466 @@
# Copyright (C) 2001 David Johnson
# This file is free software; the author gives unlimited permission to copy
# and/or distribute it, with or without modifications, as long as this notice
# is preserved.
# FUN_TYPE BOOL
# check for a built-in bool type
# HAVE_BOOL will be defined in the config header
AC_DEFUN(FUN_TYPE_BOOL,
[
AC_REQUIRE([AC_PROG_CXX])
AC_LANG_PUSH(C++)
AC_CHECK_TYPE(bool, ac_check_bool=yes, ac_check_bool=no)
AC_LANG_POP(C++)
if test "x$ac_check_bool" = "xyes" ; then
AC_DEFINE(HAVE_BOOL,,[define if bool is a built-in type])
fi
AH_BOTTOM([#ifndef HAVE_BOOL])
AH_BOTTOM([enum booltyp { false, true }; typedef enum booltyp bool;])
AH_BOTTOM([#endif])
])# FUN_TYPE_BOOL
# FUN_HEADER_STDCXX
# check for standard ISO C++ headers
AC_DEFUN(FUN_HEADER_STDCXX,
[
AC_REQUIRE([AC_PROG_CXX])
AC_LANG_PUSH(C++)
ac_check_headers=no
AC_CHECK_HEADER(cstdlib,
ac_check_headers=yes,
ac_check_headers=no)
AC_CHECK_HEADER(cstring,
ac_check_headers=$ac_check_headers,
ac_check_headers=no)
AC_CHECK_HEADER(iostream,
ac_check_headers=$ac_check_headers,
ac_check_headers=no)
AC_LANG_POP(C++)
if test "x$ac_check_headers" = "xno" ; then
AC_MSG_ERROR(standard ISO C++ headers not found!)
fi
])#FUN_HEADER_STDCXX
# FUN_CHECK_PTHREAD
# check for posix pthreads
# sets PTHREAD_LIBS and PTHREAD_CFLAGS
# sets HAVE_PTHREADS in the configuration header
AC_DEFUN(FUN_CHECK_PTHREAD,
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
[enable the use of the threads [[default=no]]]),
ac_use_threads=$enableval, ac_use_threads=no)
if test "x$ac_use_threads" = "xyes" ; then
AC_CHECK_HEADER(pthread.h, ac_posix_threads=yes, ac_posix_threads=no)
if test "x$ac_posix_threads" = "xyes" ; then
AC_MSG_CHECKING([whether ${CC} accepts -pthread])
ac_cflags_save="$CFLAGS"
CFLAGS="$CFLAGS -pthread"
AC_TRY_COMPILE([#include <pthread.h>], [pthread_attr_init(0)],
ac_cc_pthread=yes, ac_cc_pthread=no)
CFLAGS="$ac_cflags_save"
if test "x$ac_cc_pthread" = "xyes" ; then
AC_MSG_RESULT([yes])
PTHREAD_CFLAGS="-pthread"
else
AC_MSG_RESULT([no])
ac_thread_library=none
if test "x$ac_thread_library" = "xnone" ; then
AC_CHECK_LIB(c_r, pthread_self, ac_thread_library=c_r)
fi
if test "x$ac_thread_library" = "xnone" ; then
AC_CHECK_LIB(pthread, pthread_self, ac_thread_library=pthread)
fi
if test "x$ac_thread_library" = "xnone" ; then
AC_CHECK_LIB(pthreads, pthread_self, ac_thread_library=pthreads)
fi
if test "x$ac_thread_library" = "xnone" ; then
AC_CHECK_LIB(thread, pthread_self, ac_thread_library=thread)
fi
if test "x$ac_thread_library" = "xnone" ; then
AC_CHECK_LIB(gthreads, pthread_self, ac_thread_library=gthreads)
fi
if test "x$ac_thread_library" = "xnone" ; then
AC_CHECK_LIB(c, pthread_self, ac_thread_library=c)
fi
if test "x$ac_thread_library" = "xnone" ; then
ac_use_threads=no
else
PTHREAD_LIBS="-l$ac_thread_library"
fi
fi
else
ac_use_threads=no
fi
fi
if test "x$ac_use_threads" = "xyes" ; then
AC_DEFINE(HAVE_PTHREAD, 1, [Define if you have POSIX threads])
case $host_os in
aix* | freebsd*)
PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE"
;;
linux* | solaris*)
PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT"
;;
*)
;;
esac
fi
])#FUN_CHECK_PTHREAD
# FUN_CHECK_QT([qt_min_version],[qt_max_version])
# check for qt headers, libs, progs and compilation
# substs QT_CXXFLAGS, QT_LDFLAGS, and QT_LIBS
# substs QTVERSION, MOC and UIC
# LIBQT, MOC and UIC 'precious' variables
AC_DEFUN(FUN_CHECK_QT,
[
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PATH_X])
AC_REQUIRE([AC_PATH_XTRA])
AC_REQUIRE([FUN_CHECK_PTHREAD])
# some 'precious' variables for configure --help
AC_ARG_VAR(QTMIN, minimum version of Qt to search for e.g. 220)
AC_ARG_VAR(QTMAX, maximum version of Qt to search for e.g. 399)
AC_ARG_VAR(LIBQT, library flag for the Qt libary e.g. -lqt)
AC_ARG_VAR(MOC, QT meta object compiler command)
AC_ARG_VAR(UIC, Qt UI compiler command)
AC_CACHE_SAVE
AC_MSG_NOTICE([checking for Qt])
# process our args
if test -z "$1" ; then
qt_min_version=0
else
qt_min_version=$1
fi
if test -z "$2" ; then
qt_max_version=9999
else
qt_max_version=$2
fi
# adjust for user preferences
if test "x$QTMIN" != "x" ; then
if expr $QTMIN '>' $qt_min_version > /dev/null ; then
qt_min_version=$QTMIN;
fi
fi
if test "x$QTMAX" != "x" ; then
if expr $QTMAX '<' $qt_max_version > /dev/null ; then
qt_max_version=$QTMAX;
fi
fi
# set up our configuration options
qt_dir=""
qt_includes=""
qt_libraries=""
qt_programs=""
AC_ARG_WITH([qt_dir], AC_HELP_STRING([--with-qt-dir=DIR],
[where the Qt package is installed]),
[ qt_dir="$withval"
qt_includes="$withval"/include
qt_libraries="$withval"/lib
qt_programs="$withval"/bin
])
AC_ARG_WITH([qt_includes], AC_HELP_STRING([--with-qt-includes=DIR],
[where the Qt includes are installed]),
[qt_includes="$withval"])
AC_ARG_WITH([qt_libraries], AC_HELP_STRING([--with-qt-libraries=DIR],
[where the Qt libraries are installed]),
[qt_libraries="$withval"])
AC_ARG_WITH([qt_programs], AC_HELP_STRING([--with-qt-programs=DIR],
[where the Qt programs are installed]),
[qt_programs="$withval"])
QTVERSION="000"
FUN_QT_HEADERS
# check for a traditional qt installation tree
if ls $qt_includes/../lib/libqt* > /dev/null 2> /dev/null; then
qt_dir="`echo $qt_includes | sed s,'/include',,`"
qt_libraries="$qt_dir/lib"
qt_programs="$qt_dir/bin"
fi
FUN_QT_LIBRARIES
FUN_QT_PROGRAMS
FUN_QT_COMPILE
AC_MSG_NOTICE([Found Qt version $QTVERSION])
AC_SUBST(QTVERSION)
AC_SUBST(MOC)
AC_SUBST(UIC)
QT_CXXFLAGS="-I$qt_includes"
AC_SUBST(QT_CXXFLAGS)
QT_LDFLAGS="-L$qt_libraries"
AC_SUBST(QT_LDFLAGS)
QT_LIBS="$LIBQT"
AC_SUBST(QT_LIBS)
])#FUN_CHECK_QT
# FUN_QT_HEADERS
# helper function for FUN_CHECK_QT
# check for qt headers in standard locations
AC_DEFUN(FUN_QT_HEADERS,
[
AC_MSG_CHECKING([for Qt headers])
if test "x$qt_includes" = "x" ; then
# look in standard locations
qt_found_dirs=""
qt_include_dirs="
$QTDIR
/usr/include
/usr/local/include
/usr/X11R6/include
`ls -dr /usr/include/qt* 2>/dev/null`
`ls -dr /usr/local/include/qt* 2>/dev/null`
`ls -dr /usr/X11R6/include/qt* 2>/dev/null`
`ls -dr /usr/lib/qt*/include 2>/dev/null`
`ls -dr /usr/local/lib/qt*/include 2>/dev/null`
`ls -dr /usr/X11R6/lib/qt*/include 2>/dev/null`
`ls -dr /usr/local/qt*/include 2>/dev/null`
`ls -dr /opt/qt*/include 2>/dev/null` "
for n in $qt_include_dirs ; do
if test -r "$n/qglobal.h"; then
qt_found_dirs="$qt_found_dirs $n"
fi
done
# find the latest version between min_version and max_version
qt_prev_version=$qt_min_version
qt_found_version=""
for n in $qt_found_dirs ; do
qt_current_version=`grep -w '#define QT_VERSION' $n/qglobal.h |
sed s/'#define QT_VERSION'//`
if expr $qt_current_version '>=' $qt_prev_version > /dev/null ; then
if expr $qt_current_version '<=' $qt_max_version > /dev/null ; then
qt_includes=$n
qt_prev_version=$qt_current_version
fi
fi
done
fi
if test "x$qt_includes" = "x" ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot find correct Qt headers!])
else
dnl TODO need to strip out white space
QTVERSION=$qt_prev_version;
AC_MSG_RESULT([$qt_includes])
fi
])#FUN_QT_HEADERS
# FUN_QT_LIBRARIES
# helper function for FUN_CHECK_QT
# check for qt libs in standard locations
AC_DEFUN(FUN_QT_LIBRARIES,
[
AC_REQUIRE([FUN_QT_HEADERS])
AC_MSG_CHECKING([for Qt libraries])
# check which library to look for
if test -z "$LIBQT" ; then
if test "x$ac_use_threads" = "xyes" ; then
LIBQT="-lqt-mt"
else
LIBQT="-lqt"
fi
fi
lib_qt=`echo $LIBQT | sed s/'-l'//`
if test "x$qt_libraries" = "x" ; then
# see if it is relative to the includes
qt_tree="$qt_includes"
while test "x$qt_tree" != "x" ; do
# first go around will fail...
if ls $qt_tree/lib/libqt* > /dev/null 2> /dev/null ; then
qt_libraries=$qt_tree/lib
break
else
# lop off tail of path
dnl not as portable as it should be...
qt_tree="`dirname $qt_tree`"
fi
done
fi
if test "x$qt_libraries" = "x" ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot find Qt libraries!])
else
# check that we're looking at the right library
if ls $qt_libraries/lib$lib_qt.* > /dev/null 2> /dev/null ; then
AC_MSG_RESULT([$qt_libraries])
else
AC_MSG_RESULT([no])
if test "x$ac_use_threads" = "xyes" ; then
AC_MSG_ERROR([cannot find the threaded Qt library in $qt_libraries!])
else
AC_MSG_ERROR([cannot find the non-threaded Qt library in $qt_libraries!])
fi
fi
fi
])#FUN_QT_LIBRARIES
# FUN_QT_PROGRAMS
# helper function for FUN_CHECK_QT
# searches for moc and uic
AC_DEFUN(FUN_QT_PROGRAMS,
[
AC_REQUIRE([FUN_QT_LIBRARIES])
AC_MSG_CHECKING([for Qt utilities])
if test "x$q_programs" = "x" ; then
# see if it is relative to the libraries
qt_tree="$qt_libraries"
while test "x$qt_tree" != "x" ; do
# first go around will fail
if ls $qt_tree/bin/moc* > /dev/null 2> /dev/null ; then
qt_programs=$qt_tree/bin
break
else
# lop off tail of path
dnl not as portable as it should be...
qt_tree="`dirname $qt_tree`"
fi
done
# if we haven't found the progs, there's not much more we can do
fi
if test "x$qt_programs" = "x" ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot find Qt utilities!])
else
AC_MSG_RESULT([$qt_programs])
# find the right moc
if test -z "$MOC" ; then
AC_CHECK_PROG(MOC, moc, moc)
if test "x$MOC" = "x" ; then
# could be renamed to avoid clashes
if ls $qt_programs/moc > /dev/null 2> /dev/null ; then
MOC="$qt_programs/moc"
else
if expr "$QTVERSION" '>=' "200" > /dev/null ; then
if ls $qt_programs/moc2 > /dev/null 2> /dev/null ; then
MOC="$qt_programs/moc2"
fi
else
if expr "$QTVERSION" '>=' "300" > /dev/null ; then
if $qt_programs/moc3 > /dev/null 2> /dev/null ; then
MOC="$qt_programs/moc3"
fi
fi
fi
fi
fi
if test "x$MOC" = "x" ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot find Qt meta object compiler!])
fi
fi
# find the right uic
if expr "$QTVERSION" '>=' "220" > /dev/null ; then
if test -z "$UIC" ; then
AC_CHECK_PROG(UIC, uic, uic)
if test "x$UIC" = "x" ; then
# could be renamed to avoid clashes
if ls $qt_programs/uic > /dev/null 2> /dev/null ; then
UIC="$qt_programs/uic"
else
if expr "$QTVERSION" '>=' "300" > /dev/null ; then
if ls $qt_programs/uic3 > /dev/null 2> /dev/null ; then
UIC="$qt_programs/uic3"
fi
fi
fi
fi
fi
else
# if uic is important to the build, change this
UIC=""
fi
fi
])#FUN_QT_PROGRAMS
# FUN_QT_COMPILE
# helper function for FUN_CHECK_QT
# compile a simple qt program
AC_DEFUN(FUN_QT_COMPILE,
[
AC_REQUIRE([FUN_QT_HEADERS])
AC_REQUIRE([FUN_QT_LIBRARIES])
AC_REQUIRE([FUN_QT_PROGRAMS])
AC_MSG_CHECKING([whether a simple Qt program compiles])
AC_LANG_PUSH(C++)
ac_cxxflags_save="$CXXFLAGS"
ac_ldflags_save="$LDFLAGS"
ac_libs_save="$LIBS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS -I$qt_includes $X_CFLAGS $all_includes"
LDFLAGS="$LDFLAGS -L$qt_libraries $X_LIBS "
LIBS="$LIBS $PTHREAD_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -lXext -lX11 $LIBQT"
AC_TRY_LINK([
#include <qglobal.h>
#include <qmessagebox.h>
#include <qstring.h>],
[QString s = "hello world";
QMessageBox::information(0, s, "no he is not");
return 0;],
qt_compile=yes, qt_compile=no)
CXXFLAGS="$ac_cxxflags_save"
LDFLAGS="$ac_ldflags_save"
LIBS="$ac_libs_save"
AC_LANG_POP(C++)
if test "x$qt_compile" = "xyes" ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot compile a Qt program!])
fi
])#FUN_QT_COMPILE
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,224 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# List of files which contain translatable strings.
POTFILES = \
hello.cc
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--qt \
--keyword=tr --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format \
--keyword=translate:2 --flag=translate:2:pass-c-format --flag=translate:2:pass-qt-format \
--keyword=QT_TR_NOOP --flag=QT_TR_NOOP:1:pass-c-format --flag=QT_TR_NOOP:1:pass-qt-format \
--keyword=QT_TRANSLATE_NOOP:2 --flag=QT_TRANSLATE_NOOP:2:pass-c-format --flag=QT_TRANSLATE_NOOP:2:pass-qt-format \
--keyword=_ --flag=_:1:pass-c-format --flag=_:1:pass-qt-format \
--keyword=N_ --flag=N_:1:pass-c-format --flag=N_:1:pass-qt-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
localedir = $(datadir)/locale
MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS = @POTFILES_DEPS@
# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
POFILES = @POFILES@
# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
UPDATEPOFILES = @UPDATEPOFILES@
# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
DUMMYPOFILES = @DUMMYPOFILES@
# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).qm)
QMFILES = @QMFILES@
# This is computed as
# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).qm)
CATALOGS = @QTCATALOGS@
SUFFIXES = .po .qm .sed .sin .nop .po-update
.po.qm:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.qm && $(GMSGFMT) -c --qt --statistics -o $${lang}.qm $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.qm && $(GMSGFMT) -c --qt --statistics -o t-$${lang}.qm $${lang}.po && mv t-$${lang}.qm $${lang}.qm
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all-local: all-local-@USE_NLS@
all-local-yes: stamp-po
all-local-no:
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
# been loosely updated. Its purpose is that when a developer or translator
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
# invocations of "make" will do nothing. This timestamp would not be necessary
# if updating the $(CATALOGS) would always touch them; however, the rule for
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
test -z "$(QMFILES)" || $(MAKE) $(QMFILES)
@echo "touch stamp-po"
@echo timestamp > stamp-poT
@mv stamp-poT stamp-po
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
$(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' \
$(POTFILES)
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
install-data-local: install-data-local-@USE_NLS@
install-data-local-no: all-local
install-data-local-yes: all-local
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/locale
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$(pkgdatadir)/locale/$(DOMAIN)_$$cat; \
echo "installing $$realcat as $(DESTDIR)$(pkgdatadir)/locale/$(DOMAIN)_$$cat"; \
done
installdirs-local: installdirs-local-@USE_NLS@
installdirs-local-no:
installdirs-local-yes:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/locale
uninstall-local: uninstall-local-@USE_NLS@
uninstall-local-no:
uninstall-local-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
rm -f $(DESTDIR)$(pkgdatadir)/locale/$(DOMAIN)_$$cat; \
done
html ID:
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += remove-potcdate.sed
MOSTLYCLEANFILES += stamp-poT
MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
MOSTLYCLEANFILES += *.o
MAINTAINERCLEANFILES = stamp-po $(QMFILES)
EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(QMFILES)
# Hidden from automake, but really activated. Works around an automake-1.5 bug.
#distdir: distdir1
distdir1:
$(MAKE) update-po
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(QMFILES)
@:
@@ -0,0 +1,27 @@
# German translations for hello-c++-qt package
# German messages for hello-c++-qt.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-c++-qt package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-c++-qt\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 15:00+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.cc:46
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hello.cc:53
#, qt-format
msgid "This program is running as process number %1."
msgstr "Dieses Programm läuft mit der Prozess-Nummer %1."
+1
View File
@@ -0,0 +1 @@
This example relies on libstdc++, gettext-runtime.
@@ -0,0 +1,31 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_PROGRAMS = hello
# The source files of the 'hello' program.
hello_SOURCES = hello.cc gettext.h
# Define a C macro LOCALEDIR indicating where catalogs will be installed.
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
# Make sure the gettext.h include file is found.
INCLUDES = -I. -I$(srcdir)
# Link time dependencies.
LDADD = @LIBASPRINTF@ @LIBINTL@
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by explicit copy.
rm -f gettext.h
# Brought in by autopoint.
rm -f ABOUT-NLS
rm -f config.rpath
rm -f m4/codeset.m4
rm -f m4/gettext.m4
rm -f m4/glibc21.m4
rm -f m4/iconv.m4
rm -f m4/intdiv0.m4
rm -f m4/inttypes-pri.m4
rm -f m4/inttypes.m4
rm -f m4/inttypes_h.m4
rm -f m4/isc-posix.m4
rm -f m4/lcmessage.m4
rm -f m4/lib-ld.m4
rm -f m4/lib-link.m4
rm -f m4/lib-prefix.m4
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
rm -f m4/stdint_h.m4
rm -f m4/uintmax_t.m4
rm -f m4/ulonglong.m4
rm -f mkinstalldirs
rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f install-sh
rm -f missing
rm -f config.guess
rm -f config.sub
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
test -r ../Makefile.am || . ../installpaths
cp -p ${GETTEXTSRCDIR-../../../gettext-tools/lib}/gettext.h gettext.h
autopoint -f # was: gettextize -f -c
rm po/Makevars.template
rm po/Rules-quot
rm po/boldquot.sed
rm po/en@boldquot.header
rm po/en@quot.header
rm po/insert-header.sin
rm po/quot.sed
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
done
cd ..
@@ -0,0 +1,20 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.cc)
AM_INIT_AUTOMAKE(hello-c++, 0)
AC_PROG_CXX
AC_CHECK_HEADERS([unistd.h])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.12.1)
AC_LIB_LINKFLAGS([asprintf])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
+44
View File
@@ -0,0 +1,44 @@
// Example for use of GNU gettext.
// Copyright (C) 2003 Free Software Foundation, Inc.
// This file is in the public domain.
// Source code of the C++ program.
// Avoid deprecation warnings from g++ 3.1 or newer.
#if defined __GNUG__ && defined __DEPRECATED
# include <iostream>
using namespace std;
#else
# include <iostream.h>
#endif
// Get setlocale() declaration.
#include <locale.h>
// Get getpid() declaration.
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
// Get gettext(), textdomain(), bindtextdomain() declaration.
#include "gettext.h"
// Define shortcut for gettext().
#define _(string) gettext (string)
// Get autosprintf class declaration.
#include "autosprintf.h"
using gnu::autosprintf;
int
main ()
{
setlocale (LC_ALL, "");
textdomain ("hello-c++");
bindtextdomain ("hello-c++", LOCALEDIR);
cout << _("Hello, world!") << endl;
cout << autosprintf (_("This program is running as process number %d."),
getpid ())
<< endl;
}
@@ -0,0 +1,5 @@
EXTRA_DIST = \
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \
inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \
lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
ulonglong.m4
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,44 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--keyword=_ --flag=_:1:pass-c-format \
--keyword=N_ --flag=N_:1:pass-c-format \
--flag=autosprintf:1:c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# List of files which contain translatable strings.
hello.cc
+27
View File
@@ -0,0 +1,27 @@
# German translations for hello-c++ package
# German messages for hello-c++.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-c++ package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-c++\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 14:59+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.cc:40
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hello.cc:41
#, c-format
msgid "This program is running as process number %d."
msgstr "Dieses Programm läuft mit der Prozess-Nummer %d."
@@ -0,0 +1,7 @@
This example relies on:
- the GNOME libraries (libgnomeui, libgnome, libgnomesupport, libart_lgpl)
and their dependencies: imlib (libgdk_imlib), audiofile (libaudiofile),
esound (libesd), zlib (libz).
- the GTK libraries (libgtk, libgdk)
- the glib libraries (libglib, libgmodule)
- the X11 libraries
@@ -0,0 +1,31 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_PROGRAMS = hello
# The source files of the 'hello' program.
hello_SOURCES = hello.c
# Define a C macro LOCALEDIR indicating where catalogs will be installed.
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
# Make sure the gnome.h include file is found.
INCLUDES = $(GNOME_INCLUDEDIR)
# Link time dependencies.
LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) @LIBINTL@
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+51
View File
@@ -0,0 +1,51 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by autopoint.
rm -f ABOUT-NLS
rm -f config.rpath
rm -f m4/codeset.m4
rm -f m4/gettext.m4
rm -f m4/glibc21.m4
rm -f m4/iconv.m4
rm -f m4/intdiv0.m4
rm -f m4/inttypes-pri.m4
rm -f m4/inttypes.m4
rm -f m4/inttypes_h.m4
rm -f m4/isc-posix.m4
rm -f m4/lcmessage.m4
rm -f m4/lib-ld.m4
rm -f m4/lib-link.m4
rm -f m4/lib-prefix.m4
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
rm -f m4/stdint_h.m4
rm -f m4/uintmax_t.m4
rm -f m4/ulonglong.m4
rm -f mkinstalldirs
rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f install-sh
rm -f missing
rm -f config.guess
rm -f config.sub
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
autopoint -f # was: gettextize -f -c
rm po/Makevars.template
rm po/Rules-quot
rm po/boldquot.sed
rm po/en@boldquot.header
rm po/en@quot.header
rm po/insert-header.sin
rm po/quot.sed
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
fi
done
cd ..
@@ -0,0 +1,20 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.c)
AM_INIT_AUTOMAKE(hello-c-gnome, 0)
AC_PROG_CC
GNOME_INIT
AC_CHECK_HEADERS([unistd.h])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.12.1)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
@@ -0,0 +1,88 @@
/* Example for use of GNU gettext.
Copyright (C) 2003 Free Software Foundation, Inc.
This file is in the public domain.
Source code of the C program. */
/* Get GNOME declarations. */
#include <gnome.h>
/* Get getpid() declaration. */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
static void
quit_callback (GtkWidget *widget, void *data)
{
gtk_main_quit ();
}
int
main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *panel;
GtkWidget *label1;
GtkWidget *label1aligned;
GtkWidget *label2;
GtkWidget *label2aligned;
GtkWidget *button;
GtkWidget *buttonbar;
/* Initializations. */
gnome_init (PACKAGE, VERSION, argc, argv);
textdomain ("hello-c-gnome");
bindtextdomain ("hello-c-gnome", LOCALEDIR);
/* Create the GUI elements. */
window = gnome_app_new ("hello-c-gnome", "Hello example");
gtk_widget_realize (window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (quit_callback), NULL);
label1 = gtk_label_new (_("Hello, world!"));
label1aligned = gtk_alignment_new (0.0, 0.5, 0, 0);
gtk_container_add (GTK_CONTAINER (label1aligned), label1);
label2 = gtk_label_new (g_strdup_printf (_("This program is running as process number %d."), getpid ()));
label2aligned = gtk_alignment_new (0.0, 0.5, 0, 0);
gtk_container_add (GTK_CONTAINER (label2aligned), label2);
button = gtk_button_new_with_label ("OK");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (quit_callback), NULL);
buttonbar = gtk_hbutton_box_new ();
gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbar), GTK_BUTTONBOX_END);
gtk_box_pack_start_defaults (GTK_BOX (buttonbar), button);
panel = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
gtk_box_pack_start_defaults (GTK_BOX (panel), label1aligned);
gtk_box_pack_start_defaults (GTK_BOX (panel), label2aligned);
gtk_box_pack_start_defaults (GTK_BOX (panel), buttonbar);
gnome_app_set_contents (GNOME_APP (window), panel);
/* Make the GUI elements visible. */
gtk_widget_show (label1);
gtk_widget_show (label1aligned);
gtk_widget_show (label2);
gtk_widget_show (label2aligned);
gtk_widget_show (button);
gtk_widget_show (buttonbar);
gtk_widget_show (panel);
gtk_widget_show (window);
/* Start the event loop. */
gtk_main ();
return 0;
}
@@ -0,0 +1,6 @@
EXTRA_DIST = \
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \
inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \
lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
ulonglong.m4 \
gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4
@@ -0,0 +1,35 @@
dnl
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
dnl
dnl if failflag is "failure" it aborts if gnorba is not found.
dnl
AC_DEFUN([GNOME_GNORBA_HOOK],[
GNOME_ORBIT_HOOK([],$2)
AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
gnome_cv_gnorba_found=no
if test x$gnome_cv_orbit_found = xyes; then
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
if test -n "$GNORBA_LIBS"; then
gnome_cv_gnorba_found=yes
fi
fi
])
AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
if test x$gnome_cv_orbit_found = xyes; then
$1
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
AC_SUBST(GNORBA_CFLAGS)
AC_SUBST(GNORBA_LIBS)
else
if test x$2 = xfailure; then
AC_MSG_ERROR(gnorba library not installed or installation problem)
fi
fi
])
AC_DEFUN([GNOME_GNORBA_CHECK], [
GNOME_GNORBA_HOOK([],failure)
])
@@ -0,0 +1,33 @@
dnl
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
dnl
dnl if failflag is "failure" it aborts if orbit is not found.
dnl
AC_DEFUN([GNOME_ORBIT_HOOK],[
AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
gnome_cv_orbit_found=no
else
gnome_cv_orbit_found=yes
fi
])
AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
if test x$gnome_cv_orbit_found = xyes; then
$1
ORBIT_CFLAGS=`orbit-config --cflags client server`
ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
AC_SUBST(ORBIT_CFLAGS)
AC_SUBST(ORBIT_LIBS)
else
if test x$2 = xfailure; then
AC_MSG_ERROR(ORBit not installed or installation problem)
fi
fi
])
AC_DEFUN([GNOME_ORBIT_CHECK], [
GNOME_ORBIT_HOOK([],failure)
])
@@ -0,0 +1,128 @@
dnl
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
dnl
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
dnl is not found.
dnl
AC_DEFUN([GNOME_INIT_HOOK],[
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOMEUI_LIBS)
AC_SUBST(GNOMEGNORBA_LIBS)
AC_SUBST(GTKXMHTML_LIBS)
AC_SUBST(ZVT_LIBS)
AC_SUBST(GNOME_LIBDIR)
AC_SUBST(GNOME_INCLUDEDIR)
AC_ARG_WITH(gnome-includes,
[ --with-gnome-includes Specify location of GNOME headers],[
CFLAGS="$CFLAGS -I$withval"
])
AC_ARG_WITH(gnome-libs,
[ --with-gnome-libs Specify location of GNOME libs],[
LDFLAGS="$LDFLAGS -L$withval"
gnome_prefix=$withval
])
AC_ARG_WITH(gnome,
[ --with-gnome Specify prefix for GNOME files],
if test x$withval = xyes; then
want_gnome=yes
dnl Note that an empty true branch is not
dnl valid sh syntax.
ifelse([$1], [], :, [$1])
else
if test "x$withval" = xno; then
want_gnome=no
else
want_gnome=yes
LDFLAGS="$LDFLAGS -L$withval/lib"
CFLAGS="$CFLAGS -I$withval/include"
gnome_prefix=$withval/lib
fi
fi,
want_gnome=yes)
if test "x$want_gnome" = xyes; then
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
if test "$GNOME_CONFIG" = "no"; then
no_gnome_config="yes"
else
AC_MSG_CHECKING(if $GNOME_CONFIG works)
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
GNOME_GNORBA_HOOK([],$2)
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
$1
else
AC_MSG_RESULT(no)
no_gnome_config="yes"
fi
fi
if test x$exec_prefix = xNONE; then
if test x$prefix = xNONE; then
gnome_prefix=$ac_default_prefix/lib
else
gnome_prefix=$prefix/lib
fi
else
gnome_prefix=`eval echo \`echo $libdir\``
fi
if test "$no_gnome_config" = "yes"; then
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
if test -f $gnome_prefix/gnomeConf.sh; then
AC_MSG_RESULT(found)
echo "loading gnome configuration from" \
"$gnome_prefix/gnomeConf.sh"
. $gnome_prefix/gnomeConf.sh
$1
else
AC_MSG_RESULT(not found)
if test x$2 = xfail; then
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
fi
fi
fi
fi
if test -n "$3"; then
n="$3"
for i in $n; do
AC_MSG_CHECKING(extra library \"$i\")
case $i in
applets)
AC_SUBST(GNOME_APPLETS_LIBS)
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
docklets)
AC_SUBST(GNOME_DOCKLETS_LIBS)
GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
capplet)
AC_SUBST(GNOME_CAPPLET_LIBS)
GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
*)
AC_MSG_RESULT(unknown library)
esac
done
fi
])
dnl
dnl GNOME_INIT ([additional-inits])
dnl
AC_DEFUN([GNOME_INIT],[
GNOME_INIT_HOOK([],fail,$1)
])
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,55 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--keyword=_ --flag=_:1:pass-c-format \
--keyword=N_ --flag=N_:1:pass-c-format \
--flag=g_log:3:c-format --flag=g_logv:3:c-format \
--flag=g_error:1:c-format --flag=g_message:1:c-format \
--flag=g_critical:1:c-format --flag=g_warning:1:c-format \
--flag=g_print:1:c-format \
--flag=g_printerr:1:c-format \
--flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \
--flag=g_printf_string_upper_bound:1:c-format \
--flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \
--flag=g_string_sprintf:2:c-format \
--flag=g_string_sprintfa:2:c-format \
--flag=g_scanner_error:2:c-format \
--flag=g_scanner_warn:2:c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# List of files which contain translatable strings.
hello.c
@@ -0,0 +1,27 @@
# German translations for hello-c-gnome package
# German messages for hello-c-gnome.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-c-gnome package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-c-gnome\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 14:59+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.c:47
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hello.c:52
#, c-format
msgid "This program is running as process number %d."
msgstr "Dieses Programm läuft mit der Prozess-Nummer %d."
+1
View File
@@ -0,0 +1 @@
This example relies just on gettext-runtime (and libc, of course).
@@ -0,0 +1,31 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign no-dependencies
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_PROGRAMS = hello
# The source files of the 'hello' program.
hello_SOURCES = hello.c gettext.h
# Define a C macro LOCALEDIR indicating where catalogs will be installed.
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
# Make sure the gettext.h include file is found.
INCLUDES = -I. -I$(srcdir)
# Link time dependencies.
LDADD = @LIBINTL@
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by explicit copy.
rm -f gettext.h
# Brought in by autopoint.
rm -f ABOUT-NLS
rm -f config.rpath
rm -f m4/codeset.m4
rm -f m4/gettext.m4
rm -f m4/glibc21.m4
rm -f m4/iconv.m4
rm -f m4/intdiv0.m4
rm -f m4/inttypes-pri.m4
rm -f m4/inttypes.m4
rm -f m4/inttypes_h.m4
rm -f m4/isc-posix.m4
rm -f m4/lcmessage.m4
rm -f m4/lib-ld.m4
rm -f m4/lib-link.m4
rm -f m4/lib-prefix.m4
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f m4/progtest.m4
rm -f m4/stdint_h.m4
rm -f m4/uintmax_t.m4
rm -f m4/ulonglong.m4
rm -f mkinstalldirs
rm -f po/Makefile.in.in
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f install-sh
rm -f missing
rm -f config.guess
rm -f config.sub
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
test -r ../Makefile.am || . ../installpaths
cp -p ${GETTEXTSRCDIR-../../../gettext-tools/lib}/gettext.h gettext.h
autopoint -f # was: gettextize -f -c
rm po/Makevars.template
rm po/Rules-quot
rm po/boldquot.sed
rm po/en@boldquot.header
rm po/en@quot.header
rm po/insert-header.sin
rm po/quot.sed
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
fi
done
cd ..
@@ -0,0 +1,19 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.c)
AM_INIT_AUTOMAKE(hello-c, 0)
AC_PROG_CC
AC_CHECK_HEADERS([unistd.h])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.12.1)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
+36
View File
@@ -0,0 +1,36 @@
/* Example for use of GNU gettext.
Copyright (C) 2003 Free Software Foundation, Inc.
This file is in the public domain.
Source code of the C program. */
/* Get setlocale() declaration. */
#include <locale.h>
/* Get printf() declaration. */
#include <stdio.h>
/* Get getpid() declaration. */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
/* Get gettext(), textdomain(), bindtextdomain() declaration. */
#include "gettext.h"
/* Define shortcut for gettext(). */
#define _(string) gettext (string)
int
main ()
{
setlocale (LC_ALL, "");
textdomain ("hello-c");
bindtextdomain ("hello-c", LOCALEDIR);
printf ("%s\n", _("Hello, world!"));
printf (_("This program is running as process number %d."), getpid ());
putchar ('\n');
return 0;
}
@@ -0,0 +1,5 @@
EXTRA_DIST = \
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 \
inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 \
lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
ulonglong.m4
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,43 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--keyword=_ --flag=_:1:pass-c-format \
--keyword=N_ --flag=N_:1:pass-c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# List of files which contain translatable strings.
hello.c
+27
View File
@@ -0,0 +1,27 @@
# German translations for hello-c package
# German messages for hello-c.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-c package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-c\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 14:59+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.c:31
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hello.c:32
#, c-format
msgid "This program is running as process number %d."
msgstr "Dieses Programm läuft mit der Prozess-Nummer %d."
@@ -0,0 +1 @@
This example relies on clisp (GNU clisp).
@@ -0,0 +1,30 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_SCRIPTS = hello
# Compilation of Common Lisp programs.
SUFFIXES = .lisp .fas
.lisp.fas:
clisp -norc -q -c $< -o $@
CLEANFILES = *.fas *.lib
# Making a Common Lisp program executable.
hello: hello.fas
(echo '#!@CLISP@'; cat $<) > $@
chmod a+x $@
CLEANFILES += hello
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by explicit copy.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f po/Makefile.in
rm -f install-sh
rm -f mkinstalldirs
rm -f missing
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
test -r ../Makefile.am || . ../installpaths
cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
fi
done
cd ..
@@ -0,0 +1,39 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.lisp.in)
AM_INIT_AUTOMAKE(hello-clisp, 0)
dnl Check for availability of the Lisp system.
AC_PATH_PROG(CLISP, clisp)
if test -z "$CLISP"; then
echo "*** Essential program clisp not found" 1>&2
exit 1
fi
AC_SUBST(CLISP)
dnl The installed program must know where to find its message catalogs.
dnl Unfortunately, prefix gets only finally determined at the end of configure.
if test "X$prefix" = "XNONE"; then
final_prefix="$ac_default_prefix"
else
final_prefix="$prefix"
fi
save_prefix="$prefix"
prefix="$final_prefix"
eval "localedir=\"${datadir}/locale\""
prefix="$save_prefix"
AC_SUBST(localedir)
dnl Support for the po directory.
AM_NLS
AM_PO_SUBDIRS
AC_CONFIG_FILES([Makefile hello.lisp])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE])
AC_OUTPUT
@@ -0,0 +1,16 @@
#| Example for use of GNU gettext.
Copyright (C) 2003 Free Software Foundation, Inc.
This file is in the public domain.
Source code of the GNU clisp program.
|#
(setf (i18n:textdomain) "hello-clisp")
(setf (i18n:textdomaindir "hello-clisp") "@localedir@/")
(defmacro _ (string) `(i18n:gettext ,string))
(write-line (_ "Hello, world!"))
(format t (_ "This program is running as process number ~D.")
(system::program-id))
(terpri)
@@ -0,0 +1,2 @@
EXTRA_DIST = \
nls.m4 po.m4
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de
@@ -0,0 +1,291 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# List of files which contain translatable strings.
POTFILES = \
hello.lisp.in
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --flag=_:1:pass-lisp-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Yoyodyne, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
localedir = $(datadir)/locale
MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS = @POTFILES_DEPS@
# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
POFILES = @POFILES@
# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
GMOFILES = @GMOFILES@
# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
UPDATEPOFILES = @UPDATEPOFILES@
# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
DUMMYPOFILES = @DUMMYPOFILES@
# This is computed as
# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
CATALOGS = @CATALOGS@
SUFFIXES = .po .gmo .mo .sed .sin .nop .po-update
.po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all-local: all-local-@USE_NLS@
all-local-yes: stamp-po
all-local-no:
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
# been loosely updated. Its purpose is that when a developer or translator
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
# invocations of "make" will do nothing. This timestamp would not be necessary
# if updating the $(CATALOGS) would always touch them; however, the rule for
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@echo "touch stamp-po"
@echo timestamp > stamp-poT
@mv stamp-poT stamp-po
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
$(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' \
$(POTFILES)
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
install-data-local: install-data-local-@USE_NLS@
install-data-local-no: all-local
install-data-local-yes: all-local
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
fi; \
done; \
done
installdirs-local: installdirs-local-@USE_NLS@
installdirs-local-no:
installdirs-local-yes:
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
fi; \
done; \
done
uninstall-local: uninstall-local-@USE_NLS@
uninstall-local-no:
uninstall-local-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
done; \
done
html ID:
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += remove-potcdate.sed
MOSTLYCLEANFILES += stamp-poT
MOSTLYCLEANFILES += core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
MOSTLYCLEANFILES += *.o
DISTCLEANFILES = *.mo
MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
EXTRA_DIST = remove-potcdate.sin LINGUAS $(DOMAIN).pot stamp-po $(POFILES) $(GMOFILES)
# Hidden from automake, but really activated. Works around an automake-1.5 bug.
#distdir: distdir1
distdir1:
$(MAKE) update-po
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
@@ -0,0 +1,27 @@
# German translations for hello-clisp package
# German messages for hello-clisp.
# Copyright (C) 2003 Yoyodyne, Inc.
# This file is distributed under the same license as the hello-clisp package.
# Bruno Haible <bruno@clisp.org>, 2003.
#
msgid ""
msgstr ""
"Project-Id-Version: hello-clisp\n"
"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
"POT-Creation-Date: 2003-11-15 15:02+0100\n"
"PO-Revision-Date: 2003-11-15 01:25+0100\n"
"Last-Translator: Bruno Haible <bruno@clisp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hello.lisp.in:12
msgid "Hello, world!"
msgstr "Hallo Welt!"
#: hello.lisp.in:14
#, lisp-format
msgid "This program is running as process number ~D."
msgstr "Dieses Programm läuft mit der Prozess-Nummer ~D."
@@ -0,0 +1 @@
This example relies on gawk (GNU awk).
@@ -0,0 +1,18 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Makefile configuration - processed by automake.
# General automake options.
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
# The list of subdirectories containing Makefiles.
SUBDIRS = m4 po
# The list of programs that are built.
bin_SCRIPTS = hello
# Additional files to be distributed.
EXTRA_DIST = autogen.sh autoclean.sh
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for cleaning all autogenerated files.
test ! -f Makefile || make distclean
# Brought in by explicit copy.
rm -f m4/nls.m4
rm -f m4/po.m4
rm -f po/remove-potcdate.sin
# Generated by aclocal.
rm -f aclocal.m4
# Generated by autoconf.
rm -f configure
# Generated or brought in by automake.
rm -f Makefile.in
rm -f m4/Makefile.in
rm -f po/Makefile.in
rm -f install-sh
rm -f mkinstalldirs
rm -f missing
rm -f po/*.pot
rm -f po/stamp-po
rm -f po/*.gmo
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Script for regenerating all autogenerated files.
test -r ../Makefile.am || . ../installpaths
cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
aclocal -I m4
autoconf
automake -a -c
cd po
for f in *.po; do
if test -r "$f"; then
lang=`echo $f | sed -e 's,\.po$,,'`
msgfmt -c -o $lang.gmo $lang.po
fi
done
cd ..
@@ -0,0 +1,40 @@
dnl Example for use of GNU gettext.
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is in the public domain.
dnl
dnl Configuration file - processed by autoconf.
AC_INIT
AC_CONFIG_SRCDIR(hello.awk)
AM_INIT_AUTOMAKE(hello-gawk, 0)
dnl Check for availability of GNU awk.
AC_PATH_PROG(GAWK, gawk)
if test -z "$GAWK"; then
echo "*** Essential program gawk not found" 1>&2
exit 1
fi
AC_SUBST(GAWK)
dnl The installed program must know where to find its message catalogs.
dnl Unfortunately, prefix gets only finally determined at the end of configure.
if test "X$prefix" = "XNONE"; then
final_prefix="$ac_default_prefix"
else
final_prefix="$prefix"
fi
save_prefix="$prefix"
prefix="$final_prefix"
eval "localedir=\"${datadir}/locale\""
prefix="$save_prefix"
AC_SUBST(localedir)
dnl Support for the po directory.
AM_NLS
AM_PO_SUBDIRS
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([hello:hello.awk], [chmod a+x hello])
AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE])
AC_OUTPUT
@@ -0,0 +1,15 @@
#!@GAWK@ -f
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Source code of the GNU awk program.
BEGIN {
TEXTDOMAIN = "hello-gawk"
bindtextdomain ("@localedir@")
print _"Hello, world!"
printf _"This program is running as process number %d.", PROCINFO["pid"]
print
}
@@ -0,0 +1,2 @@
EXTRA_DIST = \
nls.m4 po.m4
@@ -0,0 +1,6 @@
# Example for use of GNU gettext.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is in the public domain.
#
# Set of available languages.
de

Some files were not shown because too many files have changed in this diff Show More