2 # Convenience script for regenerating all autogeneratable files that are
3 # omitted from the version control repository. In particular, this script
4 # also regenerates all aclocal.m4, config.h.in, Makefile.in, configure files
5 # with new versions of autoconf or automake.
7 # This script requires autoconf-2.63 and automake-1.11 in the PATH.
8 # It also requires either
9 # - the GNULIB_TOOL environment variable pointing to the gnulib-tool script
10 # in a gnulib checkout, or
11 # - the git program in the PATH and an internet connection.
13 # - the gperf program.
15 # Copyright (C) 2003-2009 Free Software Foundation, Inc.
17 # This program is free software: you can redistribute it and/or modify
18 # it under the terms of the GNU General Public License as published by
19 # the Free Software Foundation; either version 3 of the License, or
20 # (at your option) any later version.
22 # This program is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU General Public License for more details.
27 # You should have received a copy of the GNU General Public License
28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30 # Usage: ./autogen.sh [--skip-gnulib]
32 # Usage from a git checkout: ./autogen.sh
33 # This uses an up-to-date gnulib checkout.
35 # Usage from a released tarball: ./autogen.sh --skip-gnulib
36 # This does not use a gnulib checkout.
41 --skip-gnulib) skip_gnulib=true; shift;;
46 if test $skip_gnulib = false; then
48 # The most recent snapshot of it is available in the gnulib repository.
49 # But this is a snapshot, with all possible dangers.
50 # A stable release of it is available through "automake --add-missing --copy",
51 # but that is too old (does not support @arrow{}). So take the version which
52 # matches the latest stable texinfo release.
53 if test ! -f build-aux/texinfo.tex; then
54 { wget -q --timeout=5 -O build-aux/texinfo.tex.tmp 'http://cvs.savannah.gnu.org/viewvc/*checkout*/texinfo/doc/texinfo.tex?root=texinfo&pathrev=texinfo_4_13' \
55 && mv build-aux/texinfo.tex.tmp build-aux/texinfo.tex; \
56 } || rm -f build-aux/texinfo.tex.tmp
58 if test -z "$GNULIB_TOOL"; then
59 # Check out gnulib in a subdirectory 'gnulib'.
60 if test -d gnulib; then
61 (cd gnulib && git pull)
63 git clone git://git.savannah.gnu.org/gnulib.git
65 # Now it should contain a gnulib-tool.
66 if test -f gnulib/gnulib-tool; then
67 GNULIB_TOOL=`pwd`/gnulib/gnulib-tool
69 echo "** warning: gnulib-tool not found" 1>&2
72 # Skip the gnulib-tool step if gnulib-tool was not found.
73 if test -n "$GNULIB_TOOL"; then
74 if test -f m4/gnulib-cache.m4; then
75 mv -f m4/gnulib-cache.m4 m4/gnulib-cache.m4~
77 if test -f lib/Makefile.gnulib; then
78 mv -f lib/Makefile.gnulib lib/Makefile.gnulib~
94 unistr/u8-mbtouc-unsafe
135 unistr/u16-mbtouc-unsafe
140 unistr/u16-startswith
176 unistr/u32-mbtouc-unsafe
181 unistr/u32-startswith
207 uniconv/u8-conv-from-enc
208 uniconv/u8-conv-to-enc
209 uniconv/u8-strconv-from-enc
210 uniconv/u8-strconv-from-locale
211 uniconv/u8-strconv-to-enc
212 uniconv/u8-strconv-to-locale
213 uniconv/u16-conv-from-enc
214 uniconv/u16-conv-to-enc
215 uniconv/u16-strconv-from-enc
216 uniconv/u16-strconv-from-locale
217 uniconv/u16-strconv-to-enc
218 uniconv/u16-strconv-to-locale
219 uniconv/u32-conv-from-enc
220 uniconv/u32-conv-to-enc
221 uniconv/u32-strconv-from-enc
222 uniconv/u32-strconv-from-locale
223 uniconv/u32-strconv-to-enc
224 uniconv/u32-strconv-to-locale
226 unistdio/u8-asnprintf
230 unistdio/u8-u8-asnprintf
231 unistdio/u8-u8-asprintf
232 unistdio/u8-u8-snprintf
233 unistdio/u8-u8-sprintf
234 unistdio/u8-u8-vasnprintf
235 unistdio/u8-u8-vasprintf
236 unistdio/u8-u8-vsnprintf
237 unistdio/u8-u8-vsprintf
238 unistdio/u8-vasnprintf
239 unistdio/u8-vasprintf
240 unistdio/u8-vsnprintf
242 unistdio/u16-asnprintf
243 unistdio/u16-asprintf
244 unistdio/u16-snprintf
246 unistdio/u16-u16-asnprintf
247 unistdio/u16-u16-asprintf
248 unistdio/u16-u16-snprintf
249 unistdio/u16-u16-sprintf
250 unistdio/u16-u16-vasnprintf
251 unistdio/u16-u16-vasprintf
252 unistdio/u16-u16-vsnprintf
253 unistdio/u16-u16-vsprintf
254 unistdio/u16-vasnprintf
255 unistdio/u16-vasprintf
256 unistdio/u16-vsnprintf
257 unistdio/u16-vsprintf
258 unistdio/u32-asnprintf
259 unistdio/u32-asprintf
260 unistdio/u32-snprintf
262 unistdio/u32-u32-asnprintf
263 unistdio/u32-u32-asprintf
264 unistdio/u32-u32-snprintf
265 unistdio/u32-u32-sprintf
266 unistdio/u32-u32-vasnprintf
267 unistdio/u32-u32-vasprintf
268 unistdio/u32-u32-vsnprintf
269 unistdio/u32-u32-vsprintf
270 unistdio/u32-vasnprintf
271 unistdio/u32-vasprintf
272 unistdio/u32-vsnprintf
273 unistdio/u32-vsprintf
274 unistdio/ulc-asnprintf
275 unistdio/ulc-asprintf
277 unistdio/ulc-snprintf
279 unistdio/ulc-vasnprintf
280 unistdio/ulc-vasprintf
281 unistdio/ulc-vfprintf
282 unistdio/ulc-vsnprintf
283 unistdio/ulc-vsprintf
287 unictype/bidicategory-all
289 unictype/category-all
290 unictype/combining-class
302 unictype/ctype-xdigit
303 unictype/decimal-digit
307 unictype/property-all
309 unictype/syntax-c-ident
310 unictype/syntax-c-whitespace
311 unictype/syntax-java-ident
312 unictype/syntax-java-whitespace
316 uniwidth/u16-strwidth
318 uniwidth/u32-strwidth
322 uniwbrk/u8-wordbreaks
323 uniwbrk/u16-wordbreaks
324 uniwbrk/u32-wordbreaks
325 uniwbrk/ulc-wordbreaks
326 uniwbrk/wordbreak-property
328 unilbrk/u8-possible-linebreaks
329 unilbrk/u8-width-linebreaks
330 unilbrk/u16-possible-linebreaks
331 unilbrk/u16-width-linebreaks
332 unilbrk/u32-possible-linebreaks
333 unilbrk/u32-width-linebreaks
334 unilbrk/ulc-possible-linebreaks
335 unilbrk/ulc-width-linebreaks
337 uninorm/canonical-decomposition
339 uninorm/decomposition
349 uninorm/u16-normalize
353 uninorm/u32-normalize
358 unicase/empty-prefix-context
359 unicase/empty-suffix-context
360 unicase/locale-language
368 unicase/u8-ct-casefold
369 unicase/u8-ct-tolower
370 unicase/u8-ct-totitle
371 unicase/u8-ct-toupper
373 unicase/u8-is-casefolded
374 unicase/u8-is-lowercase
375 unicase/u8-is-titlecase
376 unicase/u8-is-uppercase
384 unicase/u16-ct-casefold
385 unicase/u16-ct-tolower
386 unicase/u16-ct-totitle
387 unicase/u16-ct-toupper
389 unicase/u16-is-casefolded
390 unicase/u16-is-lowercase
391 unicase/u16-is-titlecase
392 unicase/u16-is-uppercase
400 unicase/u32-ct-casefold
401 unicase/u32-ct-tolower
402 unicase/u32-ct-totitle
403 unicase/u32-ct-toupper
405 unicase/u32-is-casefolded
406 unicase/u32-is-lowercase
407 unicase/u32-is-titlecase
408 unicase/u32-is-uppercase
417 $GNULIB_TOOL --lib=libunistring --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \
418 --with-tests --lgpl --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local \
419 --import $GNULIB_MODULES
420 # Change lib/unistr.h to be usable standalone.
421 sed -e 's/ifdef GNULIB_[A-Za-z0-9_]*/if 1/' -e 's/defined GNULIB_[A-Za-z0-9_]*/1/g' \
422 -e 's/HAVE_INLINE/UNISTRING_HAVE_INLINE/g' \
425 && mv lib/unistr.h.tmp lib/unistr.h
426 # Change lib/unictype.h and lib/uninorm.h for shared libraries on Woe32 systems.
427 sed -e 's/extern const uc_general_category_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_/' \
428 -e 's/extern const uc_property_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_/' \
430 > lib/unictype.h.tmp \
431 && mv lib/unictype.h.tmp lib/unictype.h
432 sed -e 's/extern const struct unicode_normalization_form /extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form /' \
434 > lib/uninorm.h.tmp \
435 && mv lib/uninorm.h.tmp lib/uninorm.h
436 sed -e 's/extern const casing_/extern LIBUNISTRING_DLL_VARIABLE const casing_/' \
438 > lib/unicase.h.tmp \
439 && mv lib/unicase.h.tmp lib/unicase.h
440 $GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess
441 $GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub
442 # If we got no texinfo.tex so far, take the snapshot from gnulib.
443 if test ! -f build-aux/texinfo.tex; then
444 $GNULIB_TOOL --copy-file build-aux/texinfo.tex build-aux/texinfo.tex
449 build-aux/fixaclocal aclocal -I m4 -I gnulib-m4
451 autoheader && touch config.h.in
452 automake --add-missing --copy