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.16 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-2018 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;;
48 if test $skip_gnulib = false; then
50 # The most recent snapshot of it is available in the gnulib repository.
51 # But this is a snapshot, with all possible dangers.
52 # A stable release of it is available through "automake --add-missing --copy",
53 # but that is too old (does not support @arrow{}). So take the version which
54 # matches the latest stable texinfo release.
55 if test ! -f build-aux/texinfo.tex; then
56 { 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_'`echo $TEXINFO_VERSION | sed -e 's/[.]/_/g'` \
57 && mv build-aux/texinfo.tex.tmp build-aux/texinfo.tex; \
58 } || rm -f build-aux/texinfo.tex.tmp
60 if test -z "$GNULIB_TOOL"; then
61 # Check out gnulib in a subdirectory 'gnulib'.
62 if test -d gnulib; then
63 (cd gnulib && git pull)
65 git clone git://git.savannah.gnu.org/gnulib.git
67 # Now it should contain a gnulib-tool.
68 if test -f gnulib/gnulib-tool; then
69 GNULIB_TOOL=`pwd`/gnulib/gnulib-tool
71 echo "** warning: gnulib-tool not found" 1>&2
74 # Skip the gnulib-tool step if gnulib-tool was not found.
75 if test -n "$GNULIB_TOOL"; then
90 unistr/u8-mbtouc-unsafe
131 unistr/u16-mbtouc-unsafe
136 unistr/u16-startswith
172 unistr/u32-mbtouc-unsafe
177 unistr/u32-startswith
203 uniconv/u8-conv-from-enc
204 uniconv/u8-conv-to-enc
205 uniconv/u8-strconv-from-enc
206 uniconv/u8-strconv-from-locale
207 uniconv/u8-strconv-to-enc
208 uniconv/u8-strconv-to-locale
209 uniconv/u16-conv-from-enc
210 uniconv/u16-conv-to-enc
211 uniconv/u16-strconv-from-enc
212 uniconv/u16-strconv-from-locale
213 uniconv/u16-strconv-to-enc
214 uniconv/u16-strconv-to-locale
215 uniconv/u32-conv-from-enc
216 uniconv/u32-conv-to-enc
217 uniconv/u32-strconv-from-enc
218 uniconv/u32-strconv-from-locale
219 uniconv/u32-strconv-to-enc
220 uniconv/u32-strconv-to-locale
222 unistdio/u8-asnprintf
226 unistdio/u8-u8-asnprintf
227 unistdio/u8-u8-asprintf
228 unistdio/u8-u8-snprintf
229 unistdio/u8-u8-sprintf
230 unistdio/u8-u8-vasnprintf
231 unistdio/u8-u8-vasprintf
232 unistdio/u8-u8-vsnprintf
233 unistdio/u8-u8-vsprintf
234 unistdio/u8-vasnprintf
235 unistdio/u8-vasprintf
236 unistdio/u8-vsnprintf
238 unistdio/u16-asnprintf
239 unistdio/u16-asprintf
240 unistdio/u16-snprintf
242 unistdio/u16-u16-asnprintf
243 unistdio/u16-u16-asprintf
244 unistdio/u16-u16-snprintf
245 unistdio/u16-u16-sprintf
246 unistdio/u16-u16-vasnprintf
247 unistdio/u16-u16-vasprintf
248 unistdio/u16-u16-vsnprintf
249 unistdio/u16-u16-vsprintf
250 unistdio/u16-vasnprintf
251 unistdio/u16-vasprintf
252 unistdio/u16-vsnprintf
253 unistdio/u16-vsprintf
254 unistdio/u32-asnprintf
255 unistdio/u32-asprintf
256 unistdio/u32-snprintf
258 unistdio/u32-u32-asnprintf
259 unistdio/u32-u32-asprintf
260 unistdio/u32-u32-snprintf
261 unistdio/u32-u32-sprintf
262 unistdio/u32-u32-vasnprintf
263 unistdio/u32-u32-vasprintf
264 unistdio/u32-u32-vsnprintf
265 unistdio/u32-u32-vsprintf
266 unistdio/u32-vasnprintf
267 unistdio/u32-vasprintf
268 unistdio/u32-vsnprintf
269 unistdio/u32-vsprintf
270 unistdio/ulc-asnprintf
271 unistdio/ulc-asprintf
273 unistdio/ulc-snprintf
275 unistdio/ulc-vasnprintf
276 unistdio/ulc-vasprintf
277 unistdio/ulc-vfprintf
278 unistdio/ulc-vsnprintf
279 unistdio/ulc-vsprintf
283 unictype/bidiclass-all
285 unictype/category-all
286 unictype/combining-class-all
298 unictype/ctype-xdigit
299 unictype/decimal-digit
301 unictype/joininggroup-all
302 unictype/joiningtype-all
305 unictype/property-all
307 unictype/syntax-c-ident
308 unictype/syntax-c-whitespace
309 unictype/syntax-java-ident
310 unictype/syntax-java-whitespace
314 uniwidth/u16-strwidth
316 uniwidth/u32-strwidth
320 unigbrk/u8-grapheme-breaks
321 unigbrk/u8-grapheme-next
322 unigbrk/u8-grapheme-prev
323 unigbrk/u16-grapheme-breaks
324 unigbrk/u16-grapheme-next
325 unigbrk/u16-grapheme-prev
326 unigbrk/u32-grapheme-breaks
327 unigbrk/u32-grapheme-next
328 unigbrk/u32-grapheme-prev
330 unigbrk/uc-is-grapheme-break
331 unigbrk/ulc-grapheme-breaks
332 unigbrk/uc-grapheme-breaks
334 uniwbrk/u8-wordbreaks
335 uniwbrk/u16-wordbreaks
336 uniwbrk/u32-wordbreaks
337 uniwbrk/ulc-wordbreaks
338 uniwbrk/wordbreak-property
340 unilbrk/u8-possible-linebreaks
341 unilbrk/u8-width-linebreaks
342 unilbrk/u16-possible-linebreaks
343 unilbrk/u16-width-linebreaks
344 unilbrk/u32-possible-linebreaks
345 unilbrk/u32-width-linebreaks
346 unilbrk/ulc-possible-linebreaks
347 unilbrk/ulc-width-linebreaks
349 uninorm/canonical-decomposition
351 uninorm/decomposition
361 uninorm/u16-normalize
365 uninorm/u32-normalize
370 unicase/empty-prefix-context
371 unicase/empty-suffix-context
372 unicase/locale-language
380 unicase/u8-ct-casefold
381 unicase/u8-ct-tolower
382 unicase/u8-ct-totitle
383 unicase/u8-ct-toupper
385 unicase/u8-is-casefolded
386 unicase/u8-is-lowercase
387 unicase/u8-is-titlecase
388 unicase/u8-is-uppercase
389 unicase/u8-prefix-context
390 unicase/u8-suffix-context
398 unicase/u16-ct-casefold
399 unicase/u16-ct-tolower
400 unicase/u16-ct-totitle
401 unicase/u16-ct-toupper
403 unicase/u16-is-casefolded
404 unicase/u16-is-lowercase
405 unicase/u16-is-titlecase
406 unicase/u16-is-uppercase
407 unicase/u16-prefix-context
408 unicase/u16-suffix-context
416 unicase/u32-ct-casefold
417 unicase/u32-ct-tolower
418 unicase/u32-ct-totitle
419 unicase/u32-ct-toupper
421 unicase/u32-is-casefolded
422 unicase/u32-is-lowercase
423 unicase/u32-is-titlecase
424 unicase/u32-is-uppercase
425 unicase/u32-prefix-context
426 unicase/u32-suffix-context
435 $GNULIB_TOOL --lib=libunistring --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \
436 --with-tests --lgpl=3orGPLv2 --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local \
437 --import $GNULIB_MODULES
438 # Change lib/unistr.h to be usable standalone.
439 sed -e 's/if GNULIB_[A-Za-z0-9_]* || .*/if 1/g' \
440 -e 's/if GNULIB_[A-Za-z0-9_]*/if 1/g' \
441 -e 's/HAVE_INLINE/UNISTRING_HAVE_INLINE/g' \
443 > lib/unistr.in.h.tmp \
444 && mv lib/unistr.in.h.tmp lib/unistr.in.h
445 # Change lib/unictype.h and lib/uninorm.h for shared libraries on Woe32 systems.
446 sed -e 's/extern const uc_general_category_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_/' \
447 -e 's/extern const uc_property_t UC_/extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_/' \
448 < lib/unictype.in.h \
449 > lib/unictype.in.h.tmp \
450 && mv lib/unictype.in.h.tmp lib/unictype.in.h
451 sed -e 's/extern const struct unicode_normalization_form /extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form /' \
453 > lib/uninorm.in.h.tmp \
454 && mv lib/uninorm.in.h.tmp lib/uninorm.in.h
455 sed -e 's/extern const casing_/extern LIBUNISTRING_DLL_VARIABLE const casing_/' \
457 > lib/unicase.in.h.tmp \
458 && mv lib/unicase.in.h.tmp lib/unicase.in.h
459 $GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess
460 $GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub
461 # If we got no texinfo.tex so far, take the snapshot from gnulib.
462 if test ! -f build-aux/texinfo.tex; then
463 $GNULIB_TOOL --copy-file build-aux/texinfo.tex build-aux/texinfo.tex
468 build-aux/fixaclocal aclocal -I m4 -I gnulib-m4
470 autoheader && touch config.h.in
471 # Make sure we get new versions of files brought in by automake.
472 (cd build-aux && rm -f ar-lib compile depcomp install-sh mdate-sh missing test-driver)
473 automake --add-missing --copy
474 # Get rid of autom4te.cache directory.
475 rm -rf autom4te.cache