[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
support for --localedir
From: |
Bruno Haible |
Subject: |
support for --localedir |
Date: |
Fri, 7 Nov 2003 14:52:22 +0100 |
User-agent: |
KMail/1.5 |
Hi,
For years people have asked for an easy way to adjust the installation location
of GNU format message catalogs to their particular conventions. Up to now
my answer was "go modify the Makefiles before building the package".
But now in gettext-0.13, support for internationalized shell scripts is
added. This requires defining @localedir@ as an AC_SUBSTed variable, not
only as a Makefile variable (because the directory has to be hardwired
into the shell script, which is most comfortably done through a configure.ac
line like AC_CONFIG_FILES([hello:hello.sh.in], [chmod a+x hello]) ).
My answer could now be "go modify the config.status before building the
package". And we'll thus see dozens of packages adding this to configure.ac:
AC_SUBST([localedir], ['${datadir}/locale'])
You see, it's starting to get inconvenient.
I therefore propose to add a --localedir option that works like --mandir,
--infodir, and so on.
2003-11-06 Bruno Haible <address@hidden>
* lib/autoconf/general.m4: Add new configure option --localedir.
* doc/autoconf.texi (Installation Directory Variables): Document
localedir.
*** autoconf-2.58/lib/autoconf/general.m4.bak 2003-10-27 12:10:56.000000000
+0100
--- autoconf-2.58/lib/autoconf/general.m4 2003-11-06 01:33:32.000000000
+0100
***************
*** 540,545 ****
--- 540,546 ----
AC_SUBST([oldincludedir], ['/usr/include'])dnl
AC_SUBST([infodir], ['${prefix}/info'])dnl
AC_SUBST([mandir], ['${prefix}/man'])dnl
+ AC_SUBST([localedir], ['${datadir}/locale'])dnl
ac_prev=
for ac_option
***************
*** 652,664 ****
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
! | --localstate | --localstat | --localsta | --localst \
! | --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
! | --localstate=* | --localstat=* | --localsta=* | --localst=* \
! | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
--- 653,668 ----
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
! | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
! | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
***************
*** 851,857 ****
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
! localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
--- 855,862 ----
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
! localstatedir libdir includedir oldincludedir infodir mandir \
! localedir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
***************
*** 951,956 ****
--- 956,962 ----
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
+ --localedir=DIR locale-dependent data [DATADIR/locale]
_ACEOF
cat <<\_ACEOF]
*** autoconf-2.58/doc/autoconf.texi.bak 2003-11-04 09:33:44.000000000 +0100
--- autoconf-2.58/doc/autoconf.texi 2003-11-06 01:31:30.000000000 +0100
***************
*** 2277,2282 ****
--- 2277,2289 ----
The directory for installing executables that other programs run.
@end defvar
+ @defvar localedir
+ @ovindex localedir
+ The directory for installing locale-dependent but architecture-independent
+ data, such as message catalogs. This directory usually has a subdirectory
+ per locale.
+ @end defvar
+
@defvar localstatedir
@ovindex localstatedir
The directory for installing modifiable single-machine data.
- support for --localedir,
Bruno Haible <=