1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00

configure: update localedir

Previous patch incorrectly skipped replace of @LOCALEDIR@.

The standard option is --localedir  so use --with-localedir
as backward compatible option and set localedir if it's not
yet been set (if the could ever happen).

Use double-eval to translate $datarootdir to $prefix to real dir.
This commit is contained in:
Zdenek Kabelac 2015-05-18 18:13:07 +02:00
parent aa2d39c2ca
commit dc49e1cde0
4 changed files with 13 additions and 9 deletions

10
configure vendored
View File

@ -1724,7 +1724,7 @@ Optional Packages:
lvmetad pidfile [PID_DIR/lvmetad.pid]
--with-lvmpolld-pidfile=PATH
lvmpolld pidfile [PID_DIR/lvmpolld.pid]
--with-localedir=DIR translation files in DIR [PREFIX/share/locale]
--with-localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--with-confdir=DIR configuration files in DIR [/etc]
--with-staticdir=DIR static binaries in DIR [EPREFIX/sbin]
--with-usrlibdir=DIR usrlib in DIR [PREFIX/lib]
@ -12432,9 +12432,9 @@ fi
# Check whether --with-localedir was given.
if test "${with_localedir+set}" = set; then :
withval=$with_localedir; LOCALEDIR=$withval
withval=$with_localedir; localedir=$withval
else
LOCALEDIR="${prefix}/share/locale"
localedir=${localedir-'${datarootdir}/locale'}
fi
@ -12442,9 +12442,10 @@ cat >>confdefs.h <<_ACEOF
#define INTL_PACKAGE "$INTL_PACKAGE"
_ACEOF
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
cat >>confdefs.h <<_ACEOF
#define LOCALEDIR "$LOCALEDIR"
#define LOCALEDIR "$(eval echo $(eval echo $localedir))"
_ACEOF
fi
@ -13262,6 +13263,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################

View File

@ -1516,10 +1516,11 @@ if test "$INTL" = yes; then
AC_ARG_WITH(localedir,
AC_HELP_STRING([--with-localedir=DIR],
[translation files in DIR [PREFIX/share/locale]]),
LOCALEDIR=$withval, LOCALEDIR="${prefix}/share/locale")
[locale-dependent data [DATAROOTDIR/locale]]),
localedir=$withval, localedir=${localedir-'${datarootdir}/locale'})
AC_DEFINE_UNQUOTED([INTL_PACKAGE], ["$INTL_PACKAGE"], [Internalization package])
AC_DEFINE_UNQUOTED([LOCALEDIR], ["$LOCALEDIR"], [Location of translation files])
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
AC_DEFINE_UNQUOTED([LOCALEDIR], ["$(eval echo $(eval echo $localedir))"], [Locale-dependent data])
fi
################################################################################
@ -1813,6 +1814,7 @@ AC_SUBST(LVM_PATCHLEVEL)
AC_SUBST(LVM_PATH)
AC_SUBST(LVM_RELEASE)
AC_SUBST(LVM_RELEASE_DATE)
AC_SUBST(localedir)
AC_SUBST(MANGLING)
AC_SUBST(MIRRORS)
AC_SUBST(MSGFMT)

View File

@ -507,7 +507,7 @@
/* Internalization package */
#undef INTL_PACKAGE
/* Location of translation files */
/* Locale-dependent data */
#undef LOCALEDIR
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing

View File

@ -82,7 +82,7 @@ datarootdir = @datarootdir@
datadir = $(DESTDIR)@datadir@
infodir = $(DESTDIR)@infodir@
mandir = $(DESTDIR)@mandir@
localedir = $(DESTDIR)@LOCALEDIR@
localedir = $(DESTDIR)@localedir@
staticdir = $(DESTDIR)@STATICDIR@
udevdir = $(DESTDIR)@udevdir@
pkgconfigdir = $(usrlibdir)/pkgconfig