summaryrefslogtreecommitdiffstats
path: root/misc/gettextize.in
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-11-20 14:52:33 +0000
committerBruno Haible <bruno@clisp.org>2009-06-21 23:23:06 +0200
commit6f5f49209a1b0724a72ee4602b699e759aafc6ac (patch)
tree04fc9f7e02ea40c303d5fd106da7cb39605ec614 /misc/gettextize.in
parentc7fc80c13db4cd110fcae48a154e67c530d245a3 (diff)
downloadexternal_gettext-6f5f49209a1b0724a72ee4602b699e759aafc6ac.zip
external_gettext-6f5f49209a1b0724a72ee4602b699e759aafc6ac.tar.gz
external_gettext-6f5f49209a1b0724a72ee4602b699e759aafc6ac.tar.bz2
Allow packages to use a preinstalled libintl library without carrying the
intl/ source with them.
Diffstat (limited to 'misc/gettextize.in')
-rw-r--r--misc/gettextize.in69
1 files changed, 43 insertions, 26 deletions
diff --git a/misc/gettextize.in b/misc/gettextize.in
index feecf8b..cb321bd 100644
--- a/misc/gettextize.in
+++ b/misc/gettextize.in
@@ -24,6 +24,7 @@
echo=echo
progname=$0
force=0
+intldir=
configstatus=0
origdir=`pwd`
usage="\
@@ -32,6 +33,7 @@ Usage: gettextize [OPTION]... [package-dir]
--version print version information and exit
-c, --copy copy files instead of making symlinks
-f, --force force writing of new files even if old exist
+ --intl install libintl in a subdirectory
Report bugs to <bug-gnu-gettext@gnu.org>."
package=@PACKAGE@
version=@VERSION@
@@ -39,18 +41,21 @@ try_ln_s=:
while test $# -gt 0; do
case "$1" in
- -c | --copy | --c* )
+ -c | --copy | --cop | --co | --c )
shift
try_ln_s=false ;;
- -f | --force | --f* )
+ -f | --force | --forc | --for | --fo | --f )
shift
force=1 ;;
- -r | --run | --r* )
+ -r | --run | --ru | --r )
shift
configstatus=1 ;;
- --help | --h* )
+ --help | --hel | --he | --h )
$echo "$usage"; exit 0 ;;
- --version | --v* )
+ --intl | --int | --in | --i )
+ shift
+ intldir=yes ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v )
echo "$progname (GNU $package) $version"
$echo "Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -122,11 +127,13 @@ if test -d intl; then
fi
done)
else
- $echo "Creating intl/ subdirectory"
- mkdir intl || {
- $echo "failed to create intl/ subdirectory"
- exit 1;
- }
+ if test -n "$intldir"; then
+ $echo "Creating intl/ subdirectory"
+ mkdir intl || {
+ $echo "failed to create intl/ subdirectory"
+ exit 1;
+ }
+ fi
fi
test -d po || {
@@ -155,23 +162,29 @@ for file in *; do
done
# Copy files to intl/ subdirectory.
-cd intl
-for file in *; do
- if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
- rm -f $srcdir/intl/$file
- if test $file != plural.c; then
- ($try_ln_s && ln -s $gettext_dir/intl/$file $srcdir/intl/$file && $echo "Symlinking file intl/$file") 2>/dev/null ||
- { $echo "Copying file intl/$file"; cp $file $srcdir/intl/$file; }
- else
- # plural.c is a generated file; it must be copied and touched.
- $echo "Copying file intl/$file"; cp $file $srcdir/intl/$file
- sleep 2; touch $srcdir/intl/$file
+if test -n "$intldir"; then
+ cd intl
+ for file in *; do
+ if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
+ rm -f $srcdir/intl/$file
+ if test $file != plural.c; then
+ ($try_ln_s && ln -s $gettext_dir/intl/$file $srcdir/intl/$file && $echo "Symlinking file intl/$file") 2>/dev/null ||
+ { $echo "Copying file intl/$file"; cp $file $srcdir/intl/$file; }
+ else
+ # plural.c is a generated file; it must be copied and touched.
+ $echo "Copying file intl/$file"; cp $file $srcdir/intl/$file
+ sleep 2; touch $srcdir/intl/$file
+ fi
fi
- fi
-done
+ done
+ cd ..
+else
+ echo "Not copying intl/ directory. Please use AM_GNU_GETTEXT([external])"
+ echo "in order to cause autoconfiguration to look for an external libintl."
+fi
# Copy files to po/ subdirectory.
-cd ../po
+cd po
for file in *; do
rm -f $srcdir/po/$file
($try_ln_s && ln -s $gettext_dir/po/$file $srcdir/po/$file && $echo "Symlinking file po/$file") 2>/dev/null ||
@@ -206,8 +219,12 @@ rm -f $srcdir/po/ChangeLog.tmp
echo
echo "Please add the files"
-echo " codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4"
-echo " progtest.m4"
+if test -n "$intldir"; then
+ echo " codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4"
+ echo " progtest.m4"
+else
+ echo " gettext.m4 iconv.m4 progtest.m4"
+fi
echo "from the @datadir@/aclocal directory to your autoconf macro directory"
if test -f $srcdir/Makefile.am; then
echo "and run 'aclocal' to regenerate the aclocal.m4 file."