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..2.69 and automake-1.11..1.12 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-2012 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
88 unistr/u8-mbtouc-unsafe
129 unistr/u16-mbtouc-unsafe
134 unistr/u16-startswith
170 unistr/u32-mbtouc-unsafe
175 unistr/u32-startswith
201 uniconv/u8-conv-from-enc
202 uniconv/u8-conv-to-enc
203 uniconv/u8-strconv-from-enc
204 uniconv/u8-strconv-from-locale
205 uniconv/u8-strconv-to-enc
206 uniconv/u8-strconv-to-locale
207 uniconv/u16-conv-from-enc
208 uniconv/u16-conv-to-enc
209 uniconv/u16-strconv-from-enc
210 uniconv/u16-strconv-from-locale
211 uniconv/u16-strconv-to-enc
212 uniconv/u16-strconv-to-locale
213 uniconv/u32-conv-from-enc
214 uniconv/u32-conv-to-enc
215 uniconv/u32-strconv-from-enc
216 uniconv/u32-strconv-from-locale
217 uniconv/u32-strconv-to-enc
218 uniconv/u32-strconv-to-locale
220 unistdio/u8-asnprintf
224 unistdio/u8-u8-asnprintf
225 unistdio/u8-u8-asprintf
226 unistdio/u8-u8-snprintf
227 unistdio/u8-u8-sprintf
228 unistdio/u8-u8-vasnprintf
229 unistdio/u8-u8-vasprintf
230 unistdio/u8-u8-vsnprintf
231 unistdio/u8-u8-vsprintf
232 unistdio/u8-vasnprintf
233 unistdio/u8-vasprintf
234 unistdio/u8-vsnprintf
236 unistdio/u16-asnprintf
237 unistdio/u16-asprintf
238 unistdio/u16-snprintf
240 unistdio/u16-u16-asnprintf
241 unistdio/u16-u16-asprintf
242 unistdio/u16-u16-snprintf
243 unistdio/u16-u16-sprintf
244 unistdio/u16-u16-vasnprintf
245 unistdio/u16-u16-vasprintf
246 unistdio/u16-u16-vsnprintf
247 unistdio/u16-u16-vsprintf
248 unistdio/u16-vasnprintf
249 unistdio/u16-vasprintf
250 unistdio/u16-vsnprintf
251 unistdio/u16-vsprintf
252 unistdio/u32-asnprintf
253 unistdio/u32-asprintf
254 unistdio/u32-snprintf
256 unistdio/u32-u32-asnprintf
257 unistdio/u32-u32-asprintf
258 unistdio/u32-u32-snprintf
259 unistdio/u32-u32-sprintf
260 unistdio/u32-u32-vasnprintf
261 unistdio/u32-u32-vasprintf
262 unistdio/u32-u32-vsnprintf
263 unistdio/u32-u32-vsprintf
264 unistdio/u32-vasnprintf
265 unistdio/u32-vasprintf
266 unistdio/u32-vsnprintf
267 unistdio/u32-vsprintf
268 unistdio/ulc-asnprintf
269 unistdio/ulc-asprintf
271 unistdio/ulc-snprintf
273 unistdio/ulc-vasnprintf
274 unistdio/ulc-vasprintf
275 unistdio/ulc-vfprintf
276 unistdio/ulc-vsnprintf
277 unistdio/ulc-vsprintf
281 unictype/bidiclass-all
283 unictype/category-all
284 unictype/combining-class-all
296 unictype/ctype-xdigit
297 unictype/decimal-digit
299 unictype/joininggroup-all
300 unictype/joiningtype-all
303 unictype/property-all
305 unictype/syntax-c-ident
306 unictype/syntax-c-whitespace
307 unictype/syntax-java-ident
308 unictype/syntax-java-whitespace
312 uniwidth/u16-strwidth
314 uniwidth/u32-strwidth
318 unigbrk/u8-grapheme-breaks
319 unigbrk/u8-grapheme-next
320 unigbrk/u8-grapheme-prev
321 unigbrk/u16-grapheme-breaks
322 unigbrk/u16-grapheme-next
323 unigbrk/u16-grapheme-prev
324 unigbrk/u32-grapheme-breaks
325 unigbrk/u32-grapheme-next
326 unigbrk/u32-grapheme-prev
328 unigbrk/uc-is-grapheme-break
329 unigbrk/ulc-grapheme-breaks
331 uniwbrk/u8-wordbreaks
332 uniwbrk/u16-wordbreaks
333 uniwbrk/u32-wordbreaks
334 uniwbrk/ulc-wordbreaks
335 uniwbrk/wordbreak-property
337 unilbrk/u8-possible-linebreaks
338 unilbrk/u8-width-linebreaks
339 unilbrk/u16-possible-linebreaks
340 unilbrk/u16-width-linebreaks
341 unilbrk/u32-possible-linebreaks
342 unilbrk/u32-width-linebreaks
343 unilbrk/ulc-possible-linebreaks
344 unilbrk/ulc-width-linebreaks
346 uninorm/canonical-decomposition
348 uninorm/decomposition
358 uninorm/u16-normalize
362 uninorm/u32-normalize
367 unicase/empty-prefix-context
368 unicase/empty-suffix-context
369 unicase/locale-language
377 unicase/u8-ct-casefold
378 unicase/u8-ct-tolower
379 unicase/u8-ct-totitle
380 unicase/u8-ct-toupper
382 unicase/u8-is-casefolded
383 unicase/u8-is-lowercase
384 unicase/u8-is-titlecase
385 unicase/u8-is-uppercase
393 unicase/u16-ct-casefold
394 unicase/u16-ct-tolower
395 unicase/u16-ct-totitle
396 unicase/u16-ct-toupper
398 unicase/u16-is-casefolded
399 unicase/u16-is-lowercase
400 unicase/u16-is-titlecase
401 unicase/u16-is-uppercase
409 unicase/u32-ct-casefold
410 unicase/u32-ct-tolower
411 unicase/u32-ct-totitle
412 unicase/u32-ct-toupper
414 unicase/u32-is-casefolded
415 unicase/u32-is-lowercase
416 unicase/u32-is-titlecase
417 unicase/u32-is-uppercase
426 $GNULIB_TOOL --lib=libunistring --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \
427 --with-tests --lgpl --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local \
428 --import $GNULIB_MODULES
429 # Change lib/unistr.h to be usable standalone.
430 sed -e 's/if GNULIB_[A-Za-z0-9_]* || .*/if 1/g' \
431 -e 's/if GNULIB_[A-Za-z0-9_]*/if 1/g' \
432 -e 's/HAVE_INLINE/UNISTRING_HAVE_INLINE/g' \
434 > lib/unistr.in.h.tmp \
435 && mv lib/unistr.in.h.tmp lib/unistr.in.h
436 # Change lib/unictype.h and lib/uninorm.h for shared libraries on Woe32 systems.
437 sed -e 's/extern const uc_general_category_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_/' \
438 -e 's/extern const uc_property_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_/' \
439 < lib/unictype.in.h \
440 > lib/unictype.in.h.tmp \
441 && mv lib/unictype.in.h.tmp lib/unictype.in.h
442 sed -e 's/extern const struct unicode_normalization_form /extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form /' \
444 > lib/uninorm.in.h.tmp \
445 && mv lib/uninorm.in.h.tmp lib/uninorm.in.h
446 sed -e 's/extern const casing_/extern LIBUNISTRING_DLL_VARIABLE const casing_/' \
448 > lib/unicase.in.h.tmp \
449 && mv lib/unicase.in.h.tmp lib/unicase.in.h
450 $GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess
451 $GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub
452 # If we got no texinfo.tex so far, take the snapshot from gnulib.
453 if test ! -f build-aux/texinfo.tex; then
454 $GNULIB_TOOL --copy-file build-aux/texinfo.tex build-aux/texinfo.tex
459 build-aux/fixaclocal aclocal -I m4 -I gnulib-m4
461 autoheader && touch config.h.in
462 automake --add-missing --copy