From: Alexey Gladkov Date: Fri, 30 Nov 2007 09:56:25 +0000 (+0300) Subject: Migrate to autoconf X-Git-Tag: 2.0.2~225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9f205755a24db8355e9d773f653fe98c9c16229;p=platform%2Fupstream%2Fkbd.git Migrate to autoconf Signed-off-by: Alexey Gladkov --- diff --git a/CHANGES b/CHANGES index 409cf7f..adf1c46 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,22 @@ +Changes for 1.14 (legion) + +o Use autoconf. +o Build system: + - Add --enable-nls option. + - Add --enable-samples option. +o Keymaps: + - Add more romanian keymaps (Vitezslav Crhonek) + - Add another ukrainian keymap + - Add Belarusian (Belarus) keymaps + - Add Kazakh keymap + - Add Kyrgyz keymap + - Add Bashkir (Russia) keymap + - Add Tatar keymaps + - Add more russian keymaps +o Fonts: + - Add unicode fonts (UniCyrExt_8x16.psf, UniCyr_8x14.psf, UniCyr_8x16.psf, + UniCyr_8x8.psf) + Changes for 1.13 o Programs: diff --git a/Makefile b/Makefile deleted file mode 100644 index c2c292f..0000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - @echo "Please run ./configure first" diff --git a/Makefile.in b/Makefile.in index 3cb5a57..11f04cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,53 +1,23 @@ -# Note: BINDIR, DATA_DIR, and DESTDIR also occur in src/Makefile. -# Note: The binaries, manpages, data files and messages will eventually be -# installed under @prefix@/bin, @mandir@, @datadir@ and @prefix@/share, -# respectively; these locations are all prefixed with $(DESTDIR) -# which can be used, e.g. to build a binary package. -DATA_DIR = @datadir@ -MAN_DIR = @mandir@ -BINDIR = $(DESTDIR)@prefix@/bin -DATADIR = $(DESTDIR)/$(DATA_DIR) -MANDIR = $(DESTDIR)/$(MAN_DIR) -# If you change the names of any of the following subdirs, -# also change paths.h. -OLDKEYMAPDIR = keytables -KEYMAPDIR = keymaps -UNIMAPDIR = unimaps -FONTDIR = consolefonts -PARTIALDIR= partialfonts -TRANSDIR = consoletrans -KEYMAPSUBDIRS = include sun amiga atari i386/azerty i386/dvorak i386/fgGIod i386/qwerty i386/qwertz i386/include mac/include mac/all - -# Do not use GZIP - it is interpreted by gzip -MYGZIP = gzip -f -9 - -SUBDIRS = src openvt po - -.EXPORT_ALL_VARIABLES: +SUBDIRS = src openvt po data man all: - for i in $(SUBDIRS) data; do $(MAKE) -C $$i all || exit 1; done - @echo - @echo "Done. You can now do make install" + for i in $(SUBDIRS); do $(MAKE) -C $$i all || exit 1; done -install: install-progs install-data install-man +install: install-progs install-data install-man install-progs: for i in $(SUBDIRS); do $(MAKE) -C $$i install || exit 1; done install-man: - cd man && $(MAKE) install + $(MAKE) -C man install install-data: - cd data && $(MAKE) install + $(MAKE) -C data install clean: for i in $(SUBDIRS); do $(MAKE) -C $$i clean || exit 1; done - cd man && $(MAKE) clean - cd data && $(MAKE) clean reallyclean distclean spotless: clean find . -name "*~" -exec rm {} ";" for i in $(SUBDIRS); do $(MAKE) -C $$i distclean || exit 1; done - rm -f Makefile src/Makefile make_include defines.h - cp Makefile.x Makefile + rm -f config.h Makefile configure config.status config.log diff --git a/Makefile.x b/Makefile.x deleted file mode 100644 index c2c292f..0000000 --- a/Makefile.x +++ /dev/null @@ -1,2 +0,0 @@ -all: - @echo "Please run ./configure first" diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..4deaa5c --- /dev/null +++ b/config.h.in @@ -0,0 +1,198 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* NLS support */ +#undef ENABLE_NLS + +/* Define to 1 if the `closedir' function returns void instead of `int'. */ +#undef CLOSEDIR_VOID + +/* Define to 1 if you have the `alarm' function. */ +#undef HAVE_ALARM + +/* Define to 1 if your system has a working `chown' function. */ +#undef HAVE_CHOWN + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBINTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#undef HAVE_REALLOC + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +#undef HAVE_STAT_EMPTY_STRING_BUG + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#undef LSTAT_FOLLOWS_SLASHED_SYMLINK + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if the `setpgrp' function takes no argument. */ +#undef SETPGRP_VOID + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to rpl_realloc if the replacement function should be used. */ +#undef realloc + +/* Define to `unsigned' if does not define. */ +#undef size_t + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork diff --git a/configure b/configure deleted file mode 100755 index 836d939..0000000 --- a/configure +++ /dev/null @@ -1,198 +0,0 @@ -#!/bin/sh -# -# Call: -# ./configure [--datadir=DATADIR] [--mandir=MANDIR] [--disable-nls] -# -# Where shall we store our stuff? -# Old default: /usr/lib/kbd -# New default: /usr/share/kbd -# - -prefix= -datadir= -mandir= -nls=1 - -for arg in $*; do - case "$arg" in - -*=*) optarg=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case "$arg" in - --da*) - datadir=$optarg - ;; - --di*) - nls=0 - ;; - --ma*) - mandir=$optarg - ;; - --pr*) - prefix=$optarg - ;; - *) - echo "usage: configure [--prefix=PREFIXDIR] [--datadir=DATADIR] [--mandir=MANDIR]" - exit 1 - ;; - esac -done - -if [ x$prefix = x ]; then - # the default case - don't bother the user with messages - prefix=/usr -else - case "$prefix" in - /*) - echo "Configuring for PREFIX=$prefix" - ;; - *) - echo "PREFIX must have a leading slash" - exit 1 - ;; - esac -fi - -if [ x$datadir = x ]; then - if [ -d $prefix/lib/kbd ]; then - datadir=$prefix/lib/kbd - elif [ -d $prefix/share/consolefonts ]; then - datadir=$prefix/share - elif [ -d $prefix/share ]; then - datadir=$prefix/share/kbd - else - datadir=$prefix/lib/kbd - fi -else - case "$datadir" in - /*) - datadir="$datadir" - echo "Configuring for DATADIR=$datadir" - ;; - *) - echo "DATADIR must have a leading slash" - exit 1 - ;; - esac -fi - -if [ x$mandir = x ]; then - if [ -d $prefix/share/man ]; then - mandir=$prefix/share/man - else - mandir=$prefix/man - fi -else - case "$mandir" in - /*) - mandir="$mandir" - echo "Configuring for MANDIR=$mandir" - ;; - *) - echo "MANDIR must have a leading slash" - exit 1 - ;; - esac -fi - -for i in Makefile src/Makefile po/Makefile man/man1/dumpkeys.1 man/man1/loadkeys.1 man/man8/setfont.8 man/man8/loadunimap.8 man/man8/mapscrn.8; do - sed -e " -s,@datadir@,$datadir, -s,@mandir@,$mandir, -s,@prefix@,$prefix, -" $i.in > $i -done - -rm -f defines.h make_include - -# Next, figure out some things about the environment -# Things taken from util-linux configure - -if test "$RANDOM" = "$RANDOM"; then - # Plain old Bourne shell. - echo checking for gcc - test -z "$CC" -a -n "`gcc 2>&1`" && CC="gcc -O" -else - # ksh, bash or zsh. ksh and zsh write "command not found" to stderr. - echo checking for gcc - test -z "$CC" && type gcc && CC="gcc -O" -fi - -CC=${CC-cc} -CFLAGS=${CFLAGS-"-O"} -compile="$CC $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1" -static_compile="$CC -static $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1" - -rm -f conftest.c conftest - -# -# 0. Figure out architecture (one of i386, alpha, sparc, arm, m68k, mips) -# -ARCH=`uname -m | sed s/i.86/i386/` -echo "ARCH=$ARCH" >> make_include - -# -# 1. Do we have ? -# -echo " -#include -main(){ exit(0); } -" > conftest.c -eval $compile -if test -s conftest && ./conftest 2>/dev/null; then - echo "#define HAVE_locale_h" >> defines.h - echo "You have " -else - echo "You don't have " -fi -rm -f conftest conftest.c - -# -# 2. For lib/nls.h: do we have and gettext() ? -# -echo ' -#include -main(int a, char **v){ - if (a == -1) /* false */ - gettext("There is no gettext man page\n"); - exit(0); -} -' > conftest.c -eval $compile -if [ $nls = 1 ]; then - if test -s conftest && ./conftest 2>/dev/null; then - echo '#define HAVE_libintl_h' >> defines.h - echo "You have and gettext()" - echo '#define ENABLE_NLS' >> defines.h - echo "Assuming that you want to enable NLS support." - echo "(Otherwise, edit defines.h and delete the line with ENABLE_NLS)" - ENABLE_NLS=yes - else - echo "You don't have and gettext()" - ENABLE_NLS=no - fi -else - echo "NLS disabled" - ENABLE_NLS=no -fi -rm -f conftest conftest.c - - -# -# 3. Does xgettext exist and take the option --foreign-user? -# -if (test $ENABLE_NLS = yes && type xgettext > /dev/null 2>&1); then - msg=`xgettext --foreign-user 2>&1 | grep unrecognized` - if test -n "$msg"; then - echo "FOREIGN = " >> make_include - else - echo "FOREIGN = --foreign-user" >> make_include - fi - echo "HAVE_XGETTEXT=yes" >> make_include -else - echo "HAVE_XGETTEXT=no" >> make_include -fi - -echo -echo "Done. You can run make now." diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..9ba805a --- /dev/null +++ b/configure.ac @@ -0,0 +1,79 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT(kbd, 1.14, legion@altlinux.org) +AC_CONFIG_SRCDIR([src/showkey.c]) +AC_CONFIG_HEADERS(config.h) + +# Checks for programs. +AC_PROG_YACC +AC_PROG_CC +AC_PROG_LEX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([fcntl.h libintl.h locale.h memory.h stdlib.h string.h \ +sys/file.h sys/ioctl.h termios.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_STRUCT_TM +AC_TYPE_UID_T + +# Checks for library functions. +AC_FUNC_CHOWN +AC_FUNC_CLOSEDIR_VOID +AC_FUNC_FORK +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_FUNC_SETPGRP +AC_TYPE_SIGNAL +AC_FUNC_STAT +AC_CHECK_FUNCS([alarm memset setlocale strcasecmp strchr strdup strerror \ +strspn strstr strtol strtoul]) + +OPTIONAL_PROGS= +AC_ARG_ENABLE(samples, AS_HELP_STRING(--enable-samples, [Build and install a simple programs]), + [OPTIONAL_PROGS=1]) +AC_SUBST(OPTIONAL_PROGS) + +# For lib/nls.h: do we have and gettext() ? + +AC_ARG_ENABLE(nls, AS_HELP_STRING(--enable-nls, [NLS support]), + [enable_nls=1], [enable_nls=]) + +if test "$enable_nls" = "1"; then + AC_DEFINE(ENABLE_NLS) +fi + +# Does xgettext exist and take the option --foreign-user? +FOREIGN= +HAVE_XGETTEXT=no +if (test "$enable_nls" = "1" && type xgettext > /dev/null 2>&1); then + msg=`xgettext --foreign-user 2>&1 | grep unrecognized` + if test -z "$msg"; then + FOREIGN="--foreign-user" + fi + HAVE_XGETTEXT=yes +fi +AC_SUBST(FOREIGN) +AC_SUBST(HAVE_XGETTEXT) + +AC_CONFIG_FILES([Makefile + data/Makefile + man/Makefile + openvt/Makefile + po/Makefile + src/Makefile]) +AC_OUTPUT diff --git a/data/Makefile b/data/Makefile deleted file mode 100644 index 3bafa09..0000000 --- a/data/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -all: $(KEYMAPDIR)_Z $(FONTDIR)_Z - -install: all - install -d -m 755 $(DATADIR) - install -d -m 755 $(DATADIR)/$(FONTDIR) - install -m 644 $(FONTDIR)_Z/* $(DATADIR)/$(FONTDIR) - install -d -m 755 $(DATADIR)/$(FONTDIR)/$(PARTIALDIR) - install -m 644 $(PARTIALDIR)_Z/* $(DATADIR)/$(FONTDIR)/$(PARTIALDIR) - install -d -m 755 $(DATADIR)/$(TRANSDIR) - install -m 644 $(TRANSDIR)/* $(DATADIR)/$(TRANSDIR) - install -d -m 755 $(DATADIR)/$(UNIMAPDIR) - install -m 644 $(UNIMAPDIR)/* $(DATADIR)/$(UNIMAPDIR) - install -d -m 755 $(DATADIR)/$(KEYMAPDIR) - install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/i386 - install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/mac - for i in $(KEYMAPSUBDIRS); do \ - install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/$$i ;\ - install -m 644 $(KEYMAPDIR)_Z/$$i/* $(DATADIR)/$(KEYMAPDIR)/$$i ;\ - done - rm -f $(DATADIR)/$(KEYMAPDIR)/ppc; ln -s mac $(DATADIR)/$(KEYMAPDIR)/ppc - @if [ -f $(DATADIR)/$(OLDKEYMAPDIR) ]; then \ - echo "Done. You may want to remove old keymaps with" ; \ - echo " rm -rf $(DATADIR)/$(OLDKEYMAPDIR)" ; \ - echo "But be careful to preserve your default map if it is" ; \ - echo "nonstandard, and to adapt any scripts in rc.local or so." ; \ - fi - - -# compress data files - do not touch the distribution but copy first -$(KEYMAPDIR)_Z: - cp -r $(KEYMAPDIR) $(KEYMAPDIR)_Z - cd $(KEYMAPDIR)_Z && $(MYGZIP) */*.map */*/*.map - -$(FONTDIR)_Z: - cp -r $(FONTDIR) $(FONTDIR)_Z - cp -r $(PARTIALDIR) $(PARTIALDIR)_Z - cd $(FONTDIR)_Z && $(MYGZIP) * && gunzip ERRORS* README* - cd $(PARTIALDIR)_Z && $(MYGZIP) * -# (not yet screenmaps - some other time) - -clean: - rm -rf $(KEYMAPDIR)_Z $(FONTDIR)_Z $(PARTIALDIR)_Z diff --git a/data/Makefile.in b/data/Makefile.in new file mode 100644 index 0000000..8cada74 --- /dev/null +++ b/data/Makefile.in @@ -0,0 +1,64 @@ +prefix = @prefix@ +datadir = @datadir@ + +# If you change the names of any of the following subdirs, +# also change paths.h. +OLDKEYMAPDIR = keytables +KEYMAPDIR = keymaps +UNIMAPDIR = unimaps +FONTDIR = consolefonts +PARTIALDIR = partialfonts +TRANSDIR = consoletrans + +KEYMAPSUBDIRS = include sun amiga atari i386/azerty i386/dvorak \ + i386/fgGIod i386/qwerty i386/qwertz i386/include mac/include mac/all + + +# Do not use GZIP - it is interpreted by gzip +MYGZIP = gzip -f -9 + +all: $(KEYMAPDIR)_Z $(FONTDIR)_Z + +install: all + install -d -m 755 $(datadir) + install -d -m 755 $(datadir)/$(FONTDIR) + install -m 644 $(FONTDIR)_Z/* $(datadir)/$(FONTDIR) + install -d -m 755 $(datadir)/$(FONTDIR)/$(PARTIALDIR) + install -m 644 $(PARTIALDIR)_Z/* $(datadir)/$(FONTDIR)/$(PARTIALDIR) + install -d -m 755 $(datadir)/$(TRANSDIR) + install -m 644 $(TRANSDIR)/* $(datadir)/$(TRANSDIR) + install -d -m 755 $(datadir)/$(UNIMAPDIR) + install -m 644 $(UNIMAPDIR)/* $(datadir)/$(UNIMAPDIR) + install -d -m 755 $(datadir)/$(KEYMAPDIR) + install -d -m 755 $(datadir)/$(KEYMAPDIR)/i386 + install -d -m 755 $(datadir)/$(KEYMAPDIR)/mac + for i in $(KEYMAPSUBDIRS); do \ + install -d -m 755 $(datadir)/$(KEYMAPDIR)/$$i ;\ + install -m 644 $(KEYMAPDIR)_Z/$$i/* $(datadir)/$(KEYMAPDIR)/$$i ;\ + done + rm -f $(datadir)/$(KEYMAPDIR)/ppc; ln -s mac $(datadir)/$(KEYMAPDIR)/ppc + @if [ -f $(datadir)/$(OLDKEYMAPDIR) ]; then \ + echo "Done. You may want to remove old keymaps with" ; \ + echo " rm -rf $(datadir)/$(OLDKEYMAPDIR)" ; \ + echo "But be careful to preserve your default map if it is" ; \ + echo "nonstandard, and to adapt any scripts in rc.local or so." ; \ + fi + + +# compress data files - do not touch the distribution but copy first +$(KEYMAPDIR)_Z: + cp -r $(KEYMAPDIR) $(KEYMAPDIR)_Z + cd $(KEYMAPDIR)_Z && $(MYGZIP) */*.map */*/*.map + +$(FONTDIR)_Z: + cp -r $(FONTDIR) $(FONTDIR)_Z + cp -r $(PARTIALDIR) $(PARTIALDIR)_Z + cd $(FONTDIR)_Z && $(MYGZIP) * && gunzip ERRORS* README* + cd $(PARTIALDIR)_Z && $(MYGZIP) * +# (not yet screenmaps - some other time) + +clean: + rm -rf $(KEYMAPDIR)_Z $(FONTDIR)_Z $(PARTIALDIR)_Z + +distclean: clean + rm -f Makefile diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..4d4a951 --- /dev/null +++ b/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-05-14.22 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/man/Makefile b/man/Makefile deleted file mode 100644 index 9af9ba9..0000000 --- a/man/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# Generated files -GEN1=man1/dumpkeys.1 man1/loadkeys.1 -GEN8=man8/setfont.8 man8/loadunimap.8 man8/mapscrn.8 - -install: - for i in man?; do \ - install -d -m 755 $(MANDIR)/$$i; \ - install -m 644 $$i/*.[0-9] $(MANDIR)/$$i; \ - done - rm -f $(MANDIR)/man5/keytables.5 - -clean: - rm -f $(GEN1) $(GEN8) - -# Note: man?misc contains the man pages for non-installed -# programs from ../src. Most of these are tiny test programs, -# not very useful for anybody. -# But if you decide to install some of those, then here are the man pages. diff --git a/man/Makefile.in b/man/Makefile.in new file mode 100644 index 0000000..bda904b --- /dev/null +++ b/man/Makefile.in @@ -0,0 +1,39 @@ +prefix = @prefix@ +datadir = @datadir@ +mandir = @mandir@ +OPTIONAL_PROGS = @OPTIONAL_PROGS@ + +# Generated files +GEN1 = man1/dumpkeys.1 man1/loadkeys.1 +GEN8 = man8/setfont.8 man8/loadunimap.8 man8/mapscrn.8 + +MANS = $(GEN1) $(GEN8) + +DIRLIST = man1 man5 man8 + +ifdef OPTIONAL_PROGS +DIRLIST += man1misc man8misc +endif + +all: $(MANS) + +%: %.in + sed -e "s|\@datadir\@|$(datadir)|g" <$< >$@ + +install: + for i in $(DIRLIST); do \ + install -d -m 755 $(mandir)/$$i; \ + install -m 644 $$i/*.[0-9] $(mandir)/$$i; \ + done + rm -f $(mandir)/man5/keytables.5 + +clean: + rm -f $(GEN1) $(GEN8) + +distclean: clean + rm -f Makefile + +# Note: man?misc contains the man pages for non-installed +# programs from ../src. Most of these are tiny test programs, +# not very useful for anybody. +# But if you decide to install some of those, then here are the man pages. diff --git a/openvt/Makefile b/openvt/Makefile deleted file mode 100644 index 1a8fbaf..0000000 --- a/openvt/Makefile +++ /dev/null @@ -1,36 +0,0 @@ - -CC=gcc -ifndef RPM_OPT_FLAGS - RPM_OPT_FLAGS=-O2 -pipe -Wall -ansi -endif -CFLAGS += $(RPM_OPT_FLAGS) -I../src -LDFLAGS=$(CFLAGS) -s - -SRC=openvt.c -OBJ=openvt.o ../src/getfd.o -PROG=openvt -PROGS=$(PROG) -MAN=openvt.1 -# BINDIR=${DESTDIR}/usr/bin -# MANDIR=${DESTDIR}/usr/man - -all: $(PROGS) - -openvt: $(OBJ) - -openvt.o: openvt.h - -clean: - -rm -f $(OBJ) - -realclean distclean: clean - -rm -f $(PROGS) - -install: $(PROGS) - install -d -m 755 $(BINDIR) $(MANDIR)/man1 - install $(PROGS) $(BINDIR) - install -m 644 $(MAN) $(MANDIR)/man1 - -# don't change 4711 to 0711 - this is the setuid target -setuid: - chmod 4711 $(BINDIR)/$(PROG) diff --git a/openvt/Makefile.in b/openvt/Makefile.in new file mode 100644 index 0000000..4e8a551 --- /dev/null +++ b/openvt/Makefile.in @@ -0,0 +1,34 @@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ + +CFLAGS += -I../src + +SRC = openvt.c +OBJ = openvt.o ../src/getfd.o +PROG = openvt +PROGS = $(PROG) +MAN = openvt.1 + +all: $(PROGS) +openvt: $(OBJ) +openvt.o: openvt.h + +clean: + -rm -f $(OBJ) + +realclean: clean + -rm -f $(PROGS) + +distclean: realclean + -rm -f Makefile + +install: $(PROGS) + install -d -m 755 $(bindir) $(mandir)/man1 + install -m 755 $(PROGS) $(bindir) + install -m 644 $(MAN) $(mandir)/man1 + +# don't change 4711 to 0711 - this is the setuid target +setuid: + chmod 4711 $(bindir)/$(PROG) diff --git a/openvt/nls.h b/openvt/nls.h index 899aff9..5960c0d 100644 --- a/openvt/nls.h +++ b/openvt/nls.h @@ -1,15 +1,11 @@ -#include "../defines.h" /* for HAVE_locale_h */ - -#ifndef PACKAGE -#define PACKAGE "kbd" -#endif +#include "../config.h" #ifndef LOCALEDIR #define LOCALEDIR "/usr/share/locale" #endif -#ifdef HAVE_locale_h +#ifdef HAVE_LOCALE_H # include #endif diff --git a/openvt/openvt.c b/openvt/openvt.c index 8b1610c..7b55ab7 100644 --- a/openvt/openvt.c +++ b/openvt/openvt.c @@ -56,6 +56,10 @@ main(int argc, char *argv[]) char vtname[sizeof VTNAME + 2]; /* allow 999 possible VTs */ char *cmd = NULL, *def_cmd = NULL, *username = NULL; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); + /* * I don't like using getopt for this, but otherwise this gets messy. * POSIX/Gnu getopt forces the use of -- to separate child/program diff --git a/po/Makefile b/po/Makefile deleted file mode 100644 index 76c0991..0000000 --- a/po/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -PACKAGE = kbd -VERSION = 1.13 - -include ../make_include - -# po2tbl.sed is not taken from /usr/share/gettext/intl -# Often it is not present. -# A RedHat 5.2 installation only has po2tbl.sed.in. -# -PO2TBL = ./po2tbl.sed -INTL = /usr/share/gettext/intl -# FOREIGN=--foreign-user -FOREIGN= -SHELL = /bin/sh - -prefix = $(DESTDIR)/usr -datadir = $(prefix)/share -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = $(prefix)/share/gettext/po - -# Not giving an explicit path improves the chances of finding these -GENCAT = gencat -MSGFMT = msgfmt -XGETTEXT = xgettext -MSGMERGE = msgmerge -INSTALL = install -c -INSTALL_DATA = ${INSTALL} -m 644 - -# .. for (if HAVE_CONFIG_H is set) -# $(INTL) for "libgettext.h" -INCLUDES = -I.. -I$(INTL) - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -# Enter here all .po files -POFILES = cs.po da.po de.po el.po es.po fr.po gr.po nl.po pl.po \ - ro.po ru.po sv.po tr.po -# the same but with .gmo -GMOFILES = cs.gmo da.gmo de.gmo el.gmo es.gmo fr.gmo gr.gmo nl.gmo \ - pl.gmo ro.gmo ru.gmo sv.gmo tr.gmo - -CATALOGS = $(GMOFILES) -CATOBJEXT = .gmo -INSTOBJEXT = .mo - -.SUFFIXES: -.SUFFIXES: .c .o .po .gmo .mo .msg .cat - -.c.o: - $(COMPILE) $< - -.po.mo: - $(MSGFMT) -o $@ $< - -.po.gmo: - $(MSGFMT) -o $@ $< - -.po.cat: - sed -f $(PO2TBL) < $< > $*.msg \ - && rm -f $@ && $(GENCAT) $@ $*.msg - -all: all-$(HAVE_XGETTEXT) - -all-yes: cat-id-tbl.c $(CATALOGS) -all-no: - -kbd.pot: - $(XGETTEXT) --default-domain=kbd --directory=.. \ - --add-comments --keyword=_ --keyword=N_ \ - --files-from=POTFILES.in $(FOREIGN) - mv kbd.po kbd.pot - -cat-id-tbl.c: stamp-cat-id -stamp-cat-id: kbd.pot - rm -f cat-id-tbl.tmp - sed -f $(PO2TBL) kbd.pot \ - | sed -e "s/@PACKAGE NAME@/kbd/" > cat-id-tbl.tmp - if cmp -s cat-id-tbl.tmp cat-id-tbl.c; then \ - rm cat-id-tbl.tmp; \ - else \ - echo cat-id-tbl.c changed; \ - rm -f cat-id-tbl.c; \ - mv cat-id-tbl.tmp cat-id-tbl.c; \ - fi - rm -f stamp-cat-id && echo timestamp > stamp-cat-id - -install: install-data-$(HAVE_XGETTEXT) -install-data-no: all -install-data-yes: all - ../mkinstalldirs $(datadir); - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - case "$$cat" in \ - *.gmo) destdir=$(gnulocaledir);; \ - *) destdir=$(localedir);; \ - esac; \ - lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - dir=$$destdir/$$lang/LC_MESSAGES; \ - ../mkinstalldirs $$dir; \ - $(INSTALL_DATA) $$cat $$dir/kbd$(INSTOBJEXT); \ - echo "installing $$cat as $$dir/kbd$(INSTOBJEXT)"; \ - if test -r $$cat.m; then \ - $(INSTALL_DATA) $$cat.m $$dir/kbd$(INSTOBJEXT).m; \ - echo "installing $$cat.m as $$dir/kbd$(INSTOBJEXT).m"; \ - fi; \ - done - -uninstall: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - rm -f $(localedir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT); \ - rm -f $(localedir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT).m; \ - rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT); \ - rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT).m; \ - done - rm -f $(gettextsrcdir)/po-Makefile.in.in - -cat-id-tbl.o: $(INTL)/libgettext.h - -clean: - rm -f core core.* *~ *.o kbd.pot cat-id-tbl.tmp - -distclean: clean - rm -f POTFILES *.gmo *.mo *.msg *.cat *.cat.m - -update-po: - $(MAKE) kbd.pot - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - mv $$lang.po $$lang.old.po; \ - echo "$$lang:"; \ - if $(MSGMERGE) $$lang.old.po kbd.pot -o $$lang.po; then \ - rm -f $$lang.old.po; \ - else \ - echo "msgmerge for $$cat failed!"; \ - rm -f $$lang.po; \ - mv $$lang.old.po $$lang.po; \ - fi; \ - done - -POTFILES: - ./update-potfiles - diff --git a/po/Makefile.in b/po/Makefile.in index 0691bb4..b302f5b 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -1,7 +1,17 @@ -PACKAGE = kbd -VERSION = 1.10 +PACKAGE_NAME = @PACKAGE_NAME@ -include ../make_include +prefix = @prefix@ +datadir = @datadir@ +localedir = $(datadir)/locale +gnulocaledir = $(datadir)/locale +gettextsrcdir = $(datadir)/gettext/po + +FOREIGN = @FOREIGN@ +HAVE_XGETTEXT = @HAVE_XGETTEXT@ + +SHELL = @SHELL@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ # po2tbl.sed is not taken from /usr/share/gettext/intl # Often it is not present. @@ -9,23 +19,12 @@ include ../make_include # PO2TBL = ./po2tbl.sed INTL = /usr/share/gettext/intl -# FOREIGN=--foreign-user -FOREIGN= -SHELL = /bin/sh - -prefix = $(DESTDIR)/usr -datadir = $(prefix)/share -localedir = $(datadir)/locale -gnulocaledir = $(prefix)/share/locale -gettextsrcdir = $(prefix)/share/gettext/po # Not giving an explicit path improves the chances of finding these GENCAT = gencat MSGFMT = msgfmt XGETTEXT = xgettext MSGMERGE = msgmerge -INSTALL = install -c -INSTALL_DATA = ${INSTALL} -m 644 # .. for (if HAVE_CONFIG_H is set) # $(INTL) for "libgettext.h" @@ -34,9 +33,11 @@ INCLUDES = -I.. -I$(INTL) COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) # Enter here all .po files -POFILES = cs.po da.po de.po es.po fr.po gr.po nl.po pl.po ro.po ru.po sv.po tr.po +POFILES = cs.po da.po de.po el.po es.po fr.po gr.po nl.po pl.po \ + ro.po ru.po sv.po tr.po # the same but with .gmo -GMOFILES = cs.gmo da.gmo de.gmo es.gmo fr.gmo gr.gmo nl.gmo pl.gmo ro.gmo ru.gmo sv.gmo tr.gmo +GMOFILES = cs.gmo da.gmo de.gmo el.gmo es.gmo fr.gmo gr.gmo nl.gmo \ + pl.gmo ro.gmo ru.gmo sv.gmo tr.gmo CATALOGS = $(GMOFILES) CATOBJEXT = .gmo @@ -63,17 +64,17 @@ all: all-$(HAVE_XGETTEXT) all-yes: cat-id-tbl.c $(CATALOGS) all-no: -kbd.pot: - $(XGETTEXT) --default-domain=kbd --directory=.. \ +$(PACKAGE_NAME).pot: + $(XGETTEXT) --default-domain=$(PACKAGE_NAME) --directory=.. \ --add-comments --keyword=_ --keyword=N_ \ --files-from=POTFILES.in $(FOREIGN) - mv kbd.po kbd.pot + mv $(PACKAGE_NAME).po $(PACKAGE_NAME).pot cat-id-tbl.c: stamp-cat-id -stamp-cat-id: kbd.pot +stamp-cat-id: $(PACKAGE_NAME).pot rm -f cat-id-tbl.tmp - sed -f $(PO2TBL) kbd.pot \ - | sed -e "s/@PACKAGE NAME@/kbd/" > cat-id-tbl.tmp + sed -f $(PO2TBL) $(PACKAGE_NAME).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE_NAME)/" > cat-id-tbl.tmp if cmp -s cat-id-tbl.tmp cat-id-tbl.c; then \ rm cat-id-tbl.tmp; \ else \ @@ -96,11 +97,11 @@ install-data-yes: all lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ dir=$$destdir/$$lang/LC_MESSAGES; \ ../mkinstalldirs $$dir; \ - $(INSTALL_DATA) $$cat $$dir/kbd$(INSTOBJEXT); \ - echo "installing $$cat as $$dir/kbd$(INSTOBJEXT)"; \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE_NAME)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE_NAME)$(INSTOBJEXT)"; \ if test -r $$cat.m; then \ - $(INSTALL_DATA) $$cat.m $$dir/kbd$(INSTOBJEXT).m; \ - echo "installing $$cat.m as $$dir/kbd$(INSTOBJEXT).m"; \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE_NAME)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE_NAME)$(INSTOBJEXT).m"; \ fi; \ done @@ -108,29 +109,30 @@ uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - rm -f $(localedir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT); \ - rm -f $(localedir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT).m; \ - rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT); \ - rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/kbd$(INSTOBJEXT).m; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE_NAME)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE_NAME)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE_NAME)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE_NAME)$(INSTOBJEXT).m; \ done rm -f $(gettextsrcdir)/po-Makefile.in.in cat-id-tbl.o: $(INTL)/libgettext.h clean: - rm -f core core.* *~ *.o kbd.pot cat-id-tbl.tmp + rm -f core core.* *~ *.o $(PACKAGE_NAME).pot cat-id-tbl.tmp distclean: clean rm -f POTFILES *.gmo *.mo *.msg *.cat *.cat.m + rm -f Makefile update-po: - $(MAKE) kbd.pot + $(MAKE) $(PACKAGE_NAME).pot catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ mv $$lang.po $$lang.old.po; \ echo "$$lang:"; \ - if $(MSGMERGE) $$lang.old.po kbd.pot -o $$lang.po; then \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE_NAME).pot -o $$lang.po; then \ rm -f $$lang.old.po; \ else \ echo "msgmerge for $$cat failed!"; \ diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c index 3cd38fa..2b7604c 100644 --- a/po/cat-id-tbl.c +++ b/po/cat-id-tbl.c @@ -76,128 +76,140 @@ valid options are:\n\ {"\ \t\t\t interpret character action codes to be from the\n\ \t\t\t specified character set\n", 42}, - {"error executing %s\n", 43}, - {"Couldnt open %s\n", 44}, - {"usage: getkeycodes\n", 45}, - {"Plain scancodes xx (hex) versus keycodes (dec)\n", 46}, - {"0 is an error; for 1-88 (0x01-0x58) scancode equals keycode\n", 47}, - {"for 1-%d (0x01-0x%02x) scancode equals keycode\n", 48}, {"\ +%s version %s\n\ \n\ +Usage: %s [options]\n\ \n\ -Escaped scancodes e0 xx (hex)\n", 49}, - {"failed to get keycode for scancode 0x%x\n", 50}, +Valid options are:\n\ +\n\ +\t-h --help display this help text\n\ +\t-V --version display this help text\n\ +\t-n --next-available display next unallocated VT\n", 43}, + {"Couldn't read VTNO: ", 44}, + {"error executing %s\n", 45}, + {"Couldnt open %s\n", 46}, + {"usage: getkeycodes\n", 47}, + {"Plain scancodes xx (hex) versus keycodes (dec)\n", 48}, + {"0 is an error; for 1-88 (0x01-0x58) scancode equals keycode\n", 49}, + {"for 1-%d (0x01-0x%02x) scancode equals keycode\n", 50}, + {"\ +\n\ +\n\ +Escaped scancodes e0 xx (hex)\n", 51}, + {"failed to get keycode for scancode 0x%x\n", 52}, {"\ Usage:\n\ -\t%s [-s] [-C console]\n", 51}, - {"usage: kbd_mode [-a|-u|-k|-s]\n", 52}, - {"kbd_mode: error reading keyboard mode\n", 53}, - {"The keyboard is in raw (scancode) mode\n", 54}, - {"The keyboard is in mediumraw (keycode) mode\n", 55}, - {"The keyboard is in the default (ASCII) mode\n", 56}, - {"The keyboard is in Unicode (UTF-8) mode\n", 57}, - {"The keyboard is in some unknown mode\n", 58}, - {"%s: error setting keyboard mode\n", 59}, - {"Typematic Rate set to %.1f cps (delay = %d ms)\n", 60}, - {"Usage: kbdrate [-V] [-s] [-r rate] [-d delay]\n", 61}, - {"Cannot open /dev/port", 62}, - {"bug: getfont called with count<256\n", 63}, - {"%s: out of memory\n", 64}, - {"unknown charset %s - ignoring charset request\n", 65}, - {"assuming iso-8859-1 %s\n", 66}, - {"assuming iso-8859-15 %s\n", 67}, - {"assuming iso-8859-2 %s\n", 68}, - {"assuming iso-8859-3 %s\n", 69}, - {"assuming iso-8859-4 %s\n", 70}, - {"unknown keysym '%s'\n", 71}, - {"plus before %s ignored\n", 72}, +\t%s [-s] [-C console]\n", 53}, + {"usage: kbd_mode [-a|-u|-k|-s] [-C device]\n", 54}, + {"kbd_mode: error reading keyboard mode\n", 55}, + {"The keyboard is in raw (scancode) mode\n", 56}, + {"The keyboard is in mediumraw (keycode) mode\n", 57}, + {"The keyboard is in the default (ASCII) mode\n", 58}, + {"The keyboard is in Unicode (UTF-8) mode\n", 59}, + {"The keyboard is in some unknown mode\n", 60}, + {"%s: error setting keyboard mode\n", 61}, + {"Typematic Rate set to %.1f cps (delay = %d ms)\n", 62}, + {"Usage: kbdrate [-V] [-s] [-r rate] [-d delay]\n", 63}, + {"Cannot open /dev/port", 64}, + {"bug: getfont called with count<256\n", 65}, + {"bug: getfont using GIO_FONT needs buf.\n", 66}, + {"%s: out of memory\n", 67}, + {"unknown charset %s - ignoring charset request\n", 68}, + {"assuming iso-8859-1 %s\n", 69}, + {"assuming iso-8859-15 %s\n", 70}, + {"assuming iso-8859-2 %s\n", 71}, + {"assuming iso-8859-3 %s\n", 72}, + {"assuming iso-8859-4 %s\n", 73}, + {"unknown keysym '%s'\n", 74}, + {"plus before %s ignored\n", 75}, {"\ Usage:\n\ -\t%s [-C console] [-o map.orig]\n", 73}, - {"Bad input line: %s\n", 74}, - {"%s: Glyph number (0x%x) larger than font length\n", 75}, - {"%s: Bad end of range (0x%x)\n", 76}, - {"%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n", 77}, +\t%s [-C console] [-o map.orig]\n", 76}, + {"Bad input line: %s\n", 77}, + {"%s: Glyph number (0x%x) larger than font length\n", 78}, + {"%s: Bad end of range (0x%x)\n", 79}, + {"%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n", 80}, {"\ %s: Unicode range U+%x-U+%x not of the same length as font position range 0x%\ -x-0x%x\n", 78}, - {"%s: trailing junk (%s) ignored\n", 79}, - {"Loading unicode map from file %s\n", 80}, - {"%s: %s: Warning: line too long\n", 81}, +x-0x%x\n", 81}, + {"%s: trailing junk (%s) ignored\n", 82}, + {"Loading unicode map from file %s\n", 83}, + {"%s: %s: Warning: line too long\n", 84}, {"\ %s: not loading empty unimap\n\ -(if you insist: use option -f to override)\n", 82}, - {"entry", 83}, - {"entries", 84}, - {"Saved unicode map on `%s'\n", 85}, - {"Appended Unicode map\n", 86}, - {"usage: %s [-v] [-o map.orig] map-file\n", 87}, - {"mapscrn: cannot open map file _%s_\n", 88}, - {"Cannot stat map file", 89}, - {"Loading binary direct-to-font screen map from file %s\n", 90}, - {"Error reading map from file `%s'\n", 91}, - {"Loading binary unicode screen map from file %s\n", 92}, - {"Loading symbolic screen map from file %s\n", 93}, - {"Error parsing symbolic map from `%s', line %d\n", 94}, - {"Error writing map to file\n", 95}, - {"Cannot read console map\n", 96}, - {"Saved screen map in `%s'\n", 97}, - {"%s: short ucs2 unicode table\n", 98}, - {"%s: short utf8 unicode table\n", 99}, - {"%s: bad utf8\n", 100}, - {"%s: unknown utf8 error\n", 101}, - {"%s: short unicode table\n", 102}, - {"%s: Error reading input font", 103}, - {"%s: Bad call of readpsffont\n", 104}, - {"%s: Unsupported psf file mode (%d)\n", 105}, - {"%s: Unsupported psf version (%d)\n", 106}, - {"%s: zero input font length?\n", 107}, - {"%s: zero input character size?\n", 108}, - {"%s: Input file: bad input length (%d)\n", 109}, - {"%s: Input file: trailing garbage\n", 110}, - {"appendunicode: illegal unicode %u\n", 111}, - {"Cannot write font file header", 112}, - {"%s: Warning: line too long\n", 113}, - {"%s: Bad input line: %s\n", 114}, - {"%s: Glyph number (0x%lx) past end of font\n", 115}, - {"%s: Bad end of range (0x%lx)\n", 116}, +(if you insist: use option -f to override)\n", 85}, + {"entry", 86}, + {"entries", 87}, + {"Saved unicode map on `%s'\n", 88}, + {"Appended Unicode map\n", 89}, + {"usage: %s [-v] [-o map.orig] map-file\n", 90}, + {"mapscrn: cannot open map file _%s_\n", 91}, + {"Cannot stat map file", 92}, + {"Loading binary direct-to-font screen map from file %s\n", 93}, + {"Error reading map from file `%s'\n", 94}, + {"Loading binary unicode screen map from file %s\n", 95}, + {"Loading symbolic screen map from file %s\n", 96}, + {"Error parsing symbolic map from `%s', line %d\n", 97}, + {"Error writing map to file\n", 98}, + {"Cannot read console map\n", 99}, + {"Saved screen map in `%s'\n", 100}, + {"%s: short ucs2 unicode table\n", 101}, + {"%s: short utf8 unicode table\n", 102}, + {"%s: bad utf8\n", 103}, + {"%s: unknown utf8 error\n", 104}, + {"%s: short unicode table\n", 105}, + {"%s: Error reading input font", 106}, + {"%s: Bad call of readpsffont\n", 107}, + {"%s: Unsupported psf file mode (%d)\n", 108}, + {"%s: Unsupported psf version (%d)\n", 109}, + {"%s: zero input font length?\n", 110}, + {"%s: zero input character size?\n", 111}, + {"%s: Input file: bad input length (%d)\n", 112}, + {"%s: Input file: trailing garbage\n", 113}, + {"appendunicode: illegal unicode %u\n", 114}, + {"Cannot write font file header", 115}, + {"%s: Warning: line too long\n", 116}, + {"%s: Bad input line: %s\n", 117}, + {"%s: Glyph number (0x%lx) past end of font\n", 118}, + {"%s: Bad end of range (0x%lx)\n", 119}, {"\ %s: Corresponding to a range of font positions, there should be a Unicode \ -range\n", 117}, +range\n", 120}, {"\ Usage:\n\ -\t%s infont intable outfont\n", 118}, +\t%s infont intable outfont\n", 121}, {"\ Usage:\n\ -\t%s infont [outtable]\n", 119}, +\t%s infont [outtable]\n", 122}, {"\ Usage:\n\ -\t%s infont outfont\n", 120}, +\t%s infont outfont\n", 123}, {"\ Usage:\n\ -\t%s [-i infont] [-o outfont] [-it intable] [-ot outtable] [-nt]\n", 121}, - {"%s: Bad magic number on %s\n", 122}, - {"%s: psf file with unknown magic\n", 123}, - {"%s: input font does not have an index\n", 124}, - {"resizecons: cannot find videomode file %s\n", 125}, - {"Invalid number of lines\n", 126}, - {"Old mode: %dx%d New mode: %dx%d\n", 127}, - {"Old #scanlines: %d New #scanlines: %d Character height: %d\n", 128}, - {"resizecons: the command `%s' failed\n", 129}, +\t%s [-i infont] [-o outfont] [-it intable] [-ot outtable] [-nt]\n", 124}, + {"%s: Bad magic number on %s\n", 125}, + {"%s: psf file with unknown magic\n", 126}, + {"%s: input font does not have an index\n", 127}, + {"resizecons: cannot find videomode file %s\n", 128}, + {"Invalid number of lines\n", 129}, + {"Old mode: %dx%d New mode: %dx%d\n", 130}, + {"Old #scanlines: %d New #scanlines: %d Character height: %d\n", 131}, + {"resizecons: the command `%s' failed\n", 132}, {"\ -resizecons: don't forget to change TERM (maybe to con%dx%d or linux-%dx%d)\n", 130}, +resizecons: don't forget to change TERM (maybe to con%dx%d or linux-%dx%d)\n", 133}, {"\ resizecons:\n\ call is: resizecons COLSxROWS or: resizecons COLS ROWS\n\ or: resizecons -lines ROWS, with ROWS one of 25, 28, 30, 34, 36, 40, 44, 50, \ -60\n", 131}, - {"resizecons: cannot get I/O permissions.\n", 132}, - {"usage: screendump [n]\n", 133}, - {"Error reading %s\n", 134}, - {"couldn't read %s, and cannot ioctl dump\n", 135}, - {"couldn't read %s\n", 136}, - {"Strange ... screen is both %dx%d and %dx%d ??\n", 137}, - {"Error writing screendump\n", 138}, +60\n", 134}, + {"resizecons: cannot get I/O permissions.\n", 135}, + {"usage: screendump [n]\n", 136}, + {"Error reading %s\n", 137}, + {"couldn't read %s, and cannot ioctl dump\n", 138}, + {"couldn't read %s\n", 139}, + {"Strange ... screen is both %dx%d and %dx%d ??\n", 140}, + {"Error writing screendump\n", 141}, {"\ Usage: setfont [write-options] [-] [newfont..] [-m consolemap] [-u \ unicodemap]\n\ @@ -222,49 +234,49 @@ will be loaded and, in the case of consolemaps, activated.\n\ -v Be verbose.\n\ -C Indicate console device to be used.\n\ -V Print version and exit.\n\ -Files are loaded from the current directory or /usr/lib/kbd/*/.\n", 139}, - {"setfont: too many input files\n", 140}, +Files are loaded from the current directory or /usr/lib/kbd/*/.\n", 142}, + {"setfont: too many input files\n", 143}, {"\ setfont: cannot both restore from character ROM and from file. Font \ -unchanged.\n", 141}, - {"Bad character height %d\n", 142}, - {"Bad character width %d\n", 143}, - {"%s: font position 32 is nonblank\n", 144}, - {"%s: wiped it\n", 145}, - {"%s: background will look funny\n", 146}, - {"Loading %d-char %dx%d font from file %s\n", 147}, - {"Loading %d-char %dx%d font\n", 148}, - {"Loading %d-char %dx%d (%d) font from file %s\n", 149}, - {"Loading %d-char %dx%d (%d) font\n", 150}, - {"%s: bug in do_loadtable\n", 151}, - {"Loading Unicode mapping table...\n", 152}, - {"Cannot open font file %s\n", 153}, - {"When loading several fonts, all must be psf fonts - %s isn't\n", 154}, - {"Read %d-char %dx%d font from file %s\n", 155}, - {"When loading several fonts, all must have the same height\n", 156}, - {"When loading several fonts, all must have the same width\n", 157}, - {"Cannot find default font\n", 158}, - {"Cannot find %s font\n", 159}, - {"Reading font file %s\n", 160}, - {"No final newline in combine file\n", 161}, - {"Too many files to combine\n", 162}, - {"Hmm - a font from restorefont? Using the first half.\n", 163}, - {"Bad input file size\n", 164}, +unchanged.\n", 144}, + {"Bad character height %d\n", 145}, + {"Bad character width %d\n", 146}, + {"%s: font position 32 is nonblank\n", 147}, + {"%s: wiped it\n", 148}, + {"%s: background will look funny\n", 149}, + {"Loading %d-char %dx%d font from file %s\n", 150}, + {"Loading %d-char %dx%d font\n", 151}, + {"Loading %d-char %dx%d (%d) font from file %s\n", 152}, + {"Loading %d-char %dx%d (%d) font\n", 153}, + {"%s: bug in do_loadtable\n", 154}, + {"Loading Unicode mapping table...\n", 155}, + {"Cannot open font file %s\n", 156}, + {"When loading several fonts, all must be psf fonts - %s isn't\n", 157}, + {"Read %d-char %dx%d font from file %s\n", 158}, + {"When loading several fonts, all must have the same height\n", 159}, + {"When loading several fonts, all must have the same width\n", 160}, + {"Cannot find default font\n", 161}, + {"Cannot find %s font\n", 162}, + {"Reading font file %s\n", 163}, + {"No final newline in combine file\n", 164}, + {"Too many files to combine\n", 165}, + {"Hmm - a font from restorefont? Using the first half.\n", 166}, + {"Bad input file size\n", 167}, {"\ This file contains 3 fonts: 8x8, 8x14 and 8x16. Please indicate\n\ -using an option -8 or -14 or -16 which one you want loaded.\n", 165}, - {"You asked for font size %d, but only 8, 14, 16 are possible here.\n", 166}, - {"Found nothing to save\n", 167}, - {"Cannot write font file", 168}, - {"Saved %d-char %dx%d font file on %s\n", 169}, +using an option -8 or -14 or -16 which one you want loaded.\n", 168}, + {"You asked for font size %d, but only 8, 14, 16 are possible here.\n", 169}, + {"Found nothing to save\n", 170}, + {"Cannot write font file", 171}, + {"Saved %d-char %dx%d font file on %s\n", 172}, {"\ usage: setkeycode scancode keycode ...\n\ (where scancode is either xx or e0xx, given in hexadecimal,\n\ - and keycode is given in decimal)\n", 170}, - {"even number of arguments expected", 171}, - {"error reading scancode", 172}, - {"code outside bounds", 173}, - {"failed to set scancode %x to keycode %d\n", 174}, + and keycode is given in decimal)\n", 173}, + {"even number of arguments expected", 174}, + {"error reading scancode", 175}, + {"code outside bounds", 176}, + {"failed to set scancode %x to keycode %d\n", 177}, {"\ Usage:\n\ \tsetleds [-v] [-L] [-D] [-F] [[+|-][ num | caps | scroll %s]]\n\ @@ -277,56 +289,63 @@ Normally, setleds influences the vt flag settings\n\ (and these are usually reflected in the leds).\n\ With -L, setleds only sets the leds, and leaves the flags alone.\n\ With -D, setleds sets both the flags and the default flags, so\n\ -that a subsequent reset will not change the flags.\n", 175}, - {"on ", 176}, - {"off", 177}, - {"Error reading current led setting. Maybe stdin is not a VT?\n", 178}, +that a subsequent reset will not change the flags.\n", 178}, + {"on ", 179}, + {"off", 180}, + {"Error reading current led setting. Maybe stdin is not a VT?\n", 181}, {"\ -Error reading current flags setting. Maybe you are not on the console?\n", 179}, - {"Error reading current led setting from /dev/kbd.\n", 180}, - {"KIOCGLED unavailable?\n", 181}, - {"KIOCSLED unavailable?\n", 182}, - {"Error opening /dev/kbd.\n", 183}, - {"Error resetting ledmode\n", 184}, - {"Current default flags: ", 185}, - {"Current flags: ", 186}, - {"Current leds: ", 187}, +Error reading current flags setting. Maybe you are not on the console?\n", 182}, + {"Error reading current led setting from /dev/kbd.\n", 183}, + {"KIOCGLED unavailable?\n", 184}, + {"KIOCSLED unavailable?\n", 185}, + {"Error opening /dev/kbd.\n", 186}, + {"Error resetting ledmode\n", 187}, + {"Current default flags: ", 188}, + {"Current flags: ", 189}, + {"Current leds: ", 190}, {"\ unrecognized argument: _%s_\n\ -\n", 188}, - {"Old default flags: ", 189}, - {"New default flags: ", 190}, - {"Old flags: ", 191}, - {"New flags: ", 192}, - {"Old leds: ", 193}, - {"New leds: ", 194}, +\n", 191}, + {"Old default flags: ", 192}, + {"New default flags: ", 193}, + {"Old flags: ", 194}, + {"New flags: ", 195}, + {"Old leds: ", 196}, + {"New leds: ", 197}, {"\ Usage:\n\ \tsetmetamode [ metabit | meta | bit | escprefix | esc | prefix ]\n\ Each vt has his own copy of this bit. Use\n\ \tsetmetamode [arg] < /dev/ttyn\n\ to change the settings of another vt.\n\ -The setting before and after the change are reported.\n", 195}, - {"Meta key sets high order bit\n", 196}, - {"Meta key gives Esc prefix\n", 197}, - {"Strange mode for Meta key?\n", 198}, - {"Error reading current setting. Maybe stdin is not a VT?\n", 199}, - {"old state: ", 200}, - {"new state: ", 201}, - {"usage: %s\n", 202}, - {"failed to restore original translation table\n", 203}, - {"failed to restore original unimap\n", 204}, - {"cannot change translation table\n", 205}, - {"%s: out of memory?\n", 206}, +The setting before and after the change are reported.\n", 198}, + {"Meta key sets high order bit\n", 199}, + {"Meta key gives Esc prefix\n", 200}, + {"Strange mode for Meta key?\n", 201}, + {"Error reading current setting. Maybe stdin is not a VT?\n", 202}, + {"old state: ", 203}, + {"new state: ", 204}, + {"usage: %s\n", 205}, + {"failed to restore original translation table\n", 206}, + {"failed to restore original unimap\n", 207}, + {"cannot change translation table\n", 208}, + {"%s: out of memory?\n", 209}, {"\ -usage: showconsolefont [-v|-V]\n\ -(probably after loading a font with `setfont font')\n", 207}, - {"?UNKNOWN?", 208}, - {"kb mode was %s\n", 209}, +usage: showconsolefont -V|--version\n\ + showconsolefont [-C tty] [-v] [-i]\n\ +(probably after loading a font with `setfont font')\n\ +\n\ +Valid options are:\n\ + -C tty Device to read the font from. Default: current tty.\n\ + -v Be more verbose.\n\ + -i Don't print out the font table, just show\n\ + ROWSxCOLSxCOUNT and exit.\n", 210}, + {"?UNKNOWN?", 211}, + {"kb mode was %s\n", 212}, {"\ [ if you are trying this under X, it might not work\n\ -since the X server is also reading /dev/console ]\n", 210}, - {"caught signal %d, cleaning up...\n", 211}, +since the X server is also reading /dev/console ]\n", 213}, + {"caught signal %d, cleaning up...\n", 214}, {"\ showkey version %s\n\ \n\ @@ -337,16 +356,16 @@ valid options are:\n\ \t-h --help\tdisplay this help text\n\ \t-a --ascii\tdisplay the decimal/octal/hex values of the keys\n\ \t-s --scancodes\tdisplay only the raw scan-codes\n\ -\t-k --keycodes\tdisplay only the interpreted keycodes (default)\n", 212}, +\t-k --keycodes\tdisplay only the interpreted keycodes (default)\n", 215}, {"\ \n\ Press any keys - Ctrl-D will terminate this program\n\ -\n", 213}, - {"press any key (program terminates 10s after last keypress)...\n", 214}, - {"release", 215}, - {"press", 216}, - {"keycode %3d %s\n", 217}, - {"%s from %s\n", 218}, +\n", 216}, + {"press any key (program terminates 10s after last keypress)...\n", 217}, + {"release", 218}, + {"press", 219}, + {"keycode %3d %s\n", 220}, + {"%s from %s\n", 221}, }; -int _msg_tbl_length = 218; +int _msg_tbl_length = 221; diff --git a/po/cs.po b/po/cs.po index f38d601..d2eb1d0 100644 --- a/po/cs.po +++ b/po/cs.po @@ -817,7 +817,7 @@ msgid "" " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Použití: setfont [přepínače-zápisu] [-] [novépísmo..] [-m mapakonzoly] [-u mapaunicode]\n" " přepínače-zápisu (mají vliv před načítáním souboru):\n" @@ -841,7 +841,7 @@ msgstr "" " -v\t\tBýt podrobný.\n" " -C Určení zařízení konzoly, kterou používat.\n" " -V\t\tVytisknout verzi a skončit.\n" -"Soubory jsou načítány z aktuálního adresáře nebo /usr/lib/kbd/*/.\n" +"Soubory jsou načítány z aktuálního adresáře nebo %s/*/.\n" #: src/setfont.c:176 #, c-format diff --git a/po/de.po b/po/de.po index 4f868df..e3290c7 100644 --- a/po/de.po +++ b/po/de.po @@ -814,7 +814,7 @@ msgid "" " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Aufruf: setfont [Schreib-Optionen] [-] [neuer_font..] [-m Konsolemap] [-u Unicodemap]\n" " Schreib-Optionen (werden vor dem Dateiladen aktiviert):\n" @@ -838,7 +838,7 @@ msgstr "" " -v Geschwätziger Modus.\n" " -C Gibt das zu benutzende Gerät an.\n" " -V Ausgabe der Versionsnummer und Beenden.\n" -"Dateien werden im aktuellen Verzeichnis oder in /usr/lib/kbd/*/ gesucht.\n" +"Dateien werden im aktuellen Verzeichnis oder in %s/*/ gesucht.\n" #: src/setfont.c:176 #, c-format diff --git a/po/el.po b/po/el.po index def26e0..4bf3bc9 100644 --- a/po/el.po +++ b/po/el.po @@ -817,7 +817,7 @@ msgid "" " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Χρήση: setfont [write-options] [-] [newfont..] [-m consolemap] [-u unicodemap]\n" " Οι επιλογές-εγγραφής (προηγούνται της φόρτωσης του αρχείου):\n" @@ -841,7 +841,7 @@ msgstr "" " -u none Σταμάτημα φόρτωσης μιάς unicode map.\n" " -v Πληροφορίες κατά την εκτέλεση της εντολής.\n" " -V Εμφάνιση πληροφοριών έκδοσης κι έξοδος.\n" -"Τα αρχεία φορτώνονται από τον τρέχοντα κατάλογο ή από /usr/lib/kbd/*/.\n" +"Τα αρχεία φορτώνονται από τον τρέχοντα κατάλογο ή από %s/*/.\n" #: src/setfont.c:176 #, c-format diff --git a/po/es.po b/po/es.po index b8a206e..8a28bbb 100644 --- a/po/es.po +++ b/po/es.po @@ -818,7 +818,7 @@ msgid "" " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Uso: setfont [opciones-de-escritura] [-] [nueva-fuente..] [-m mapa-de-consola] [-u mapa-unicode]\n" " opciones-de-escritura (previas a la carga del fichero):\n" @@ -842,7 +842,7 @@ msgstr "" " -v Modo verboso.\n" " -C Indicar qué dispositivo de consola va a utilizarse.\n" " -V Imprimir la versión y salir.\n" -"Los ficheros se cargan del directorio actual o de /usr/lib/kbd/*/.\n" +"Los ficheros se cargan del directorio actual o de %s/*/.\n" #: src/setfont.c:176 #, c-format diff --git a/po/gr.po b/po/gr.po index a195e83..1807e5d 100644 --- a/po/gr.po +++ b/po/gr.po @@ -770,7 +770,7 @@ msgid "" " -u none\tSuppress loading of a unicode map.\n" " -v\t\tBe verbose.\n" " -V\t\tPrint version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Χρήση: setfont [επιλογές-εγγραφής] [-] [νέα-γραμματοσειρά..] [-m consolemap] [-u unicodemap]\n" " Οι επιλογές-εγγραφής (προηγούνται της φόρτωσης του αρχείου):\n" @@ -794,7 +794,7 @@ msgstr "" " -u none Σταμάτημα φόρτωσης μιάς unicode map.\n" " -v Πληροφορίες κατά την εκτέλεση της εντολής.\n" " -V Εμφάνιση πληροφοριών έκδοσης κι έξοδος.\n" -"Τα αρχεία φορτώνονται από τον τρέχοντα κατάλογο ή από /usr/lib/kbd/*/.\n" +"Τα αρχεία φορτώνονται από τον τρέχοντα κατάλογο ή από %s/*/.\n" #: src/setfont.c:169 msgid "setfont: too many input files\n" diff --git a/po/nl.po b/po/nl.po index dc1a748..94fed5e 100644 --- a/po/nl.po +++ b/po/nl.po @@ -816,7 +816,7 @@ msgid "" " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Gebruik: setfont [schrijfopties] [-] [nieuwlettertype..] [-m consolekaart] [-u unicodekaart]\n" " schrijfopties (dit gebeurt voor het laden van het bestand):\n" @@ -840,7 +840,7 @@ msgstr "" " -v Wees luidruchtig.\n" " -C Aangeven welk console apparaat gebruikt moet worden.\n" " -V Versie weergeven en afsluiten.\n" -"Bestanden worden geladen uit de huidige map of uit /usr/lib/kbd/*/.\n" +"Bestanden worden geladen uit de huidige map of uit %s/*/.\n" #: src/setfont.c:176 #, c-format diff --git a/po/pl.po b/po/pl.po index 3cf0a1c..d903c3d 100644 --- a/po/pl.po +++ b/po/pl.po @@ -816,7 +816,7 @@ msgid "" " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Sk³adnia: setfont [opcje-zapisu] [-] [nowyfont...] [-m mapakon] [-u unimapa]\n" " opcje-zapisu (uwzglêdniane przed wczytywaniem pliku):\n" @@ -840,7 +840,7 @@ msgstr "" " -v Podawanie du¿ej ilo¶ci informacji.\n" " -C Okre¶lenie urz±dzenia konsoli, które ma byæ u¿yte\n" " -V Wypisanie informacji o wersji i zakoñczenie.\n" -"Pliki s± wczytywane z katalogu bie¿±cego lub /usr/lib/kbd/*/.\n" +"Pliki s± wczytywane z katalogu bie¿±cego lub %s/*/.\n" #: src/setfont.c:176 #, c-format diff --git a/po/ro.po b/po/ro.po index c6bb0dc..6c9f2ea 100644 --- a/po/ro.po +++ b/po/ro.po @@ -770,7 +770,7 @@ msgid "" " -u none\tSuppress loading of a unicode map.\n" " -v\t\tBe verbose.\n" " -V\t\tPrint version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "Folosire: setfont [opþiuni-scriere] [-] [fontnou..] [-m mapare_consolã] [-u mapare_unicode]\n" " opþiuni-scriere (are loc înainte de încãrcarea fiºierului):\n" @@ -793,7 +793,7 @@ msgstr "" " -u nimic\tSe suprimã încãrcarea unei mapãri unicode\n" " -v\t\tDetaliat.\n" " -V\t\tAfiºeazã versiunea ºi iese.\n" -"Fiºierele sunt încãrcate din directorul curent sau din /usr/lib/kbd/*/.\n" +"Fiºierele sunt încãrcate din directorul curent sau din %s/*/.\n" #: src/setfont.c:169 msgid "setfont: too many input files\n" diff --git a/po/ru.po b/po/ru.po index 579a86e..86f28d0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1012,7 +1012,7 @@ msgid "" " -u none\tSuppress loading of a unicode map.\n" " -v\t\tBe verbose.\n" " -V\t\tPrint version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" +"Files are loaded from the current directory or %s/*/.\n" msgstr "" "ðÏÌØÚÏ×ÁÔØÓÑ ÔÁË:\n" "\tsetfont [ÐÁÒÁÍÅÔÒÙ_ÚÁÐÉÓÉ] [-] [ÎÏ×ÙÊ_ÛÒÉÆÔ] [-m ÓÈÅÍÁ_ÜËÒÁÎÁ] [-u " @@ -1046,7 +1046,7 @@ msgstr "" "\t -v ðÏÄÒÏÂÎÏ ÒÁÓÓËÁÚÙ×ÁÔØ Ï ÐÒÏÉÚ×ÏÄÉÍÙÈ ÄÅÊÓÔ×ÉÑÈ.\n" "\t -V ðÒÏÓÔÏ ÐÏËÁÚÁÔØ ×ÅÒÓÉÀ É ÔÏÌØËÏ.\n" "\n" -"æÁÊÌÙ ÚÁÇÒÕÖÁÀÔÓÑ ÉÚ ÔÅËÕÝÅÊ ÄÉÒÅËÔÏÒÉÉ ÉÌÉ ÉÚ `/usr/share/kbd/...'.\n" +"æÁÊÌÙ ÚÁÇÒÕÖÁÀÔÓÑ ÉÚ ÔÅËÕÝÅÊ ÄÉÒÅËÔÏÒÉÉ ÉÌÉ ÉÚ `%s/...'.\n" #: src/setfont.c:121 #, c-format diff --git a/src/Makefile.in b/src/Makefile.in index cc25af0..161de0c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,32 +1,15 @@ -include ../make_include - -PREFIX = @prefix@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +OPTIONAL_PROGS = @OPTIONAL_PROGS@ # Something like /usr/lib/kbd or /usr/share/kbd -ifndef DATA_DIR DATA_DIR = @datadir@ -endif - -ifndef BINDIR -BINDIR = $(DESTDIR)$(PREFIX)/bin -endif # Maybe we want to use a qwertz keyboard before /usr is mounted -ifndef LOADKEYS_BINDIR -ifeq ($(PREFIX), /usr) - LOADKEYS_BINDIR = $(DESTDIR)/bin -else - LOADKEYS_BINDIR = $(DESTDIR)$(PREFIX)/bin -endif -endif - -# Omit the "-o root" when installing elsewhere -ifeq "$(DESTDIR)" "" - setowner = -o root -else - setowner = -endif +LOADKEYS_BINDIR ?= /bin +OLDPROGS= mapscrn loadunimap PROGS = dumpkeys loadkeys showkey setfont showconsolefont \ setleds setmetamode kbd_mode chvt deallocvt \ psfxtable kbdrate fgconsole @@ -43,26 +26,17 @@ ifeq ($(ARCH), i386) PROGS += resizecons endif -OLDPROGS= mapscrn loadunimap - # Not installed by default -MISC = screendump setlogcons setvesablank spawn_console spawn_login \ - getunimap clrunimap outpsfheader setpalette +ifdef OPTIONAL_PROGS +PROGS += screendump setlogcons setvesablank spawn_console spawn_login \ + getunimap clrunimap outpsfheader setpalette +endif # Installed by default SHCMDS = unicode_start unicode_stop WARN = -Wall -Wmissing-prototypes -Wstrict-prototypes DEFS = -DDATADIR=\"$(DATA_DIR)\" -ifndef RPM_OPT_FLAGS - RPM_OPT_FLAGS = -O2 -pipe -Wall -endif -CFLAGS += $(RPM_OPT_FLAGS) -LDFLAGS = -s - -CC = gcc -YACC = bison -y -LEX = flex -8 .c.o: $(CC) -c $(WARN) $(CFLAGS) $(DEFS) $< @@ -73,21 +47,19 @@ progs: $(PROGS) old: $(OLDPROGS) -install: all - install -d -m 0755 $(BINDIR) $(LOADKEYS_BINDIR) - install -s -m 0755 $(setowner) $(PROGS) $(OLDPROGS) $(BINDIR) -# install -s -m 0755 $(setowner) $(MISC) $(BINDIR) - install -c -m 0755 $(setowner) $(SHCMDS) $(BINDIR) +install: all + install -d -m 0755 $(bindir) $(LOADKEYS_BINDIR) + install -s -m 0755 $(PROGS) $(OLDPROGS) $(SHCMDS) $(bindir) for i in psfaddtable psfgettable psfstriptable; do \ - rm -f $(BINDIR)/$$i; ln -s psfxtable $(BINDIR)/$$i; \ + rm -f $(bindir)/$$i; ln -s psfxtable $(bindir)/$$i; \ done - rm -f $(BINDIR)/loadkeys - install -s -m 0755 $(setowner) loadkeys $(LOADKEYS_BINDIR) + rm -f $(bindir)/loadkeys + install -s -m 0755 loadkeys $(LOADKEYS_BINDIR) @echo "You may also want to add psf.magic to /usr/lib/magic" # loadkeys.o: separate rule since the flex output does not permit -Wall -loadkeys.o: loadkeys.c analyze.c +loadkeys.o: loadkeys.c analyze.c $(CC) -c $(CFLAGS) $(DEFS) $< @@ -103,10 +75,13 @@ $(OLDPROGS): %: main_%.o findfile.o psffontop.o utf8.o $(CC) $(LDFLAGS) $^ -o $@ -clean reallyclean spotless distclean: +clean reallyclean spotless: rm -f core *.o analyze.c loadkeys.c rm -f $(PROGS) $(OLDPROGS) $(MISC) *~ +distclean: clean + rm -f Makefile + $(PROGS): %: %.o # diff --git a/src/chvt.c b/src/chvt.c index 0a0fc46..1e12552 100644 --- a/src/chvt.c +++ b/src/chvt.c @@ -18,8 +18,8 @@ main(int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/clrunimap.c b/src/clrunimap.c index 4c777ea..63d162f 100644 --- a/src/clrunimap.c +++ b/src/clrunimap.c @@ -19,8 +19,8 @@ main(int argc, char *argv[]) { char *console = NULL; setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc >= 3 && !strcmp(argv[1], "-C")) console = argv[2]; diff --git a/src/deallocvt.c b/src/deallocvt.c index 0b01b20..7eb3836 100644 --- a/src/deallocvt.c +++ b/src/deallocvt.c @@ -22,8 +22,8 @@ main(int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/dumpkeys.c b/src/dumpkeys.c index cc49bfa..8f7fd1c 100644 --- a/src/dumpkeys.c +++ b/src/dumpkeys.c @@ -583,8 +583,8 @@ main (int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { diff --git a/src/fgconsole.c b/src/fgconsole.c index d0079a2..07380b7 100644 --- a/src/fgconsole.c +++ b/src/fgconsole.c @@ -38,8 +38,8 @@ main(int argc, char **argv){ { NULL, 0, NULL, 0 } }; setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); set_progname(argv[0]); while (( c = getopt_long (argc, argv, "Vhn", long_opts, NULL)) != EOF) { diff --git a/src/getkeycodes.c b/src/getkeycodes.c index 0f9bfa1..e2d7962 100644 --- a/src/getkeycodes.c +++ b/src/getkeycodes.c @@ -28,8 +28,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/getunimap.c b/src/getunimap.c index 16897fc..810e512 100644 --- a/src/getunimap.c +++ b/src/getunimap.c @@ -42,8 +42,8 @@ main(int argc, char **argv){ set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) diff --git a/src/kbd_mode.c b/src/kbd_mode.c index c542238..3b03a0e 100644 --- a/src/kbd_mode.c +++ b/src/kbd_mode.c @@ -28,8 +28,8 @@ main(int argc, char *argv[]){ set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/kbdrate.c b/src/kbdrate.c index 945d25d..3e11bb4 100644 --- a/src/kbdrate.c +++ b/src/kbdrate.c @@ -239,8 +239,8 @@ main( int argc, char **argv ) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) diff --git a/src/loadunimap.c b/src/loadunimap.c index 3340adf..74eb87a 100644 --- a/src/loadunimap.c +++ b/src/loadunimap.c @@ -54,8 +54,8 @@ main(int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) diff --git a/src/mapscrn.c b/src/mapscrn.c index d3ea58c..e81cad4 100644 --- a/src/mapscrn.c +++ b/src/mapscrn.c @@ -41,8 +41,8 @@ main(int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/nls.h b/src/nls.h index 899aff9..5960c0d 100644 --- a/src/nls.h +++ b/src/nls.h @@ -1,15 +1,11 @@ -#include "../defines.h" /* for HAVE_locale_h */ - -#ifndef PACKAGE -#define PACKAGE "kbd" -#endif +#include "../config.h" #ifndef LOCALEDIR #define LOCALEDIR "/usr/share/locale" #endif -#ifdef HAVE_locale_h +#ifdef HAVE_LOCALE_H # include #endif diff --git a/src/psfxtable.c b/src/psfxtable.c index 3d112f7..0eda1bd 100644 --- a/src/psfxtable.c +++ b/src/psfxtable.c @@ -240,8 +240,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/resizecons.c b/src/resizecons.c index 65fec76..c4a8e9d 100644 --- a/src/resizecons.c +++ b/src/resizecons.c @@ -121,8 +121,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc < 2) usage(); diff --git a/src/screendump.c b/src/screendump.c index 554f01a..5494295 100644 --- a/src/screendump.c +++ b/src/screendump.c @@ -38,8 +38,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/setfont.c b/src/setfont.c index 0e56c2f..aa5dd79 100644 --- a/src/setfont.c +++ b/src/setfont.c @@ -93,8 +93,8 @@ usage(void) " -v Be verbose.\n" " -C Indicate console device to be used.\n" " -V Print version and exit.\n" -"Files are loaded from the current directory or /usr/lib/kbd/*/.\n" -)); +"Files are loaded from the current directory or %s/*/.\n" +), DATADIR); exit(EX_USAGE); } @@ -110,8 +110,8 @@ main(int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); ifiles[0] = mfil = ufil = Ofil = ofil = omfil = oufil = NULL; iunit = hwunit = 0; diff --git a/src/setkeycodes.c b/src/setkeycodes.c index 5fb1cb8..d834fdc 100644 --- a/src/setkeycodes.c +++ b/src/setkeycodes.c @@ -33,8 +33,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/setleds.c b/src/setleds.c index ca4cf3b..6863741 100644 --- a/src/setleds.c +++ b/src/setleds.c @@ -156,8 +156,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && (!strcmp("-V", argv[1]) || !strcmp("--version", argv[1]))) print_version_and_exit(); diff --git a/src/setlogcons.c b/src/setlogcons.c index b046f36..cfccb85 100644 --- a/src/setlogcons.c +++ b/src/setlogcons.c @@ -18,8 +18,8 @@ main(int argc, char **argv){ struct { char fn, subarg; } arg; setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2) cons = atoi(argv[1]); diff --git a/src/setmetamode.c b/src/setmetamode.c index d4bd0b3..4b4aab2 100644 --- a/src/setmetamode.c +++ b/src/setmetamode.c @@ -66,8 +66,8 @@ main(int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit(); diff --git a/src/setvesablank.c b/src/setvesablank.c index 0e9d0ae..f0e23bd 100644 --- a/src/setvesablank.c +++ b/src/setvesablank.c @@ -16,8 +16,8 @@ main(int argc, char *argv[]) { struct { char ten, onoff; } arg; setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc != 2) { fprintf(stderr, _("usage: %s\n"), "setvesablank ON|on|off"); diff --git a/src/showconsolefont.c b/src/showconsolefont.c index 1bd7f2f..fb50064 100644 --- a/src/showconsolefont.c +++ b/src/showconsolefont.c @@ -122,8 +122,8 @@ main (int argc, char **argv) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) diff --git a/src/showkey.c b/src/showkey.c index 6f73425..4bc777e 100644 --- a/src/showkey.c +++ b/src/showkey.c @@ -111,8 +111,8 @@ main (int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { diff --git a/src/totextmode.c b/src/totextmode.c index 7d0c4ae..3d59061 100644 --- a/src/totextmode.c +++ b/src/totextmode.c @@ -19,8 +19,8 @@ main(int argc, char *argv[]) { set_progname(argv[0]); setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + bindtextdomain(PACKAGE_NAME, LOCALEDIR); + textdomain(PACKAGE_NAME); if (argc == 2 && !strcmp(argv[1], "-V")) print_version_and_exit();