Remove support for ancient gettext versions.
SVN revision: 20275
This commit is contained in:
parent
2c8b73abb4
commit
00cb6cff7a
|
@ -175,5 +175,3 @@ AC_DEFUN([AC_C___ATTRIBUTE__],
|
|||
fi
|
||||
AC_MSG_RESULT($ac_cv___attribute__)
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
||||
|
|
75
autogen.sh
75
autogen.sh
|
@ -1,70 +1,41 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
PKG_NAME="enlightenment"
|
||||
|
||||
srcdir=`dirname $0`
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile Enlightenment."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile Enlightenment."
|
||||
echo "Get it at ftp://ftp.gnu.org/pub/gnu/automake"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have gettext installed to compile Enlightenment."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/gettext"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(test -d src && test -d dox) || {
|
||||
echo "You must run this script in the top-level Enlightenment directory"
|
||||
echo "You must run this script in the top-level directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Generating configuration files, please wait...."
|
||||
|
||||
rm -rf autom4te.cache
|
||||
rm -f aclocal.m4
|
||||
|
||||
echo "Running autopoint -f"
|
||||
autopoint -f || gautopoint -f || exit 1
|
||||
echo "Running aclocal -I m4 $ACLOCAL_FLAGS"
|
||||
aclocal -I m4 $ACLOCAL_FLAGS || exit 1
|
||||
echo "Running autoconf"
|
||||
autoconf || exit 1
|
||||
echo "Running autoheader"
|
||||
autoheader || exit 1
|
||||
echo "Running automake --add-missing"
|
||||
automake --add-missing || exit 1
|
||||
|
||||
|
||||
#conf_flags="--enable-maintainer-mode --enable-compile-warnings"
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
echo "Generating configuration files for Enlightenment, please wait...."
|
||||
|
||||
#echo " gettextize -f"
|
||||
#gettextize -f
|
||||
echo " setup-gettext.sh"
|
||||
grep 'AM_GNU_GETTEXT_VERSION' configure.in >/dev/null 2>&1 || sh ./setup-gettext.sh --install
|
||||
sh ./setup-gettext.sh
|
||||
echo " aclocal -I m4 $ACLOCAL_FLAGS"
|
||||
aclocal -I m4 $ACLOCAL_FLAGS
|
||||
echo " autoheader"
|
||||
autoheader
|
||||
echo " automake --add-missing"
|
||||
automake --add-missing
|
||||
echo " autoconf"
|
||||
autoconf
|
||||
|
||||
|
||||
#conf_flags="--enable-maintainer-mode --enable-compile-warnings"
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
echo "Running $srcdir/configure $conf_flags $@ ..."
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME
|
||||
&& echo "Now type 'make' to compile."
|
||||
else
|
||||
echo Skipping configure process.
|
||||
echo "Skipping configure process."
|
||||
fi
|
||||
|
|
|
@ -67,10 +67,6 @@ AC_CHECK_FUNCS(buttox)
|
|||
|
||||
AM_GNU_GETTEXT
|
||||
AM_GNU_GETTEXT_VERSION(0.12.1)
|
||||
if test "x$LIBINTL" = "x"; then
|
||||
LIBINTL="$INTLLIBS"
|
||||
AC_SUBST(LIBINTL)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(fsstd,
|
||||
[ --enable-fsstd install files following FSSTD @<:@default=yes@:>@],,
|
||||
|
|
200
setup-gettext.sh
200
setup-gettext.sh
|
@ -1,200 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# setup-gettext - Provides compatibility with versions of gettext
|
||||
# from the 0.10.x series and 0.11.x.
|
||||
#
|
||||
# Copyright (C) 2002 Christian Hammond.
|
||||
#
|
||||
# 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 of
|
||||
# the License, 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
|
||||
#
|
||||
|
||||
VERSION=0.1.3
|
||||
|
||||
VERBOSE=0
|
||||
|
||||
parse_gettext_version() {
|
||||
GETTEXT_VERSION=`$GETTEXT_TOOL --version | sed -n 's/^.*\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\).*$/\1.\2.\3/p'`
|
||||
GETTEXT_MAJOR_VERSION=`echo $GETTEXT_VERSION | sed -n 's/^\([0-9]\+\).*/\1/p'`
|
||||
GETTEXT_MINOR_VERSION=`echo $GETTEXT_VERSION | sed -n 's/^[0-9]\+\.\([0-9]\+\).*/\1/p'`
|
||||
GETTEXT_MICRO_VERSION=`echo $GETTEXT_VERSION | sed -n 's/^[0-9]\+\.[0-9]\+\.\([0-9]\+\).*/\1/p'`
|
||||
}
|
||||
|
||||
find_gettext() {
|
||||
GETTEXT_TOOL=autopoint
|
||||
|
||||
(autopoint --version) < /dev/null > /dev/null 2>&1 || {
|
||||
GETTEXT_TOOL=gettextize
|
||||
|
||||
(gettextize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
GETTEXT_TOOL=
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
install() {
|
||||
[ -f configure.in ] && {
|
||||
cp configure.in .tmp-configure.in
|
||||
sed -e 's/^AM_GNU_GETTEXT\(.*\)$/AM_GNU_GETTEXT\1\
|
||||
AM_GNU_GETTEXT_VERSION(0.10.40)/' < .tmp-configure.in > configure.in
|
||||
rm .tmp-configure.in
|
||||
}
|
||||
|
||||
[ -f configure.ac ] && {
|
||||
cp configure.ac .tmp-configure.ac
|
||||
sed -e 's/^AM_GNU_GETTEXT\(.*\)$/AM_GNU_GETTEXT\1\
|
||||
AM_GNU_GETTEXT_VERSION(0.10.40)/' < .tmp-configure.ac > configure.ac
|
||||
rm .tmp-configure.ac
|
||||
}
|
||||
|
||||
[ -f autogen.sh ] && {
|
||||
cp autogen.sh .tmp-autogen.sh
|
||||
sed -e 's/\(gettextize\|autopoint\) --version/.\/setup-gettext --gettext-tool/1' -e 's/^\(echo.*|[\t ]*\)\?\(gettextize\|autopoint\) -.*$/.\/setup-gettext/1' < .tmp-autogen.sh > autogen.sh
|
||||
rm .tmp-autogen.sh
|
||||
}
|
||||
|
||||
echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' >> acinclude.m4
|
||||
}
|
||||
|
||||
backup_m4() {
|
||||
[ -d m4 ] && mv m4 m4~
|
||||
}
|
||||
|
||||
restore_m4() {
|
||||
[ -d m4~ ] && {
|
||||
rm -rf m4
|
||||
mv m4~ m4
|
||||
}
|
||||
}
|
||||
|
||||
restore_files() {
|
||||
[ -f configure.in~ ] && mv -f configure.in~ configure.in
|
||||
[ -f configure.ac~ ] && mv -f configure.ac~ configure.ac
|
||||
[ -f Makefile.am~ ] && mv -f Makefile.am~ Makefile.am
|
||||
}
|
||||
|
||||
abort() {
|
||||
restore_files
|
||||
restore_m4
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Main code
|
||||
|
||||
find_gettext
|
||||
|
||||
# See if a version of gettext and its tools are installed.
|
||||
if [ x$GETTEXT_TOOL = x ]; then
|
||||
echo
|
||||
echo "You do not have a version of gettext installed."
|
||||
echo "Please download one from your local package repository or"
|
||||
echo "from ftp://ftp.gnu.org/pub/gnu/gettext/"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
parse_gettext_version
|
||||
|
||||
NUMVAR=$#
|
||||
|
||||
if [ $NUMVAR -gt 0 ]; then
|
||||
if [ $NUMVAR -gt 1 ]; then
|
||||
echo "Only one option at a time!"
|
||||
exit 1
|
||||
|
||||
elif [ $1 = "--gettext-tool" ]; then
|
||||
echo $GETTEXT_TOOL
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--help" ]; then
|
||||
echo "setup-gettext v$VERSION"
|
||||
echo "Usage:"
|
||||
echo " --gettext-tool Returns gettextize or autopoint, depending"
|
||||
echo " on the version of gettext installed."
|
||||
echo " --gettext-version Returns the version of gettext installed."
|
||||
echo " --gettext-major-version Returns the major version of gettext installed."
|
||||
echo " --gettext-minor-version Returns the minor version of gettext installed."
|
||||
echo " --gettext-micro-version Returns the micro version of gettext installed."
|
||||
echo " --help Displays this help screen."
|
||||
echo
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--version" ]; then
|
||||
echo $VERSION
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--gettext-version" ]; then
|
||||
echo $GETTEXT_VERSION
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--gettext-major-version" ]; then
|
||||
echo $GETTEXT_MAJOR_VERSION
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--gettext-minor-version" ]; then
|
||||
echo $GETTEXT_MINOR_VERSION
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--gettext-micro-version" ]; then
|
||||
echo $GETTEXT_MICRO_VERSION
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--install" ]; then
|
||||
install
|
||||
echo "setup-gettext installed."
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--happy-url" ]; then
|
||||
echo http://gaim.sf.net/forkgettext.jpg
|
||||
exit 0
|
||||
|
||||
elif [ $1 = "--verbose" ]; then
|
||||
VERBOSE=1
|
||||
|
||||
else
|
||||
echo "Invalid option '$1'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Okay, run the main stuff
|
||||
if [ "$GETTEXT_TOOL" = "autopoint" ]; then
|
||||
backup_m4
|
||||
[ $VERBOSE -eq 1 ] && echo " autopoint --force"
|
||||
echo n | autopoint --force || abort
|
||||
restore_m4
|
||||
elif [ $GETTEXT_MINOR_VERSION -eq 11 ]; then
|
||||
backup_m4
|
||||
|
||||
# Gettext is pure evil. It DEMANDS that we press Return no matter
|
||||
# what. This gets rid of their happy "feature" of doom.
|
||||
[ $VERBOSE -eq 1 ] && \
|
||||
echo " gettextize --copy --force --intl --no-changelog"
|
||||
|
||||
sed 's:read .*< /dev/tty::' `which gettextize` > .temp-gettextize
|
||||
chmod +x .temp-gettextize
|
||||
echo n | ./.temp-gettextize --copy --force --intl --no-changelog || abort
|
||||
rm .temp-gettextize
|
||||
|
||||
restore_files
|
||||
restore_m4
|
||||
|
||||
[ -f po/Makevars.template ] && mv po/Makevars.template po/Makevars
|
||||
else
|
||||
[ $VERBOSE -eq 1 ] && echo " gettextize --copy --force"
|
||||
echo n | gettextize --copy --force || exit;
|
||||
fi
|
||||
|
Loading…
Reference in New Issue