changeset 13354:86634e33e086

New module 'libunistring-optional'.
author Bruno Haible <bruno@clisp.org>
date Tue, 18 May 2010 20:11:42 +0200
parents 766332c14285
children e85e9a764086
files ChangeLog lib/unicase.h lib/unicase.in.h lib/uniconv.h lib/uniconv.in.h lib/unictype.h lib/unictype.in.h lib/unilbrk.h lib/unilbrk.in.h lib/uniname.h lib/uniname.in.h lib/uninorm.h lib/uninorm.in.h lib/unistdio.h lib/unistdio.in.h lib/unistr.h lib/unistr.in.h lib/unitypes.h lib/unitypes.in.h lib/uniwbrk.h lib/uniwbrk.in.h lib/uniwidth.h lib/uniwidth.in.h m4/libunistring-base.m4 m4/libunistring-optional.m4 m4/libunistring.m4 modules/libunistring modules/libunistring-optional modules/unicase/base modules/unicase/cased-tests modules/unicase/empty-prefix-context modules/unicase/empty-suffix-context modules/unicase/ignorable-tests modules/unicase/locale-language modules/unicase/locale-language-tests modules/unicase/tolower modules/unicase/tolower-tests modules/unicase/totitle modules/unicase/totitle-tests modules/unicase/toupper modules/unicase/toupper-tests modules/unicase/u16-casecmp modules/unicase/u16-casecmp-tests modules/unicase/u16-casecoll modules/unicase/u16-casecoll-tests modules/unicase/u16-casefold modules/unicase/u16-casefold-tests modules/unicase/u16-casexfrm modules/unicase/u16-ct-casefold modules/unicase/u16-ct-tolower modules/unicase/u16-ct-totitle modules/unicase/u16-ct-toupper modules/unicase/u16-is-cased modules/unicase/u16-is-cased-tests modules/unicase/u16-is-casefolded modules/unicase/u16-is-casefolded-tests modules/unicase/u16-is-lowercase modules/unicase/u16-is-lowercase-tests modules/unicase/u16-is-titlecase modules/unicase/u16-is-titlecase-tests modules/unicase/u16-is-uppercase modules/unicase/u16-is-uppercase-tests modules/unicase/u16-prefix-context modules/unicase/u16-suffix-context modules/unicase/u16-tolower modules/unicase/u16-tolower-tests modules/unicase/u16-totitle modules/unicase/u16-totitle-tests modules/unicase/u16-toupper modules/unicase/u16-toupper-tests modules/unicase/u32-casecmp modules/unicase/u32-casecmp-tests modules/unicase/u32-casecoll modules/unicase/u32-casecoll-tests modules/unicase/u32-casefold modules/unicase/u32-casefold-tests modules/unicase/u32-casexfrm modules/unicase/u32-ct-casefold modules/unicase/u32-ct-tolower modules/unicase/u32-ct-totitle modules/unicase/u32-ct-toupper modules/unicase/u32-is-cased modules/unicase/u32-is-cased-tests modules/unicase/u32-is-casefolded modules/unicase/u32-is-casefolded-tests modules/unicase/u32-is-lowercase modules/unicase/u32-is-lowercase-tests modules/unicase/u32-is-titlecase modules/unicase/u32-is-titlecase-tests modules/unicase/u32-is-uppercase modules/unicase/u32-is-uppercase-tests modules/unicase/u32-prefix-context modules/unicase/u32-suffix-context modules/unicase/u32-tolower modules/unicase/u32-tolower-tests modules/unicase/u32-totitle modules/unicase/u32-totitle-tests modules/unicase/u32-toupper modules/unicase/u32-toupper-tests modules/unicase/u8-casecmp modules/unicase/u8-casecmp-tests modules/unicase/u8-casecoll modules/unicase/u8-casecoll-tests modules/unicase/u8-casefold modules/unicase/u8-casefold-tests modules/unicase/u8-casexfrm modules/unicase/u8-ct-casefold modules/unicase/u8-ct-tolower modules/unicase/u8-ct-totitle modules/unicase/u8-ct-toupper modules/unicase/u8-is-cased modules/unicase/u8-is-cased-tests modules/unicase/u8-is-casefolded modules/unicase/u8-is-casefolded-tests modules/unicase/u8-is-lowercase modules/unicase/u8-is-lowercase-tests modules/unicase/u8-is-titlecase modules/unicase/u8-is-titlecase-tests modules/unicase/u8-is-uppercase modules/unicase/u8-is-uppercase-tests modules/unicase/u8-prefix-context modules/unicase/u8-suffix-context modules/unicase/u8-tolower modules/unicase/u8-tolower-tests modules/unicase/u8-totitle modules/unicase/u8-totitle-tests modules/unicase/u8-toupper modules/unicase/u8-toupper-tests modules/unicase/ulc-casecmp modules/unicase/ulc-casecmp-tests modules/unicase/ulc-casecoll modules/unicase/ulc-casecoll-tests modules/unicase/ulc-casexfrm modules/uniconv/base modules/uniconv/u16-conv-from-enc modules/uniconv/u16-conv-from-enc-tests modules/uniconv/u16-conv-to-enc modules/uniconv/u16-conv-to-enc-tests modules/uniconv/u16-strconv-from-enc modules/uniconv/u16-strconv-from-enc-tests modules/uniconv/u16-strconv-from-locale modules/uniconv/u16-strconv-to-enc modules/uniconv/u16-strconv-to-enc-tests modules/uniconv/u16-strconv-to-locale modules/uniconv/u32-conv-from-enc modules/uniconv/u32-conv-from-enc-tests modules/uniconv/u32-conv-to-enc modules/uniconv/u32-conv-to-enc-tests modules/uniconv/u32-strconv-from-enc modules/uniconv/u32-strconv-from-enc-tests modules/uniconv/u32-strconv-from-locale modules/uniconv/u32-strconv-to-enc modules/uniconv/u32-strconv-to-enc-tests modules/uniconv/u32-strconv-to-locale modules/uniconv/u8-conv-from-enc modules/uniconv/u8-conv-from-enc-tests modules/uniconv/u8-conv-to-enc modules/uniconv/u8-conv-to-enc-tests modules/uniconv/u8-strconv-from-enc modules/uniconv/u8-strconv-from-enc-tests modules/uniconv/u8-strconv-from-locale modules/uniconv/u8-strconv-to-enc modules/uniconv/u8-strconv-to-enc-tests modules/uniconv/u8-strconv-to-locale modules/unictype/base modules/unictype/bidicategory-byname modules/unictype/bidicategory-byname-tests modules/unictype/bidicategory-name modules/unictype/bidicategory-name-tests modules/unictype/bidicategory-of modules/unictype/bidicategory-of-tests modules/unictype/bidicategory-test modules/unictype/bidicategory-test-tests modules/unictype/block-list modules/unictype/block-list-tests modules/unictype/block-of-tests modules/unictype/block-test modules/unictype/block-test-tests modules/unictype/category-C modules/unictype/category-C-tests modules/unictype/category-Cc modules/unictype/category-Cc-tests modules/unictype/category-Cf modules/unictype/category-Cf-tests modules/unictype/category-Cn modules/unictype/category-Cn-tests modules/unictype/category-Co modules/unictype/category-Co-tests modules/unictype/category-Cs modules/unictype/category-Cs-tests modules/unictype/category-L modules/unictype/category-L-tests modules/unictype/category-Ll modules/unictype/category-Ll-tests modules/unictype/category-Lm modules/unictype/category-Lm-tests modules/unictype/category-Lo modules/unictype/category-Lo-tests modules/unictype/category-Lt modules/unictype/category-Lt-tests modules/unictype/category-Lu modules/unictype/category-Lu-tests modules/unictype/category-M modules/unictype/category-M-tests modules/unictype/category-Mc modules/unictype/category-Mc-tests modules/unictype/category-Me modules/unictype/category-Me-tests modules/unictype/category-Mn modules/unictype/category-Mn-tests modules/unictype/category-N modules/unictype/category-N-tests modules/unictype/category-Nd modules/unictype/category-Nd-tests modules/unictype/category-Nl modules/unictype/category-Nl-tests modules/unictype/category-No modules/unictype/category-No-tests modules/unictype/category-P modules/unictype/category-P-tests modules/unictype/category-Pc modules/unictype/category-Pc-tests modules/unictype/category-Pd modules/unictype/category-Pd-tests modules/unictype/category-Pe modules/unictype/category-Pe-tests modules/unictype/category-Pf modules/unictype/category-Pf-tests modules/unictype/category-Pi modules/unictype/category-Pi-tests modules/unictype/category-Po modules/unictype/category-Po-tests modules/unictype/category-Ps modules/unictype/category-Ps-tests modules/unictype/category-S modules/unictype/category-S-tests modules/unictype/category-Sc modules/unictype/category-Sc-tests modules/unictype/category-Sk modules/unictype/category-Sk-tests modules/unictype/category-Sm modules/unictype/category-Sm-tests modules/unictype/category-So modules/unictype/category-So-tests modules/unictype/category-Z modules/unictype/category-Z-tests modules/unictype/category-Zl modules/unictype/category-Zl-tests modules/unictype/category-Zp modules/unictype/category-Zp-tests modules/unictype/category-Zs modules/unictype/category-Zs-tests modules/unictype/category-and modules/unictype/category-and-not modules/unictype/category-and-not-tests modules/unictype/category-and-tests modules/unictype/category-byname modules/unictype/category-byname-tests modules/unictype/category-name modules/unictype/category-name-tests modules/unictype/category-none modules/unictype/category-none-tests modules/unictype/category-of modules/unictype/category-of-tests modules/unictype/category-or modules/unictype/category-or-tests modules/unictype/category-test modules/unictype/category-test-withtable-tests modules/unictype/combining-class modules/unictype/combining-class-tests modules/unictype/ctype-alnum modules/unictype/ctype-alnum-tests modules/unictype/ctype-alpha modules/unictype/ctype-alpha-tests modules/unictype/ctype-blank modules/unictype/ctype-blank-tests modules/unictype/ctype-cntrl modules/unictype/ctype-cntrl-tests modules/unictype/ctype-digit modules/unictype/ctype-digit-tests modules/unictype/ctype-graph modules/unictype/ctype-graph-tests modules/unictype/ctype-lower modules/unictype/ctype-lower-tests modules/unictype/ctype-print modules/unictype/ctype-print-tests modules/unictype/ctype-punct modules/unictype/ctype-punct-tests modules/unictype/ctype-space modules/unictype/ctype-space-tests modules/unictype/ctype-upper modules/unictype/ctype-upper-tests modules/unictype/ctype-xdigit modules/unictype/ctype-xdigit-tests modules/unictype/decimal-digit modules/unictype/decimal-digit-tests modules/unictype/digit modules/unictype/digit-tests modules/unictype/mirror modules/unictype/mirror-tests modules/unictype/numeric modules/unictype/numeric-tests modules/unictype/property-alphabetic modules/unictype/property-alphabetic-tests modules/unictype/property-ascii-hex-digit modules/unictype/property-ascii-hex-digit-tests modules/unictype/property-bidi-arabic-digit modules/unictype/property-bidi-arabic-digit-tests modules/unictype/property-bidi-arabic-right-to-left modules/unictype/property-bidi-arabic-right-to-left-tests modules/unictype/property-bidi-block-separator modules/unictype/property-bidi-block-separator-tests modules/unictype/property-bidi-boundary-neutral modules/unictype/property-bidi-boundary-neutral-tests modules/unictype/property-bidi-common-separator modules/unictype/property-bidi-common-separator-tests modules/unictype/property-bidi-control modules/unictype/property-bidi-control-tests modules/unictype/property-bidi-embedding-or-override modules/unictype/property-bidi-embedding-or-override-tests modules/unictype/property-bidi-eur-num-separator modules/unictype/property-bidi-eur-num-separator-tests modules/unictype/property-bidi-eur-num-terminator modules/unictype/property-bidi-eur-num-terminator-tests modules/unictype/property-bidi-european-digit modules/unictype/property-bidi-european-digit-tests modules/unictype/property-bidi-hebrew-right-to-left modules/unictype/property-bidi-hebrew-right-to-left-tests modules/unictype/property-bidi-left-to-right modules/unictype/property-bidi-left-to-right-tests modules/unictype/property-bidi-non-spacing-mark modules/unictype/property-bidi-non-spacing-mark-tests modules/unictype/property-bidi-other-neutral modules/unictype/property-bidi-other-neutral-tests modules/unictype/property-bidi-pdf modules/unictype/property-bidi-pdf-tests modules/unictype/property-bidi-segment-separator modules/unictype/property-bidi-segment-separator-tests modules/unictype/property-bidi-whitespace modules/unictype/property-bidi-whitespace-tests modules/unictype/property-byname modules/unictype/property-byname-tests modules/unictype/property-combining modules/unictype/property-combining-tests modules/unictype/property-composite modules/unictype/property-composite-tests modules/unictype/property-currency-symbol modules/unictype/property-currency-symbol-tests modules/unictype/property-dash modules/unictype/property-dash-tests modules/unictype/property-decimal-digit modules/unictype/property-decimal-digit-tests modules/unictype/property-default-ignorable-code-point modules/unictype/property-default-ignorable-code-point-tests modules/unictype/property-deprecated modules/unictype/property-deprecated-tests modules/unictype/property-diacritic modules/unictype/property-diacritic-tests modules/unictype/property-extender modules/unictype/property-extender-tests modules/unictype/property-format-control modules/unictype/property-format-control-tests modules/unictype/property-grapheme-base modules/unictype/property-grapheme-base-tests modules/unictype/property-grapheme-extend modules/unictype/property-grapheme-extend-tests modules/unictype/property-grapheme-link modules/unictype/property-grapheme-link-tests modules/unictype/property-hex-digit modules/unictype/property-hex-digit-tests modules/unictype/property-hyphen modules/unictype/property-hyphen-tests modules/unictype/property-id-continue modules/unictype/property-id-continue-tests modules/unictype/property-id-start modules/unictype/property-id-start-tests modules/unictype/property-ideographic modules/unictype/property-ideographic-tests modules/unictype/property-ids-binary-operator modules/unictype/property-ids-binary-operator-tests modules/unictype/property-ids-trinary-operator modules/unictype/property-ids-trinary-operator-tests modules/unictype/property-ignorable-control modules/unictype/property-ignorable-control-tests modules/unictype/property-iso-control modules/unictype/property-iso-control-tests modules/unictype/property-join-control modules/unictype/property-join-control-tests modules/unictype/property-left-of-pair modules/unictype/property-left-of-pair-tests modules/unictype/property-line-separator modules/unictype/property-line-separator-tests modules/unictype/property-logical-order-exception modules/unictype/property-logical-order-exception-tests modules/unictype/property-lowercase modules/unictype/property-lowercase-tests modules/unictype/property-math modules/unictype/property-math-tests modules/unictype/property-non-break modules/unictype/property-non-break-tests modules/unictype/property-not-a-character modules/unictype/property-not-a-character-tests modules/unictype/property-numeric modules/unictype/property-numeric-tests modules/unictype/property-other-alphabetic modules/unictype/property-other-alphabetic-tests modules/unictype/property-other-default-ignorable-code-point modules/unictype/property-other-default-ignorable-code-point-tests modules/unictype/property-other-grapheme-extend modules/unictype/property-other-grapheme-extend-tests modules/unictype/property-other-id-continue modules/unictype/property-other-id-continue-tests modules/unictype/property-other-id-start modules/unictype/property-other-id-start-tests modules/unictype/property-other-lowercase modules/unictype/property-other-lowercase-tests modules/unictype/property-other-math modules/unictype/property-other-math-tests modules/unictype/property-other-uppercase modules/unictype/property-other-uppercase-tests modules/unictype/property-paired-punctuation modules/unictype/property-paired-punctuation-tests modules/unictype/property-paragraph-separator modules/unictype/property-paragraph-separator-tests modules/unictype/property-pattern-syntax modules/unictype/property-pattern-syntax-tests modules/unictype/property-pattern-white-space modules/unictype/property-pattern-white-space-tests modules/unictype/property-private-use modules/unictype/property-private-use-tests modules/unictype/property-punctuation modules/unictype/property-punctuation-tests modules/unictype/property-quotation-mark modules/unictype/property-quotation-mark-tests modules/unictype/property-radical modules/unictype/property-radical-tests modules/unictype/property-sentence-terminal modules/unictype/property-sentence-terminal-tests modules/unictype/property-soft-dotted modules/unictype/property-soft-dotted-tests modules/unictype/property-space modules/unictype/property-space-tests modules/unictype/property-terminal-punctuation modules/unictype/property-terminal-punctuation-tests modules/unictype/property-test modules/unictype/property-test-tests modules/unictype/property-titlecase modules/unictype/property-titlecase-tests modules/unictype/property-unassigned-code-value modules/unictype/property-unassigned-code-value-tests modules/unictype/property-unified-ideograph modules/unictype/property-unified-ideograph-tests modules/unictype/property-uppercase modules/unictype/property-uppercase-tests modules/unictype/property-variation-selector modules/unictype/property-variation-selector-tests modules/unictype/property-white-space modules/unictype/property-white-space-tests modules/unictype/property-xid-continue modules/unictype/property-xid-continue-tests modules/unictype/property-xid-start modules/unictype/property-xid-start-tests modules/unictype/property-zero-width modules/unictype/property-zero-width-tests modules/unictype/scripts modules/unictype/scripts-tests modules/unictype/syntax-c-ident modules/unictype/syntax-c-ident-tests modules/unictype/syntax-c-whitespace modules/unictype/syntax-c-whitespace-tests modules/unictype/syntax-java-ident modules/unictype/syntax-java-ident-tests modules/unictype/syntax-java-whitespace modules/unictype/syntax-java-whitespace-tests modules/unilbrk/base modules/unilbrk/u16-possible-linebreaks modules/unilbrk/u16-possible-linebreaks-tests modules/unilbrk/u16-width-linebreaks modules/unilbrk/u16-width-linebreaks-tests modules/unilbrk/u32-possible-linebreaks modules/unilbrk/u32-possible-linebreaks-tests modules/unilbrk/u32-width-linebreaks modules/unilbrk/u32-width-linebreaks-tests modules/unilbrk/u8-possible-linebreaks modules/unilbrk/u8-possible-linebreaks-tests modules/unilbrk/u8-width-linebreaks modules/unilbrk/u8-width-linebreaks-tests modules/unilbrk/ulc-possible-linebreaks modules/unilbrk/ulc-possible-linebreaks-tests modules/unilbrk/ulc-width-linebreaks modules/unilbrk/ulc-width-linebreaks-tests modules/uniname/base modules/uniname/uniname modules/uniname/uniname-tests modules/uninorm/base modules/uninorm/canonical-decomposition modules/uninorm/canonical-decomposition-tests modules/uninorm/compat-decomposition-tests modules/uninorm/composition modules/uninorm/composition-tests modules/uninorm/decomposing-form modules/uninorm/decomposing-form-tests modules/uninorm/decomposition modules/uninorm/decomposition-tests modules/uninorm/filter modules/uninorm/filter-tests modules/uninorm/nfc modules/uninorm/nfc-tests modules/uninorm/nfd modules/uninorm/nfd-tests modules/uninorm/nfkc modules/uninorm/nfkc-tests modules/uninorm/nfkd modules/uninorm/nfkd-tests modules/uninorm/u16-normalize modules/uninorm/u16-normcmp modules/uninorm/u16-normcmp-tests modules/uninorm/u16-normcoll modules/uninorm/u16-normcoll-tests modules/uninorm/u16-normxfrm modules/uninorm/u32-normalize modules/uninorm/u32-normcmp modules/uninorm/u32-normcmp-tests modules/uninorm/u32-normcoll modules/uninorm/u32-normcoll-tests modules/uninorm/u32-normxfrm modules/uninorm/u8-normalize modules/uninorm/u8-normcmp modules/uninorm/u8-normcmp-tests modules/uninorm/u8-normcoll modules/uninorm/u8-normcoll-tests modules/uninorm/u8-normxfrm modules/unistdio/base modules/unistdio/u16-asnprintf modules/unistdio/u16-asnprintf-tests modules/unistdio/u16-asprintf modules/unistdio/u16-snprintf modules/unistdio/u16-sprintf modules/unistdio/u16-u16-asnprintf modules/unistdio/u16-u16-asprintf modules/unistdio/u16-u16-snprintf modules/unistdio/u16-u16-sprintf modules/unistdio/u16-u16-vasnprintf modules/unistdio/u16-u16-vasprintf modules/unistdio/u16-u16-vsnprintf modules/unistdio/u16-u16-vsprintf modules/unistdio/u16-vasnprintf modules/unistdio/u16-vasnprintf-tests modules/unistdio/u16-vasprintf modules/unistdio/u16-vasprintf-tests modules/unistdio/u16-vsnprintf modules/unistdio/u16-vsnprintf-tests modules/unistdio/u16-vsprintf modules/unistdio/u16-vsprintf-tests modules/unistdio/u32-asnprintf modules/unistdio/u32-asnprintf-tests modules/unistdio/u32-asprintf modules/unistdio/u32-snprintf modules/unistdio/u32-sprintf modules/unistdio/u32-u32-asnprintf modules/unistdio/u32-u32-asprintf modules/unistdio/u32-u32-snprintf modules/unistdio/u32-u32-sprintf modules/unistdio/u32-u32-vasnprintf modules/unistdio/u32-u32-vasprintf modules/unistdio/u32-u32-vsnprintf modules/unistdio/u32-u32-vsprintf modules/unistdio/u32-vasnprintf modules/unistdio/u32-vasnprintf-tests modules/unistdio/u32-vasprintf modules/unistdio/u32-vasprintf-tests modules/unistdio/u32-vsnprintf modules/unistdio/u32-vsnprintf-tests modules/unistdio/u32-vsprintf modules/unistdio/u32-vsprintf-tests modules/unistdio/u8-asnprintf modules/unistdio/u8-asnprintf-tests modules/unistdio/u8-asprintf modules/unistdio/u8-snprintf modules/unistdio/u8-sprintf modules/unistdio/u8-u8-asnprintf modules/unistdio/u8-u8-asprintf modules/unistdio/u8-u8-snprintf modules/unistdio/u8-u8-sprintf modules/unistdio/u8-u8-vasnprintf modules/unistdio/u8-u8-vasprintf modules/unistdio/u8-u8-vsnprintf modules/unistdio/u8-u8-vsprintf modules/unistdio/u8-vasnprintf modules/unistdio/u8-vasnprintf-tests modules/unistdio/u8-vasprintf modules/unistdio/u8-vasprintf-tests modules/unistdio/u8-vsnprintf modules/unistdio/u8-vsnprintf-tests modules/unistdio/u8-vsprintf modules/unistdio/u8-vsprintf-tests modules/unistdio/ulc-asnprintf modules/unistdio/ulc-asnprintf-tests modules/unistdio/ulc-asprintf modules/unistdio/ulc-fprintf modules/unistdio/ulc-snprintf modules/unistdio/ulc-sprintf modules/unistdio/ulc-vasnprintf modules/unistdio/ulc-vasnprintf-tests modules/unistdio/ulc-vasprintf modules/unistdio/ulc-vasprintf-tests modules/unistdio/ulc-vfprintf modules/unistdio/ulc-vsnprintf modules/unistdio/ulc-vsnprintf-tests modules/unistdio/ulc-vsprintf modules/unistdio/ulc-vsprintf-tests modules/unistr/base modules/unistr/u16-check modules/unistr/u16-check-tests modules/unistr/u16-chr modules/unistr/u16-chr-tests modules/unistr/u16-cmp modules/unistr/u16-cmp-tests modules/unistr/u16-cmp2 modules/unistr/u16-cmp2-tests modules/unistr/u16-cpy modules/unistr/u16-cpy-alloc modules/unistr/u16-cpy-alloc-tests modules/unistr/u16-cpy-tests modules/unistr/u16-endswith modules/unistr/u16-mblen modules/unistr/u16-mblen-tests modules/unistr/u16-mbsnlen modules/unistr/u16-mbsnlen-tests modules/unistr/u16-mbtouc modules/unistr/u16-mbtouc-tests modules/unistr/u16-mbtouc-unsafe modules/unistr/u16-mbtouc-unsafe-tests modules/unistr/u16-mbtoucr modules/unistr/u16-mbtoucr-tests modules/unistr/u16-move modules/unistr/u16-move-tests modules/unistr/u16-next modules/unistr/u16-next-tests modules/unistr/u16-prev modules/unistr/u16-prev-tests modules/unistr/u16-set modules/unistr/u16-set-tests modules/unistr/u16-startswith modules/unistr/u16-stpcpy modules/unistr/u16-stpcpy-tests modules/unistr/u16-stpncpy modules/unistr/u16-stpncpy-tests modules/unistr/u16-strcat modules/unistr/u16-strcat-tests modules/unistr/u16-strchr modules/unistr/u16-strcmp modules/unistr/u16-strcmp-tests modules/unistr/u16-strcoll modules/unistr/u16-strcoll-tests modules/unistr/u16-strcpy modules/unistr/u16-strcpy-tests modules/unistr/u16-strcspn modules/unistr/u16-strdup modules/unistr/u16-strdup-tests modules/unistr/u16-strlen modules/unistr/u16-strlen-tests modules/unistr/u16-strmblen modules/unistr/u16-strmblen-tests modules/unistr/u16-strmbtouc modules/unistr/u16-strmbtouc-tests modules/unistr/u16-strncat modules/unistr/u16-strncat-tests modules/unistr/u16-strncmp modules/unistr/u16-strncmp-tests modules/unistr/u16-strncpy modules/unistr/u16-strncpy-tests modules/unistr/u16-strnlen modules/unistr/u16-strnlen-tests modules/unistr/u16-strpbrk modules/unistr/u16-strrchr modules/unistr/u16-strspn modules/unistr/u16-strstr modules/unistr/u16-strtok modules/unistr/u16-to-u32 modules/unistr/u16-to-u32-tests modules/unistr/u16-to-u8 modules/unistr/u16-to-u8-tests modules/unistr/u16-uctomb modules/unistr/u16-uctomb-tests modules/unistr/u32-check modules/unistr/u32-check-tests modules/unistr/u32-chr modules/unistr/u32-chr-tests modules/unistr/u32-cmp modules/unistr/u32-cmp-tests modules/unistr/u32-cmp2 modules/unistr/u32-cmp2-tests modules/unistr/u32-cpy modules/unistr/u32-cpy-alloc modules/unistr/u32-cpy-alloc-tests modules/unistr/u32-cpy-tests modules/unistr/u32-endswith modules/unistr/u32-mblen modules/unistr/u32-mblen-tests modules/unistr/u32-mbsnlen modules/unistr/u32-mbsnlen-tests modules/unistr/u32-mbtouc modules/unistr/u32-mbtouc-tests modules/unistr/u32-mbtouc-unsafe modules/unistr/u32-mbtouc-unsafe-tests modules/unistr/u32-mbtoucr modules/unistr/u32-mbtoucr-tests modules/unistr/u32-move modules/unistr/u32-move-tests modules/unistr/u32-next modules/unistr/u32-next-tests modules/unistr/u32-prev modules/unistr/u32-prev-tests modules/unistr/u32-set modules/unistr/u32-set-tests modules/unistr/u32-startswith modules/unistr/u32-stpcpy modules/unistr/u32-stpcpy-tests modules/unistr/u32-stpncpy modules/unistr/u32-stpncpy-tests modules/unistr/u32-strcat modules/unistr/u32-strcat-tests modules/unistr/u32-strchr modules/unistr/u32-strcmp modules/unistr/u32-strcmp-tests modules/unistr/u32-strcoll modules/unistr/u32-strcoll-tests modules/unistr/u32-strcpy modules/unistr/u32-strcpy-tests modules/unistr/u32-strcspn modules/unistr/u32-strdup modules/unistr/u32-strdup-tests modules/unistr/u32-strlen modules/unistr/u32-strlen-tests modules/unistr/u32-strmblen modules/unistr/u32-strmblen-tests modules/unistr/u32-strmbtouc modules/unistr/u32-strmbtouc-tests modules/unistr/u32-strncat modules/unistr/u32-strncat-tests modules/unistr/u32-strncmp modules/unistr/u32-strncmp-tests modules/unistr/u32-strncpy modules/unistr/u32-strncpy-tests modules/unistr/u32-strnlen modules/unistr/u32-strnlen-tests modules/unistr/u32-strpbrk modules/unistr/u32-strrchr modules/unistr/u32-strspn modules/unistr/u32-strstr modules/unistr/u32-strtok modules/unistr/u32-to-u16 modules/unistr/u32-to-u16-tests modules/unistr/u32-to-u8 modules/unistr/u32-to-u8-tests modules/unistr/u32-uctomb modules/unistr/u32-uctomb-tests modules/unistr/u8-check modules/unistr/u8-check-tests modules/unistr/u8-chr modules/unistr/u8-chr-tests modules/unistr/u8-cmp modules/unistr/u8-cmp-tests modules/unistr/u8-cmp2 modules/unistr/u8-cmp2-tests modules/unistr/u8-cpy modules/unistr/u8-cpy-alloc modules/unistr/u8-cpy-alloc-tests modules/unistr/u8-cpy-tests modules/unistr/u8-endswith modules/unistr/u8-mblen modules/unistr/u8-mblen-tests modules/unistr/u8-mbsnlen modules/unistr/u8-mbsnlen-tests modules/unistr/u8-mbtouc modules/unistr/u8-mbtouc-tests modules/unistr/u8-mbtouc-unsafe modules/unistr/u8-mbtouc-unsafe-tests modules/unistr/u8-mbtoucr modules/unistr/u8-mbtoucr-tests modules/unistr/u8-move modules/unistr/u8-move-tests modules/unistr/u8-next modules/unistr/u8-next-tests modules/unistr/u8-prev modules/unistr/u8-prev-tests modules/unistr/u8-set modules/unistr/u8-set-tests modules/unistr/u8-startswith modules/unistr/u8-stpcpy modules/unistr/u8-stpcpy-tests modules/unistr/u8-stpncpy modules/unistr/u8-stpncpy-tests modules/unistr/u8-strcat modules/unistr/u8-strcat-tests modules/unistr/u8-strchr modules/unistr/u8-strcmp modules/unistr/u8-strcmp-tests modules/unistr/u8-strcoll modules/unistr/u8-strcoll-tests modules/unistr/u8-strcpy modules/unistr/u8-strcpy-tests modules/unistr/u8-strcspn modules/unistr/u8-strdup modules/unistr/u8-strdup-tests modules/unistr/u8-strlen modules/unistr/u8-strlen-tests modules/unistr/u8-strmblen modules/unistr/u8-strmblen-tests modules/unistr/u8-strmbtouc modules/unistr/u8-strmbtouc-tests modules/unistr/u8-strncat modules/unistr/u8-strncat-tests modules/unistr/u8-strncmp modules/unistr/u8-strncmp-tests modules/unistr/u8-strncpy modules/unistr/u8-strncpy-tests modules/unistr/u8-strnlen modules/unistr/u8-strnlen-tests modules/unistr/u8-strpbrk modules/unistr/u8-strrchr modules/unistr/u8-strspn modules/unistr/u8-strstr modules/unistr/u8-strtok modules/unistr/u8-to-u16 modules/unistr/u8-to-u16-tests modules/unistr/u8-to-u32 modules/unistr/u8-to-u32-tests modules/unistr/u8-uctomb modules/unistr/u8-uctomb-tests modules/unitypes modules/uniwbrk/base modules/uniwbrk/u16-wordbreaks modules/uniwbrk/u16-wordbreaks-tests modules/uniwbrk/u32-wordbreaks modules/uniwbrk/u32-wordbreaks-tests modules/uniwbrk/u8-wordbreaks modules/uniwbrk/u8-wordbreaks-tests modules/uniwbrk/ulc-wordbreaks modules/uniwbrk/ulc-wordbreaks-tests modules/uniwbrk/wordbreak-property modules/uniwidth/base modules/uniwidth/u16-strwidth modules/uniwidth/u16-strwidth-tests modules/uniwidth/u16-width modules/uniwidth/u16-width-tests modules/uniwidth/u32-strwidth modules/uniwidth/u32-strwidth-tests modules/uniwidth/u32-width modules/uniwidth/u32-width-tests modules/uniwidth/u8-strwidth modules/uniwidth/u8-strwidth-tests modules/uniwidth/u8-width modules/uniwidth/u8-width-tests modules/uniwidth/width modules/uniwidth/width-tests
diffstat 857 files changed, 4996 insertions(+), 3609 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,894 @@
+2010-05-18  Paolo Bonzini  <bonzini@gnu.org>
+            Bruno Haible  <bruno@clisp.org>
+
+	New module 'libunistring-optional'.
+	* modules/libunistring-optional: New file.
+	* m4/libunistring-base.m4: New file.
+	* m4/libunistring-optional.m4: New file.
+	* lib/unicase.in.h: Renamed from lib/unicase.h.
+	* lib/uniconv.in.h: Renamed from lib/uniconv.h.
+	* lib/unictype.in.h: Renamed from lib/unictype.h.
+	* lib/unilbrk.in.h: Renamed from lib/unilbrk.h.
+	* lib/uniname.in.h: Renamed from lib/uniname.h.
+	* lib/uninorm.in.h: Renamed from lib/uninorm.h.
+	* lib/unistdio.in.h: Renamed from lib/unistdio.h.
+	* lib/unistr.in.h: Renamed from lib/unistr.h.
+	* lib/unitypes.in.h: Renamed from lib/unitypes.h.
+	* lib/uniwbrk.in.h: Renamed from lib/uniwbrk.h.
+	* lib/uniwidth.in.h: Renamed from lib/uniwidth.h.
+	* m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Renamed from
+	gl_LIBUNISTRING. If the library was found, determine the installed
+	version and set LIBUNISTRING_VERSION.
+	(gl_LIBUNISTRING): New macro, as a wrapper arount it. Document that it
+	sets LIBUNISTRING_VERSION. If the module libunistring-optional is used,
+	handle a configuration option --with-included-libunistring.
+	* modules/libunistring (Files): Add m4/absolute-header.m4.
+	* modules/unicase/base (Files): Use unicase.in.h instead of unicase.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build unicase.h from unicase.in.h.
+	* modules/uniconv/base (Files): Use uniconv.in.h instead of uniconv.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build uniconv.h from uniconv.in.h.
+	* modules/unictype/base (Files): Use unictype.in.h instead of
+	unictype.h. Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build unictype.h from unictype.in.h.
+	* modules/unilbrk/base (Files): Use unilbrk.in.h instead of unilbrk.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build unilbrk.h from unilbrk.in.h.
+	* modules/uniname/base (Files): Use uniname.in.h instead of uniname.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build uniname.h from uniname.in.h.
+	* modules/uninorm/base (Files): Use uninorm.in.h instead of uninorm.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build uninorm.h from uninorm.in.h.
+	* modules/unistdio/base (Files): Use unistdio.in.h instead of
+	unistdio.h. Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build unistdio.h from unistdio.in.h.
+	* modules/unistr/base (Files): Use unistr.in.h instead of unistr.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build unistr.h from unistr.in.h.
+	* modules/unitypes (Files): Use unitypes.in.h instead of unitypes.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build unitypes.h from unitypes.in.h.
+	* modules/uniwbrk/base (Files): Use uniwbrk.in.h instead of uniwbrk.h.
+	Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build uniwbrk.h from uniwbrk.in.h.
+	* modules/uniwidth/base (Files): Use uniwidth.in.h instead of
+	uniwidth.h. Add m4/libunistring-base.m4.
+	(configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
+	(Makefile.am): Build uniwidth.h from uniwidth.in.h.
+	* modules/unicase/empty-prefix-context: Use gl_LIBUNISTRING_LIBSOURCE
+	instead of augmenting lib_SOURCES.
+	* modules/unicase/empty-suffix-context: Likewise.
+	* modules/unicase/locale-language: Likewise.
+	* modules/unicase/tolower: Likewise.
+	* modules/unicase/totitle: Likewise.
+	* modules/unicase/toupper: Likewise.
+	* modules/unicase/u8-casecmp: Likewise.
+	* modules/unicase/u8-casecoll: Likewise.
+	* modules/unicase/u8-casefold: Likewise.
+	* modules/unicase/u8-casexfrm: Likewise.
+	* modules/unicase/u8-ct-casefold: Likewise.
+	* modules/unicase/u8-ct-tolower: Likewise.
+	* modules/unicase/u8-ct-totitle: Likewise.
+	* modules/unicase/u8-ct-toupper: Likewise.
+	* modules/unicase/u8-is-cased: Likewise.
+	* modules/unicase/u8-is-casefolded: Likewise.
+	* modules/unicase/u8-is-lowercase: Likewise.
+	* modules/unicase/u8-is-titlecase: Likewise.
+	* modules/unicase/u8-is-uppercase: Likewise.
+	* modules/unicase/u8-prefix-context: Likewise.
+	* modules/unicase/u8-suffix-context: Likewise.
+	* modules/unicase/u8-tolower: Likewise.
+	* modules/unicase/u8-totitle: Likewise.
+	* modules/unicase/u8-toupper: Likewise.
+	* modules/unicase/u16-casecmp: Likewise.
+	* modules/unicase/u16-casecoll: Likewise.
+	* modules/unicase/u16-casefold: Likewise.
+	* modules/unicase/u16-casexfrm: Likewise.
+	* modules/unicase/u16-ct-casefold: Likewise.
+	* modules/unicase/u16-ct-tolower: Likewise.
+	* modules/unicase/u16-ct-totitle: Likewise.
+	* modules/unicase/u16-ct-toupper: Likewise.
+	* modules/unicase/u16-is-cased: Likewise.
+	* modules/unicase/u16-is-casefolded: Likewise.
+	* modules/unicase/u16-is-lowercase: Likewise.
+	* modules/unicase/u16-is-titlecase: Likewise.
+	* modules/unicase/u16-is-uppercase: Likewise.
+	* modules/unicase/u16-prefix-context: Likewise.
+	* modules/unicase/u16-suffix-context: Likewise.
+	* modules/unicase/u16-tolower: Likewise.
+	* modules/unicase/u16-totitle: Likewise.
+	* modules/unicase/u16-toupper: Likewise.
+	* modules/unicase/u32-casecmp: Likewise.
+	* modules/unicase/u32-casecoll: Likewise.
+	* modules/unicase/u32-casefold: Likewise.
+	* modules/unicase/u32-casexfrm: Likewise.
+	* modules/unicase/u32-ct-casefold: Likewise.
+	* modules/unicase/u32-ct-tolower: Likewise.
+	* modules/unicase/u32-ct-totitle: Likewise.
+	* modules/unicase/u32-ct-toupper: Likewise.
+	* modules/unicase/u32-is-cased: Likewise.
+	* modules/unicase/u32-is-casefolded: Likewise.
+	* modules/unicase/u32-is-lowercase: Likewise.
+	* modules/unicase/u32-is-titlecase: Likewise.
+	* modules/unicase/u32-is-uppercase: Likewise.
+	* modules/unicase/u32-prefix-context: Likewise.
+	* modules/unicase/u32-suffix-context: Likewise.
+	* modules/unicase/u32-tolower: Likewise.
+	* modules/unicase/u32-totitle: Likewise.
+	* modules/unicase/u32-toupper: Likewise.
+	* modules/unicase/ulc-casecmp: Likewise.
+	* modules/unicase/ulc-casecoll: Likewise.
+	* modules/unicase/ulc-casexfrm: Likewise.
+	* modules/uniconv/u8-conv-from-enc: Likewise.
+	* modules/uniconv/u8-conv-to-enc: Likewise.
+	* modules/uniconv/u8-strconv-from-enc: Likewise.
+	* modules/uniconv/u8-strconv-from-locale: Likewise.
+	* modules/uniconv/u8-strconv-to-enc: Likewise.
+	* modules/uniconv/u8-strconv-to-locale: Likewise.
+	* modules/uniconv/u16-conv-from-enc: Likewise.
+	* modules/uniconv/u16-conv-to-enc: Likewise.
+	* modules/uniconv/u16-strconv-from-enc: Likewise.
+	* modules/uniconv/u16-strconv-from-locale: Likewise.
+	* modules/uniconv/u16-strconv-to-enc: Likewise.
+	* modules/uniconv/u16-strconv-to-locale: Likewise.
+	* modules/uniconv/u32-conv-from-enc: Likewise.
+	* modules/uniconv/u32-conv-to-enc: Likewise.
+	* modules/uniconv/u32-strconv-from-enc: Likewise.
+	* modules/uniconv/u32-strconv-from-locale: Likewise.
+	* modules/uniconv/u32-strconv-to-enc: Likewise.
+	* modules/uniconv/u32-strconv-to-locale: Likewise.
+	* modules/unictype/bidicategory-byname: Likewise.
+	* modules/unictype/bidicategory-name: Likewise.
+	* modules/unictype/bidicategory-of: Likewise.
+	* modules/unictype/bidicategory-test: Likewise.
+	* modules/unictype/block-list: Likewise.
+	* modules/unictype/block-test: Likewise.
+	* modules/unictype/category-C: Likewise.
+	* modules/unictype/category-Cc: Likewise.
+	* modules/unictype/category-Cf: Likewise.
+	* modules/unictype/category-Cn: Likewise.
+	* modules/unictype/category-Co: Likewise.
+	* modules/unictype/category-Cs: Likewise.
+	* modules/unictype/category-L: Likewise.
+	* modules/unictype/category-Ll: Likewise.
+	* modules/unictype/category-Lm: Likewise.
+	* modules/unictype/category-Lo: Likewise.
+	* modules/unictype/category-Lt: Likewise.
+	* modules/unictype/category-Lu: Likewise.
+	* modules/unictype/category-M: Likewise.
+	* modules/unictype/category-Mc: Likewise.
+	* modules/unictype/category-Me: Likewise.
+	* modules/unictype/category-Mn: Likewise.
+	* modules/unictype/category-N: Likewise.
+	* modules/unictype/category-Nd: Likewise.
+	* modules/unictype/category-Nl: Likewise.
+	* modules/unictype/category-No: Likewise.
+	* modules/unictype/category-P: Likewise.
+	* modules/unictype/category-Pc: Likewise.
+	* modules/unictype/category-Pd: Likewise.
+	* modules/unictype/category-Pe: Likewise.
+	* modules/unictype/category-Pf: Likewise.
+	* modules/unictype/category-Pi: Likewise.
+	* modules/unictype/category-Po: Likewise.
+	* modules/unictype/category-Ps: Likewise.
+	* modules/unictype/category-S: Likewise.
+	* modules/unictype/category-Sc: Likewise.
+	* modules/unictype/category-Sk: Likewise.
+	* modules/unictype/category-Sm: Likewise.
+	* modules/unictype/category-So: Likewise.
+	* modules/unictype/category-Z: Likewise.
+	* modules/unictype/category-Zl: Likewise.
+	* modules/unictype/category-Zp: Likewise.
+	* modules/unictype/category-Zs: Likewise.
+	* modules/unictype/category-and: Likewise.
+	* modules/unictype/category-and-not: Likewise.
+	* modules/unictype/category-byname: Likewise.
+	* modules/unictype/category-name: Likewise.
+	* modules/unictype/category-none: Likewise.
+	* modules/unictype/category-of: Likewise.
+	* modules/unictype/category-or: Likewise.
+	* modules/unictype/category-test: Likewise.
+	* modules/unictype/combining-class: Likewise.
+	* modules/unictype/ctype-alnum: Likewise.
+	* modules/unictype/ctype-alpha: Likewise.
+	* modules/unictype/ctype-blank: Likewise.
+	* modules/unictype/ctype-cntrl: Likewise.
+	* modules/unictype/ctype-digit: Likewise.
+	* modules/unictype/ctype-graph: Likewise.
+	* modules/unictype/ctype-lower: Likewise.
+	* modules/unictype/ctype-print: Likewise.
+	* modules/unictype/ctype-punct: Likewise.
+	* modules/unictype/ctype-space: Likewise.
+	* modules/unictype/ctype-upper: Likewise.
+	* modules/unictype/ctype-xdigit: Likewise.
+	* modules/unictype/decimal-digit: Likewise.
+	* modules/unictype/digit: Likewise.
+	* modules/unictype/mirror: Likewise.
+	* modules/unictype/numeric: Likewise.
+	* modules/unictype/property-alphabetic: Likewise.
+	* modules/unictype/property-ascii-hex-digit: Likewise.
+	* modules/unictype/property-bidi-arabic-digit: Likewise.
+	* modules/unictype/property-bidi-arabic-right-to-left: Likewise.
+	* modules/unictype/property-bidi-block-separator: Likewise.
+	* modules/unictype/property-bidi-boundary-neutral: Likewise.
+	* modules/unictype/property-bidi-common-separator: Likewise.
+	* modules/unictype/property-bidi-control: Likewise.
+	* modules/unictype/property-bidi-embedding-or-override: Likewise.
+	* modules/unictype/property-bidi-eur-num-separator: Likewise.
+	* modules/unictype/property-bidi-eur-num-terminator: Likewise.
+	* modules/unictype/property-bidi-european-digit: Likewise.
+	* modules/unictype/property-bidi-hebrew-right-to-left: Likewise.
+	* modules/unictype/property-bidi-left-to-right: Likewise.
+	* modules/unictype/property-bidi-non-spacing-mark: Likewise.
+	* modules/unictype/property-bidi-other-neutral: Likewise.
+	* modules/unictype/property-bidi-pdf: Likewise.
+	* modules/unictype/property-bidi-segment-separator: Likewise.
+	* modules/unictype/property-bidi-whitespace: Likewise.
+	* modules/unictype/property-byname: Likewise.
+	* modules/unictype/property-combining: Likewise.
+	* modules/unictype/property-composite: Likewise.
+	* modules/unictype/property-currency-symbol: Likewise.
+	* modules/unictype/property-dash: Likewise.
+	* modules/unictype/property-decimal-digit: Likewise.
+	* modules/unictype/property-default-ignorable-code-point: Likewise.
+	* modules/unictype/property-deprecated: Likewise.
+	* modules/unictype/property-diacritic: Likewise.
+	* modules/unictype/property-extender: Likewise.
+	* modules/unictype/property-format-control: Likewise.
+	* modules/unictype/property-grapheme-base: Likewise.
+	* modules/unictype/property-grapheme-extend: Likewise.
+	* modules/unictype/property-grapheme-link: Likewise.
+	* modules/unictype/property-hex-digit: Likewise.
+	* modules/unictype/property-hyphen: Likewise.
+	* modules/unictype/property-id-continue: Likewise.
+	* modules/unictype/property-id-start: Likewise.
+	* modules/unictype/property-ideographic: Likewise.
+	* modules/unictype/property-ids-binary-operator: Likewise.
+	* modules/unictype/property-ids-trinary-operator: Likewise.
+	* modules/unictype/property-ignorable-control: Likewise.
+	* modules/unictype/property-iso-control: Likewise.
+	* modules/unictype/property-join-control: Likewise.
+	* modules/unictype/property-left-of-pair: Likewise.
+	* modules/unictype/property-line-separator: Likewise.
+	* modules/unictype/property-logical-order-exception: Likewise.
+	* modules/unictype/property-lowercase: Likewise.
+	* modules/unictype/property-math: Likewise.
+	* modules/unictype/property-non-break: Likewise.
+	* modules/unictype/property-not-a-character: Likewise.
+	* modules/unictype/property-numeric: Likewise.
+	* modules/unictype/property-other-alphabetic: Likewise.
+	* modules/unictype/property-other-default-ignorable-code-point: Likewise.
+	* modules/unictype/property-other-grapheme-extend: Likewise.
+	* modules/unictype/property-other-id-continue: Likewise.
+	* modules/unictype/property-other-id-start: Likewise.
+	* modules/unictype/property-other-lowercase: Likewise.
+	* modules/unictype/property-other-math: Likewise.
+	* modules/unictype/property-other-uppercase: Likewise.
+	* modules/unictype/property-paired-punctuation: Likewise.
+	* modules/unictype/property-paragraph-separator: Likewise.
+	* modules/unictype/property-pattern-syntax: Likewise.
+	* modules/unictype/property-pattern-white-space: Likewise.
+	* modules/unictype/property-private-use: Likewise.
+	* modules/unictype/property-punctuation: Likewise.
+	* modules/unictype/property-quotation-mark: Likewise.
+	* modules/unictype/property-radical: Likewise.
+	* modules/unictype/property-sentence-terminal: Likewise.
+	* modules/unictype/property-soft-dotted: Likewise.
+	* modules/unictype/property-space: Likewise.
+	* modules/unictype/property-terminal-punctuation: Likewise.
+	* modules/unictype/property-test: Likewise.
+	* modules/unictype/property-titlecase: Likewise.
+	* modules/unictype/property-unassigned-code-value: Likewise.
+	* modules/unictype/property-unified-ideograph: Likewise.
+	* modules/unictype/property-uppercase: Likewise.
+	* modules/unictype/property-variation-selector: Likewise.
+	* modules/unictype/property-white-space: Likewise.
+	* modules/unictype/property-xid-continue: Likewise.
+	* modules/unictype/property-xid-start: Likewise.
+	* modules/unictype/property-zero-width: Likewise.
+	* modules/unictype/scripts: Likewise.
+	* modules/unictype/syntax-c-ident: Likewise.
+	* modules/unictype/syntax-c-whitespace: Likewise.
+	* modules/unictype/syntax-java-ident: Likewise.
+	* modules/unictype/syntax-java-whitespace: Likewise.
+	* modules/unilbrk/u8-possible-linebreaks: Likewise.
+	* modules/unilbrk/u8-width-linebreaks: Likewise.
+	* modules/unilbrk/u16-possible-linebreaks: Likewise.
+	* modules/unilbrk/u16-width-linebreaks: Likewise.
+	* modules/unilbrk/u32-possible-linebreaks: Likewise.
+	* modules/unilbrk/u32-width-linebreaks: Likewise.
+	* modules/unilbrk/ulc-possible-linebreaks: Likewise.
+	* modules/unilbrk/ulc-width-linebreaks: Likewise.
+	* modules/uniname/uniname: Likewise.
+	* modules/uninorm/canonical-decomposition: Likewise.
+	* modules/uninorm/composition: Likewise.
+	* modules/uninorm/decomposing-form: Likewise.
+	* modules/uninorm/decomposition: Likewise.
+	* modules/uninorm/filter: Likewise.
+	* modules/uninorm/nfc: Likewise.
+	* modules/uninorm/nfd: Likewise.
+	* modules/uninorm/nfkc: Likewise.
+	* modules/uninorm/nfkd: Likewise.
+	* modules/uninorm/u8-normalize: Likewise.
+	* modules/uninorm/u8-normcmp: Likewise.
+	* modules/uninorm/u8-normcoll: Likewise.
+	* modules/uninorm/u8-normxfrm: Likewise.
+	* modules/uninorm/u16-normalize: Likewise.
+	* modules/uninorm/u16-normcmp: Likewise.
+	* modules/uninorm/u16-normcoll: Likewise.
+	* modules/uninorm/u16-normxfrm: Likewise.
+	* modules/uninorm/u32-normalize: Likewise.
+	* modules/uninorm/u32-normcmp: Likewise.
+	* modules/uninorm/u32-normcoll: Likewise.
+	* modules/uninorm/u32-normxfrm: Likewise.
+	* modules/unistdio/u8-asnprintf: Likewise.
+	* modules/unistdio/u8-asprintf: Likewise.
+	* modules/unistdio/u8-snprintf: Likewise.
+	* modules/unistdio/u8-sprintf: Likewise.
+	* modules/unistdio/u8-u8-asnprintf: Likewise.
+	* modules/unistdio/u8-u8-asprintf: Likewise.
+	* modules/unistdio/u8-u8-snprintf: Likewise.
+	* modules/unistdio/u8-u8-sprintf: Likewise.
+	* modules/unistdio/u8-u8-vasnprintf: Likewise.
+	* modules/unistdio/u8-u8-vasprintf: Likewise.
+	* modules/unistdio/u8-u8-vsnprintf: Likewise.
+	* modules/unistdio/u8-u8-vsprintf: Likewise.
+	* modules/unistdio/u8-vasnprintf: Likewise.
+	* modules/unistdio/u8-vasprintf: Likewise.
+	* modules/unistdio/u8-vsnprintf: Likewise.
+	* modules/unistdio/u8-vsprintf: Likewise.
+	* modules/unistdio/u16-asnprintf: Likewise.
+	* modules/unistdio/u16-asprintf: Likewise.
+	* modules/unistdio/u16-snprintf: Likewise.
+	* modules/unistdio/u16-sprintf: Likewise.
+	* modules/unistdio/u16-u16-asnprintf: Likewise.
+	* modules/unistdio/u16-u16-asprintf: Likewise.
+	* modules/unistdio/u16-u16-snprintf: Likewise.
+	* modules/unistdio/u16-u16-sprintf: Likewise.
+	* modules/unistdio/u16-u16-vasnprintf: Likewise.
+	* modules/unistdio/u16-u16-vasprintf: Likewise.
+	* modules/unistdio/u16-u16-vsnprintf: Likewise.
+	* modules/unistdio/u16-u16-vsprintf: Likewise.
+	* modules/unistdio/u16-vasnprintf: Likewise.
+	* modules/unistdio/u16-vasprintf: Likewise.
+	* modules/unistdio/u16-vsnprintf: Likewise.
+	* modules/unistdio/u16-vsprintf: Likewise.
+	* modules/unistdio/u32-asnprintf: Likewise.
+	* modules/unistdio/u32-asprintf: Likewise.
+	* modules/unistdio/u32-snprintf: Likewise.
+	* modules/unistdio/u32-sprintf: Likewise.
+	* modules/unistdio/u32-u32-asnprintf: Likewise.
+	* modules/unistdio/u32-u32-asprintf: Likewise.
+	* modules/unistdio/u32-u32-snprintf: Likewise.
+	* modules/unistdio/u32-u32-sprintf: Likewise.
+	* modules/unistdio/u32-u32-vasnprintf: Likewise.
+	* modules/unistdio/u32-u32-vasprintf: Likewise.
+	* modules/unistdio/u32-u32-vsnprintf: Likewise.
+	* modules/unistdio/u32-u32-vsprintf: Likewise.
+	* modules/unistdio/u32-vasnprintf: Likewise.
+	* modules/unistdio/u32-vasprintf: Likewise.
+	* modules/unistdio/u32-vsnprintf: Likewise.
+	* modules/unistdio/u32-vsprintf: Likewise.
+	* modules/unistdio/ulc-asnprintf: Likewise.
+	* modules/unistdio/ulc-asprintf: Likewise.
+	* modules/unistdio/ulc-fprintf: Likewise.
+	* modules/unistdio/ulc-snprintf: Likewise.
+	* modules/unistdio/ulc-sprintf: Likewise.
+	* modules/unistdio/ulc-vasnprintf: Likewise.
+	* modules/unistdio/ulc-vasprintf: Likewise.
+	* modules/unistdio/ulc-vfprintf: Likewise.
+	* modules/unistdio/ulc-vsnprintf: Likewise.
+	* modules/unistdio/ulc-vsprintf: Likewise.
+	* modules/unistr/u8-check: Likewise.
+	* modules/unistr/u8-chr: Likewise.
+	* modules/unistr/u8-cmp: Likewise.
+	* modules/unistr/u8-cmp2: Likewise.
+	* modules/unistr/u8-cpy: Likewise.
+	* modules/unistr/u8-cpy-alloc: Likewise.
+	* modules/unistr/u8-endswith: Likewise.
+	* modules/unistr/u8-mblen: Likewise.
+	* modules/unistr/u8-mbsnlen: Likewise.
+	* modules/unistr/u8-mbtouc: Likewise.
+	* modules/unistr/u8-mbtouc-unsafe: Likewise.
+	* modules/unistr/u8-mbtoucr: Likewise.
+	* modules/unistr/u8-move: Likewise.
+	* modules/unistr/u8-next: Likewise.
+	* modules/unistr/u8-prev: Likewise.
+	* modules/unistr/u8-set: Likewise.
+	* modules/unistr/u8-startswith: Likewise.
+	* modules/unistr/u8-stpcpy: Likewise.
+	* modules/unistr/u8-stpncpy: Likewise.
+	* modules/unistr/u8-strcat: Likewise.
+	* modules/unistr/u8-strchr: Likewise.
+	* modules/unistr/u8-strcmp: Likewise.
+	* modules/unistr/u8-strcoll: Likewise.
+	* modules/unistr/u8-strcpy: Likewise.
+	* modules/unistr/u8-strcspn: Likewise.
+	* modules/unistr/u8-strdup: Likewise.
+	* modules/unistr/u8-strlen: Likewise.
+	* modules/unistr/u8-strmblen: Likewise.
+	* modules/unistr/u8-strmbtouc: Likewise.
+	* modules/unistr/u8-strncat: Likewise.
+	* modules/unistr/u8-strncmp: Likewise.
+	* modules/unistr/u8-strncpy: Likewise.
+	* modules/unistr/u8-strnlen: Likewise.
+	* modules/unistr/u8-strpbrk: Likewise.
+	* modules/unistr/u8-strrchr: Likewise.
+	* modules/unistr/u8-strspn: Likewise.
+	* modules/unistr/u8-strstr: Likewise.
+	* modules/unistr/u8-strtok: Likewise.
+	* modules/unistr/u8-to-u16: Likewise.
+	* modules/unistr/u8-to-u32: Likewise.
+	* modules/unistr/u8-uctomb: Likewise.
+	* modules/unistr/u16-check: Likewise.
+	* modules/unistr/u16-chr: Likewise.
+	* modules/unistr/u16-cmp: Likewise.
+	* modules/unistr/u16-cmp2: Likewise.
+	* modules/unistr/u16-cpy: Likewise.
+	* modules/unistr/u16-cpy-alloc: Likewise.
+	* modules/unistr/u16-endswith: Likewise.
+	* modules/unistr/u16-mblen: Likewise.
+	* modules/unistr/u16-mbsnlen: Likewise.
+	* modules/unistr/u16-mbtouc: Likewise.
+	* modules/unistr/u16-mbtouc-unsafe: Likewise.
+	* modules/unistr/u16-mbtoucr: Likewise.
+	* modules/unistr/u16-move: Likewise.
+	* modules/unistr/u16-next: Likewise.
+	* modules/unistr/u16-prev: Likewise.
+	* modules/unistr/u16-set: Likewise.
+	* modules/unistr/u16-startswith: Likewise.
+	* modules/unistr/u16-stpcpy: Likewise.
+	* modules/unistr/u16-stpncpy: Likewise.
+	* modules/unistr/u16-strcat: Likewise.
+	* modules/unistr/u16-strchr: Likewise.
+	* modules/unistr/u16-strcmp: Likewise.
+	* modules/unistr/u16-strcoll: Likewise.
+	* modules/unistr/u16-strcpy: Likewise.
+	* modules/unistr/u16-strcspn: Likewise.
+	* modules/unistr/u16-strdup: Likewise.
+	* modules/unistr/u16-strlen: Likewise.
+	* modules/unistr/u16-strmblen: Likewise.
+	* modules/unistr/u16-strmbtouc: Likewise.
+	* modules/unistr/u16-strncat: Likewise.
+	* modules/unistr/u16-strncmp: Likewise.
+	* modules/unistr/u16-strncpy: Likewise.
+	* modules/unistr/u16-strnlen: Likewise.
+	* modules/unistr/u16-strpbrk: Likewise.
+	* modules/unistr/u16-strrchr: Likewise.
+	* modules/unistr/u16-strspn: Likewise.
+	* modules/unistr/u16-strstr: Likewise.
+	* modules/unistr/u16-strtok: Likewise.
+	* modules/unistr/u16-to-u32: Likewise.
+	* modules/unistr/u16-to-u8: Likewise.
+	* modules/unistr/u16-uctomb: Likewise.
+	* modules/unistr/u32-check: Likewise.
+	* modules/unistr/u32-chr: Likewise.
+	* modules/unistr/u32-cmp: Likewise.
+	* modules/unistr/u32-cmp2: Likewise.
+	* modules/unistr/u32-cpy: Likewise.
+	* modules/unistr/u32-cpy-alloc: Likewise.
+	* modules/unistr/u32-endswith: Likewise.
+	* modules/unistr/u32-mblen: Likewise.
+	* modules/unistr/u32-mbsnlen: Likewise.
+	* modules/unistr/u32-mbtouc: Likewise.
+	* modules/unistr/u32-mbtouc-unsafe: Likewise.
+	* modules/unistr/u32-mbtoucr: Likewise.
+	* modules/unistr/u32-move: Likewise.
+	* modules/unistr/u32-next: Likewise.
+	* modules/unistr/u32-prev: Likewise.
+	* modules/unistr/u32-set: Likewise.
+	* modules/unistr/u32-startswith: Likewise.
+	* modules/unistr/u32-stpcpy: Likewise.
+	* modules/unistr/u32-stpncpy: Likewise.
+	* modules/unistr/u32-strcat: Likewise.
+	* modules/unistr/u32-strchr: Likewise.
+	* modules/unistr/u32-strcmp: Likewise.
+	* modules/unistr/u32-strcoll: Likewise.
+	* modules/unistr/u32-strcpy: Likewise.
+	* modules/unistr/u32-strcspn: Likewise.
+	* modules/unistr/u32-strdup: Likewise.
+	* modules/unistr/u32-strlen: Likewise.
+	* modules/unistr/u32-strmblen: Likewise.
+	* modules/unistr/u32-strmbtouc: Likewise.
+	* modules/unistr/u32-strncat: Likewise.
+	* modules/unistr/u32-strncmp: Likewise.
+	* modules/unistr/u32-strncpy: Likewise.
+	* modules/unistr/u32-strnlen: Likewise.
+	* modules/unistr/u32-strpbrk: Likewise.
+	* modules/unistr/u32-strrchr: Likewise.
+	* modules/unistr/u32-strspn: Likewise.
+	* modules/unistr/u32-strstr: Likewise.
+	* modules/unistr/u32-strtok: Likewise.
+	* modules/unistr/u32-to-u16: Likewise.
+	* modules/unistr/u32-to-u8: Likewise.
+	* modules/unistr/u32-uctomb: Likewise.
+	* modules/uniwbrk/u8-wordbreaks: Likewise.
+	* modules/uniwbrk/u16-wordbreaks: Likewise.
+	* modules/uniwbrk/u32-wordbreaks: Likewise.
+	* modules/uniwbrk/ulc-wordbreaks: Likewise.
+	* modules/uniwbrk/wordbreak-property: Likewise.
+	* modules/uniwidth/u8-strwidth: Likewise.
+	* modules/uniwidth/u8-width: Likewise.
+	* modules/uniwidth/u16-strwidth: Likewise.
+	* modules/uniwidth/u16-width: Likewise.
+	* modules/uniwidth/u32-strwidth: Likewise.
+	* modules/uniwidth/u32-width: Likewise.
+	* modules/uniwidth/width: Likewise.
+	* modules/unicase/cased-tests (Makefile.am): Link all test programs
+	with $(LIBUNISTRING).
+	* modules/unicase/ignorable-tests: Likewise.
+	* modules/unicase/locale-language-tests: Likewise.
+	* modules/unicase/tolower-tests: Likewise.
+	* modules/unicase/totitle-tests: Likewise.
+	* modules/unicase/toupper-tests: Likewise.
+	* modules/unicase/u8-casecmp-tests: Likewise.
+	* modules/unicase/u8-casecoll-tests: Likewise.
+	* modules/unicase/u8-casefold-tests: Likewise.
+	* modules/unicase/u8-is-cased-tests: Likewise.
+	* modules/unicase/u8-is-casefolded-tests: Likewise.
+	* modules/unicase/u8-is-lowercase-tests: Likewise.
+	* modules/unicase/u8-is-titlecase-tests: Likewise.
+	* modules/unicase/u8-is-uppercase-tests: Likewise.
+	* modules/unicase/u8-tolower-tests: Likewise.
+	* modules/unicase/u8-totitle-tests: Likewise.
+	* modules/unicase/u8-toupper-tests: Likewise.
+	* modules/unicase/u16-casecmp-tests: Likewise.
+	* modules/unicase/u16-casecoll-tests: Likewise.
+	* modules/unicase/u16-casefold-tests: Likewise.
+	* modules/unicase/u16-is-cased-tests: Likewise.
+	* modules/unicase/u16-is-casefolded-tests: Likewise.
+	* modules/unicase/u16-is-lowercase-tests: Likewise.
+	* modules/unicase/u16-is-titlecase-tests: Likewise.
+	* modules/unicase/u16-is-uppercase-tests: Likewise.
+	* modules/unicase/u16-tolower-tests: Likewise.
+	* modules/unicase/u16-totitle-tests: Likewise.
+	* modules/unicase/u16-toupper-tests: Likewise.
+	* modules/unicase/u32-casecmp-tests: Likewise.
+	* modules/unicase/u32-casecoll-tests: Likewise.
+	* modules/unicase/u32-casefold-tests: Likewise.
+	* modules/unicase/u32-is-cased-tests: Likewise.
+	* modules/unicase/u32-is-casefolded-tests: Likewise.
+	* modules/unicase/u32-is-lowercase-tests: Likewise.
+	* modules/unicase/u32-is-titlecase-tests: Likewise.
+	* modules/unicase/u32-is-uppercase-tests: Likewise.
+	* modules/unicase/u32-tolower-tests: Likewise.
+	* modules/unicase/u32-totitle-tests: Likewise.
+	* modules/unicase/u32-toupper-tests: Likewise.
+	* modules/unicase/ulc-casecmp-tests: Likewise.
+	* modules/unicase/ulc-casecoll-tests: Likewise.
+	* modules/uniconv/u8-conv-from-enc-tests: Likewise.
+	* modules/uniconv/u8-conv-to-enc-tests: Likewise.
+	* modules/uniconv/u8-strconv-from-enc-tests: Likewise.
+	* modules/uniconv/u8-strconv-to-enc-tests: Likewise.
+	* modules/uniconv/u16-conv-from-enc-tests: Likewise.
+	* modules/uniconv/u16-conv-to-enc-tests: Likewise.
+	* modules/uniconv/u16-strconv-from-enc-tests: Likewise.
+	* modules/uniconv/u16-strconv-to-enc-tests: Likewise.
+	* modules/uniconv/u32-conv-from-enc-tests: Likewise.
+	* modules/uniconv/u32-conv-to-enc-tests: Likewise.
+	* modules/uniconv/u32-strconv-from-enc-tests: Likewise.
+	* modules/uniconv/u32-strconv-to-enc-tests: Likewise.
+	* modules/unictype/bidicategory-byname-tests: Likewise.
+	* modules/unictype/bidicategory-name-tests: Likewise.
+	* modules/unictype/bidicategory-of-tests: Likewise.
+	* modules/unictype/bidicategory-test-tests: Likewise.
+	* modules/unictype/block-list-tests: Likewise.
+	* modules/unictype/block-of-tests: Likewise.
+	* modules/unictype/block-test-tests: Likewise.
+	* modules/unictype/category-C-tests: Likewise.
+	* modules/unictype/category-Cc-tests: Likewise.
+	* modules/unictype/category-Cf-tests: Likewise.
+	* modules/unictype/category-Cn-tests: Likewise.
+	* modules/unictype/category-Co-tests: Likewise.
+	* modules/unictype/category-Cs-tests: Likewise.
+	* modules/unictype/category-L-tests: Likewise.
+	* modules/unictype/category-Ll-tests: Likewise.
+	* modules/unictype/category-Lm-tests: Likewise.
+	* modules/unictype/category-Lo-tests: Likewise.
+	* modules/unictype/category-Lt-tests: Likewise.
+	* modules/unictype/category-Lu-tests: Likewise.
+	* modules/unictype/category-M-tests: Likewise.
+	* modules/unictype/category-Mc-tests: Likewise.
+	* modules/unictype/category-Me-tests: Likewise.
+	* modules/unictype/category-Mn-tests: Likewise.
+	* modules/unictype/category-N-tests: Likewise.
+	* modules/unictype/category-Nd-tests: Likewise.
+	* modules/unictype/category-Nl-tests: Likewise.
+	* modules/unictype/category-No-tests: Likewise.
+	* modules/unictype/category-P-tests: Likewise.
+	* modules/unictype/category-Pc-tests: Likewise.
+	* modules/unictype/category-Pd-tests: Likewise.
+	* modules/unictype/category-Pe-tests: Likewise.
+	* modules/unictype/category-Pf-tests: Likewise.
+	* modules/unictype/category-Pi-tests: Likewise.
+	* modules/unictype/category-Po-tests: Likewise.
+	* modules/unictype/category-Ps-tests: Likewise.
+	* modules/unictype/category-S-tests: Likewise.
+	* modules/unictype/category-Sc-tests: Likewise.
+	* modules/unictype/category-Sk-tests: Likewise.
+	* modules/unictype/category-Sm-tests: Likewise.
+	* modules/unictype/category-So-tests: Likewise.
+	* modules/unictype/category-Z-tests: Likewise.
+	* modules/unictype/category-Zl-tests: Likewise.
+	* modules/unictype/category-Zp-tests: Likewise.
+	* modules/unictype/category-Zs-tests: Likewise.
+	* modules/unictype/category-and-not-tests: Likewise.
+	* modules/unictype/category-and-tests: Likewise.
+	* modules/unictype/category-byname-tests: Likewise.
+	* modules/unictype/category-name-tests: Likewise.
+	* modules/unictype/category-none-tests: Likewise.
+	* modules/unictype/category-of-tests: Likewise.
+	* modules/unictype/category-or-tests: Likewise.
+	* modules/unictype/category-test-withtable-tests: Likewise.
+	* modules/unictype/combining-class-tests: Likewise.
+	* modules/unictype/ctype-alnum-tests: Likewise.
+	* modules/unictype/ctype-alpha-tests: Likewise.
+	* modules/unictype/ctype-blank-tests: Likewise.
+	* modules/unictype/ctype-cntrl-tests: Likewise.
+	* modules/unictype/ctype-digit-tests: Likewise.
+	* modules/unictype/ctype-graph-tests: Likewise.
+	* modules/unictype/ctype-lower-tests: Likewise.
+	* modules/unictype/ctype-print-tests: Likewise.
+	* modules/unictype/ctype-punct-tests: Likewise.
+	* modules/unictype/ctype-space-tests: Likewise.
+	* modules/unictype/ctype-upper-tests: Likewise.
+	* modules/unictype/ctype-xdigit-tests: Likewise.
+	* modules/unictype/decimal-digit-tests: Likewise.
+	* modules/unictype/digit-tests: Likewise.
+	* modules/unictype/mirror-tests: Likewise.
+	* modules/unictype/numeric-tests: Likewise.
+	* modules/unictype/property-alphabetic-tests: Likewise.
+	* modules/unictype/property-ascii-hex-digit-tests: Likewise.
+	* modules/unictype/property-bidi-arabic-digit-tests: Likewise.
+	* modules/unictype/property-bidi-arabic-right-to-left-tests: Likewise.
+	* modules/unictype/property-bidi-block-separator-tests: Likewise.
+	* modules/unictype/property-bidi-boundary-neutral-tests: Likewise.
+	* modules/unictype/property-bidi-common-separator-tests: Likewise.
+	* modules/unictype/property-bidi-control-tests: Likewise.
+	* modules/unictype/property-bidi-embedding-or-override-tests: Likewise.
+	* modules/unictype/property-bidi-eur-num-separator-tests: Likewise.
+	* modules/unictype/property-bidi-eur-num-terminator-tests: Likewise.
+	* modules/unictype/property-bidi-european-digit-tests: Likewise.
+	* modules/unictype/property-bidi-hebrew-right-to-left-tests: Likewise.
+	* modules/unictype/property-bidi-left-to-right-tests: Likewise.
+	* modules/unictype/property-bidi-non-spacing-mark-tests: Likewise.
+	* modules/unictype/property-bidi-other-neutral-tests: Likewise.
+	* modules/unictype/property-bidi-pdf-tests: Likewise.
+	* modules/unictype/property-bidi-segment-separator-tests: Likewise.
+	* modules/unictype/property-bidi-whitespace-tests: Likewise.
+	* modules/unictype/property-byname-tests: Likewise.
+	* modules/unictype/property-combining-tests: Likewise.
+	* modules/unictype/property-composite-tests: Likewise.
+	* modules/unictype/property-currency-symbol-tests: Likewise.
+	* modules/unictype/property-dash-tests: Likewise.
+	* modules/unictype/property-decimal-digit-tests: Likewise.
+	* modules/unictype/property-default-ignorable-code-point-tests: Likewise.
+	* modules/unictype/property-deprecated-tests: Likewise.
+	* modules/unictype/property-diacritic-tests: Likewise.
+	* modules/unictype/property-extender-tests: Likewise.
+	* modules/unictype/property-format-control-tests: Likewise.
+	* modules/unictype/property-grapheme-base-tests: Likewise.
+	* modules/unictype/property-grapheme-extend-tests: Likewise.
+	* modules/unictype/property-grapheme-link-tests: Likewise.
+	* modules/unictype/property-hex-digit-tests: Likewise.
+	* modules/unictype/property-hyphen-tests: Likewise.
+	* modules/unictype/property-id-continue-tests: Likewise.
+	* modules/unictype/property-id-start-tests: Likewise.
+	* modules/unictype/property-ideographic-tests: Likewise.
+	* modules/unictype/property-ids-binary-operator-tests: Likewise.
+	* modules/unictype/property-ids-trinary-operator-tests: Likewise.
+	* modules/unictype/property-ignorable-control-tests: Likewise.
+	* modules/unictype/property-iso-control-tests: Likewise.
+	* modules/unictype/property-join-control-tests: Likewise.
+	* modules/unictype/property-left-of-pair-tests: Likewise.
+	* modules/unictype/property-line-separator-tests: Likewise.
+	* modules/unictype/property-logical-order-exception-tests: Likewise.
+	* modules/unictype/property-lowercase-tests: Likewise.
+	* modules/unictype/property-math-tests: Likewise.
+	* modules/unictype/property-non-break-tests: Likewise.
+	* modules/unictype/property-not-a-character-tests: Likewise.
+	* modules/unictype/property-numeric-tests: Likewise.
+	* modules/unictype/property-other-alphabetic-tests: Likewise.
+	* modules/unictype/property-other-default-ignorable-code-point-tests:
+	Likewise.
+	* modules/unictype/property-other-grapheme-extend-tests: Likewise.
+	* modules/unictype/property-other-id-continue-tests: Likewise.
+	* modules/unictype/property-other-id-start-tests: Likewise.
+	* modules/unictype/property-other-lowercase-tests: Likewise.
+	* modules/unictype/property-other-math-tests: Likewise.
+	* modules/unictype/property-other-uppercase-tests: Likewise.
+	* modules/unictype/property-paired-punctuation-tests: Likewise.
+	* modules/unictype/property-paragraph-separator-tests: Likewise.
+	* modules/unictype/property-pattern-syntax-tests: Likewise.
+	* modules/unictype/property-pattern-white-space-tests: Likewise.
+	* modules/unictype/property-private-use-tests: Likewise.
+	* modules/unictype/property-punctuation-tests: Likewise.
+	* modules/unictype/property-quotation-mark-tests: Likewise.
+	* modules/unictype/property-radical-tests: Likewise.
+	* modules/unictype/property-sentence-terminal-tests: Likewise.
+	* modules/unictype/property-soft-dotted-tests: Likewise.
+	* modules/unictype/property-space-tests: Likewise.
+	* modules/unictype/property-terminal-punctuation-tests: Likewise.
+	* modules/unictype/property-test-tests: Likewise.
+	* modules/unictype/property-titlecase-tests: Likewise.
+	* modules/unictype/property-unassigned-code-value-tests: Likewise.
+	* modules/unictype/property-unified-ideograph-tests: Likewise.
+	* modules/unictype/property-uppercase-tests: Likewise.
+	* modules/unictype/property-variation-selector-tests: Likewise.
+	* modules/unictype/property-white-space-tests: Likewise.
+	* modules/unictype/property-xid-continue-tests: Likewise.
+	* modules/unictype/property-xid-start-tests: Likewise.
+	* modules/unictype/property-zero-width-tests: Likewise.
+	* modules/unictype/scripts-tests: Likewise.
+	* modules/unictype/syntax-c-ident-tests: Likewise.
+	* modules/unictype/syntax-c-whitespace-tests: Likewise.
+	* modules/unictype/syntax-java-ident-tests: Likewise.
+	* modules/unictype/syntax-java-whitespace-tests: Likewise.
+	* modules/unilbrk/u8-possible-linebreaks-tests: Likewise.
+	* modules/unilbrk/u8-width-linebreaks-tests: Likewise.
+	* modules/unilbrk/u16-possible-linebreaks-tests: Likewise.
+	* modules/unilbrk/u16-width-linebreaks-tests: Likewise.
+	* modules/unilbrk/u32-possible-linebreaks-tests: Likewise.
+	* modules/unilbrk/u32-width-linebreaks-tests: Likewise.
+	* modules/unilbrk/ulc-possible-linebreaks-tests: Likewise.
+	* modules/unilbrk/ulc-width-linebreaks-tests: Likewise.
+	* modules/uniname/uniname-tests: Likewise.
+	* modules/uninorm/canonical-decomposition-tests: Likewise.
+	* modules/uninorm/compat-decomposition-tests: Likewise.
+	* modules/uninorm/composition-tests: Likewise.
+	* modules/uninorm/decomposing-form-tests: Likewise.
+	* modules/uninorm/decomposition-tests: Likewise.
+	* modules/uninorm/filter-tests: Likewise.
+	* modules/uninorm/nfc-tests: Likewise.
+	* modules/uninorm/nfd-tests: Likewise.
+	* modules/uninorm/nfkc-tests: Likewise.
+	* modules/uninorm/nfkd-tests: Likewise.
+	* modules/uninorm/u8-normcmp-tests: Likewise.
+	* modules/uninorm/u8-normcoll-tests: Likewise.
+	* modules/uninorm/u16-normcmp-tests: Likewise.
+	* modules/uninorm/u16-normcoll-tests: Likewise.
+	* modules/uninorm/u32-normcmp-tests: Likewise.
+	* modules/uninorm/u32-normcoll-tests: Likewise.
+	* modules/unistdio/u8-asnprintf-tests: Likewise.
+	* modules/unistdio/u8-vasnprintf-tests: Likewise.
+	* modules/unistdio/u8-vasprintf-tests: Likewise.
+	* modules/unistdio/u8-vsnprintf-tests: Likewise.
+	* modules/unistdio/u8-vsprintf-tests: Likewise.
+	* modules/unistdio/u16-asnprintf-tests: Likewise.
+	* modules/unistdio/u16-vasnprintf-tests: Likewise.
+	* modules/unistdio/u16-vasprintf-tests: Likewise.
+	* modules/unistdio/u16-vsnprintf-tests: Likewise.
+	* modules/unistdio/u16-vsprintf-tests: Likewise.
+	* modules/unistdio/u32-asnprintf-tests: Likewise.
+	* modules/unistdio/u32-vasnprintf-tests: Likewise.
+	* modules/unistdio/u32-vasprintf-tests: Likewise.
+	* modules/unistdio/u32-vsnprintf-tests: Likewise.
+	* modules/unistdio/u32-vsprintf-tests: Likewise.
+	* modules/unistdio/ulc-asnprintf-tests: Likewise.
+	* modules/unistdio/ulc-vasnprintf-tests: Likewise.
+	* modules/unistdio/ulc-vasprintf-tests: Likewise.
+	* modules/unistdio/ulc-vsnprintf-tests: Likewise.
+	* modules/unistdio/ulc-vsprintf-tests: Likewise.
+	* modules/unistr/u8-check-tests: Likewise.
+	* modules/unistr/u8-chr-tests: Likewise.
+	* modules/unistr/u8-cmp-tests: Likewise.
+	* modules/unistr/u8-cmp2-tests: Likewise.
+	* modules/unistr/u8-cpy-alloc-tests: Likewise.
+	* modules/unistr/u8-cpy-tests: Likewise.
+	* modules/unistr/u8-mblen-tests: Likewise.
+	* modules/unistr/u8-mbsnlen-tests: Likewise.
+	* modules/unistr/u8-mbtouc-tests: Likewise.
+	* modules/unistr/u8-mbtouc-unsafe-tests: Likewise.
+	* modules/unistr/u8-mbtoucr-tests: Likewise.
+	* modules/unistr/u8-move-tests: Likewise.
+	* modules/unistr/u8-next-tests: Likewise.
+	* modules/unistr/u8-prev-tests: Likewise.
+	* modules/unistr/u8-set-tests: Likewise.
+	* modules/unistr/u8-stpcpy-tests: Likewise.
+	* modules/unistr/u8-stpncpy-tests: Likewise.
+	* modules/unistr/u8-strcat-tests: Likewise.
+	* modules/unistr/u8-strcmp-tests: Likewise.
+	* modules/unistr/u8-strcoll-tests: Likewise.
+	* modules/unistr/u8-strcpy-tests: Likewise.
+	* modules/unistr/u8-strdup-tests: Likewise.
+	* modules/unistr/u8-strlen-tests: Likewise.
+	* modules/unistr/u8-strmblen-tests: Likewise.
+	* modules/unistr/u8-strmbtouc-tests: Likewise.
+	* modules/unistr/u8-strncat-tests: Likewise.
+	* modules/unistr/u8-strncmp-tests: Likewise.
+	* modules/unistr/u8-strncpy-tests: Likewise.
+	* modules/unistr/u8-strnlen-tests: Likewise.
+	* modules/unistr/u8-to-u16-tests: Likewise.
+	* modules/unistr/u8-to-u32-tests: Likewise.
+	* modules/unistr/u8-uctomb-tests: Likewise.
+	* modules/unistr/u16-check-tests: Likewise.
+	* modules/unistr/u16-chr-tests: Likewise.
+	* modules/unistr/u16-cmp-tests: Likewise.
+	* modules/unistr/u16-cmp2-tests: Likewise.
+	* modules/unistr/u16-cpy-alloc-tests: Likewise.
+	* modules/unistr/u16-cpy-tests: Likewise.
+	* modules/unistr/u16-mblen-tests: Likewise.
+	* modules/unistr/u16-mbsnlen-tests: Likewise.
+	* modules/unistr/u16-mbtouc-tests: Likewise.
+	* modules/unistr/u16-mbtouc-unsafe-tests: Likewise.
+	* modules/unistr/u16-mbtoucr-tests: Likewise.
+	* modules/unistr/u16-move-tests: Likewise.
+	* modules/unistr/u16-next-tests: Likewise.
+	* modules/unistr/u16-prev-tests: Likewise.
+	* modules/unistr/u16-set-tests: Likewise.
+	* modules/unistr/u16-stpcpy-tests: Likewise.
+	* modules/unistr/u16-stpncpy-tests: Likewise.
+	* modules/unistr/u16-strcat-tests: Likewise.
+	* modules/unistr/u16-strcmp-tests: Likewise.
+	* modules/unistr/u16-strcoll-tests: Likewise.
+	* modules/unistr/u16-strcpy-tests: Likewise.
+	* modules/unistr/u16-strdup-tests: Likewise.
+	* modules/unistr/u16-strlen-tests: Likewise.
+	* modules/unistr/u16-strmblen-tests: Likewise.
+	* modules/unistr/u16-strmbtouc-tests: Likewise.
+	* modules/unistr/u16-strncat-tests: Likewise.
+	* modules/unistr/u16-strncmp-tests: Likewise.
+	* modules/unistr/u16-strncpy-tests: Likewise.
+	* modules/unistr/u16-strnlen-tests: Likewise.
+	* modules/unistr/u16-to-u32-tests: Likewise.
+	* modules/unistr/u16-to-u8-tests: Likewise.
+	* modules/unistr/u16-uctomb-tests: Likewise.
+	* modules/unistr/u32-check-tests: Likewise.
+	* modules/unistr/u32-chr-tests: Likewise.
+	* modules/unistr/u32-cmp-tests: Likewise.
+	* modules/unistr/u32-cmp2-tests: Likewise.
+	* modules/unistr/u32-cpy-alloc-tests: Likewise.
+	* modules/unistr/u32-cpy-tests: Likewise.
+	* modules/unistr/u32-mblen-tests: Likewise.
+	* modules/unistr/u32-mbsnlen-tests: Likewise.
+	* modules/unistr/u32-mbtouc-tests: Likewise.
+	* modules/unistr/u32-mbtouc-unsafe-tests: Likewise.
+	* modules/unistr/u32-mbtoucr-tests: Likewise.
+	* modules/unistr/u32-move-tests: Likewise.
+	* modules/unistr/u32-next-tests: Likewise.
+	* modules/unistr/u32-prev-tests: Likewise.
+	* modules/unistr/u32-set-tests: Likewise.
+	* modules/unistr/u32-stpcpy-tests: Likewise.
+	* modules/unistr/u32-stpncpy-tests: Likewise.
+	* modules/unistr/u32-strcat-tests: Likewise.
+	* modules/unistr/u32-strcmp-tests: Likewise.
+	* modules/unistr/u32-strcoll-tests: Likewise.
+	* modules/unistr/u32-strcpy-tests: Likewise.
+	* modules/unistr/u32-strdup-tests: Likewise.
+	* modules/unistr/u32-strlen-tests: Likewise.
+	* modules/unistr/u32-strmblen-tests: Likewise.
+	* modules/unistr/u32-strmbtouc-tests: Likewise.
+	* modules/unistr/u32-strncat-tests: Likewise.
+	* modules/unistr/u32-strncmp-tests: Likewise.
+	* modules/unistr/u32-strncpy-tests: Likewise.
+	* modules/unistr/u32-strnlen-tests: Likewise.
+	* modules/unistr/u32-to-u16-tests: Likewise.
+	* modules/unistr/u32-to-u8-tests: Likewise.
+	* modules/unistr/u32-uctomb-tests: Likewise.
+	* modules/uniwbrk/u8-wordbreaks-tests: Likewise.
+	* modules/uniwbrk/u16-wordbreaks-tests: Likewise.
+	* modules/uniwbrk/u32-wordbreaks-tests: Likewise.
+	* modules/uniwbrk/ulc-wordbreaks-tests: Likewise.
+	* modules/uniwidth/u8-strwidth-tests: Likewise.
+	* modules/uniwidth/u8-width-tests: Likewise.
+	* modules/uniwidth/u16-strwidth-tests: Likewise.
+	* modules/uniwidth/u16-width-tests: Likewise.
+	* modules/uniwidth/u32-strwidth-tests: Likewise.
+	* modules/uniwidth/u32-width-tests: Likewise.
+	* modules/uniwidth/width-tests: Likewise.
+
 2010-05-18  Richard Jones  <rjones@redhat.com>
 
 	doc: users.txt: list hivex
deleted file mode 100644
--- a/lib/unicase.h
+++ /dev/null
@@ -1,457 +0,0 @@
-/* Unicode character case mappings.
-   Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNICASE_H
-#define _UNICASE_H
-
-#include "unitypes.h"
-
-/* Get bool.  */
-#include <stdbool.h>
-
-/* Get size_t.  */
-#include <stddef.h>
-
-/* Get uninorm_t.  */
-#include "uninorm.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ========================================================================= */
-
-/* Character case mappings.
-   These mappings are locale and context independent.
-   WARNING! These functions are not sufficient for languages such as German.
-   Better use the functions below that treat an entire string at once and are
-   language aware.  */
-
-/* Return the uppercase mapping of a Unicode character.  */
-extern ucs4_t
-       uc_toupper (ucs4_t uc);
-
-/* Return the lowercase mapping of a Unicode character.  */
-extern ucs4_t
-       uc_tolower (ucs4_t uc);
-
-/* Return the titlecase mapping of a Unicode character.  */
-extern ucs4_t
-       uc_totitle (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* String case mappings.  */
-
-/* These functions are locale dependent.  The iso639_language argument
-   identifies the language (e.g. "tr" for Turkish).  NULL means to use
-   locale independent case mappings.  */
-
-/* Return the ISO 639 language code of the current locale.
-   Return "" if it is unknown, or in the "C" locale.  */
-extern const char *
-       uc_locale_language (void);
-
-/* Conventions:
-
-   All functions prefixed with u8_ operate on UTF-8 encoded strings.
-   Their unit is an uint8_t (1 byte).
-
-   All functions prefixed with u16_ operate on UTF-16 encoded strings.
-   Their unit is an uint16_t (a 2-byte word).
-
-   All functions prefixed with u32_ operate on UCS-4 encoded strings.
-   Their unit is an uint32_t (a 4-byte word).
-
-   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
-   n units.
-
-   Functions returning a string result take a (resultbuf, lengthp) argument
-   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
-   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
-   allocated string is returned.  In both cases, *lengthp is set to the
-   length (number of units) of the returned string.  In case of error,
-   NULL is returned and errno is set.  */
-
-/* Return the uppercase mapping of a string.
-   The nf argument identifies the normalization form to apply after the
-   case-mapping.  It can also be NULL, for no normalization.  */
-extern uint8_t *
-       u8_toupper (const uint8_t *s, size_t n, const char *iso639_language,
-                   uninorm_t nf,
-                   uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_toupper (const uint16_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_toupper (const uint32_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint32_t *resultbuf, size_t *lengthp);
-
-/* Return the lowercase mapping of a string.
-   The nf argument identifies the normalization form to apply after the
-   case-mapping.  It can also be NULL, for no normalization.  */
-extern uint8_t *
-       u8_tolower (const uint8_t *s, size_t n, const char *iso639_language,
-                   uninorm_t nf,
-                   uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_tolower (const uint16_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_tolower (const uint32_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint32_t *resultbuf, size_t *lengthp);
-
-/* Return the titlecase mapping of a string.
-   The nf argument identifies the normalization form to apply after the
-   case-mapping.  It can also be NULL, for no normalization.  */
-extern uint8_t *
-       u8_totitle (const uint8_t *s, size_t n, const char *iso639_language,
-                   uninorm_t nf,
-                   uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_totitle (const uint16_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_totitle (const uint32_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint32_t *resultbuf, size_t *lengthp);
-
-/* The case-mapping context given by a prefix string.  */
-typedef struct casing_prefix_context
-        {
-          /* These fields are private, undocumented.  */
-          uint32_t last_char_except_ignorable;
-          uint32_t last_char_normal_or_above;
-        }
-        casing_prefix_context_t;
-/* The case-mapping context of the empty prefix string.  */
-extern const casing_prefix_context_t unicase_empty_prefix_context;
-/* Return the case-mapping context of a given prefix string.  */
-extern casing_prefix_context_t
-       u8_casing_prefix_context (const uint8_t *s, size_t n);
-extern casing_prefix_context_t
-       u16_casing_prefix_context (const uint16_t *s, size_t n);
-extern casing_prefix_context_t
-       u32_casing_prefix_context (const uint32_t *s, size_t n);
-/* Return the case-mapping context of the prefix concat(A, S), given the
-   case-mapping context of the prefix A.  */
-extern casing_prefix_context_t
-       u8_casing_prefixes_context (const uint8_t *s, size_t n,
-                                   casing_prefix_context_t a_context);
-extern casing_prefix_context_t
-       u16_casing_prefixes_context (const uint16_t *s, size_t n,
-                                    casing_prefix_context_t a_context);
-extern casing_prefix_context_t
-       u32_casing_prefixes_context (const uint32_t *s, size_t n,
-                                    casing_prefix_context_t a_context);
-
-/* The case-mapping context given by a suffix string.  */
-typedef struct casing_suffix_context
-        {
-          /* These fields are private, undocumented.  */
-          uint32_t first_char_except_ignorable;
-          uint32_t bits;
-        }
-        casing_suffix_context_t;
-/* The case-mapping context of the empty suffix string.  */
-extern const casing_suffix_context_t unicase_empty_suffix_context;
-/* Return the case-mapping context of a given suffix string.  */
-extern casing_suffix_context_t
-       u8_casing_suffix_context (const uint8_t *s, size_t n);
-extern casing_suffix_context_t
-       u16_casing_suffix_context (const uint16_t *s, size_t n);
-extern casing_suffix_context_t
-       u32_casing_suffix_context (const uint32_t *s, size_t n);
-/* Return the case-mapping context of the suffix concat(S, A), given the
-   case-mapping context of the suffix A.  */
-extern casing_suffix_context_t
-       u8_casing_suffixes_context (const uint8_t *s, size_t n,
-                                   casing_suffix_context_t a_context);
-extern casing_suffix_context_t
-       u16_casing_suffixes_context (const uint16_t *s, size_t n,
-                                    casing_suffix_context_t a_context);
-extern casing_suffix_context_t
-       u32_casing_suffixes_context (const uint32_t *s, size_t n,
-                                    casing_suffix_context_t a_context);
-
-/* Return the uppercase mapping of a string that is surrounded by a prefix
-   and a suffix.  */
-extern uint8_t *
-       u8_ct_toupper (const uint8_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_ct_toupper (const uint16_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_ct_toupper (const uint32_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint32_t *resultbuf, size_t *lengthp);
-
-/* Return the lowercase mapping of a string that is surrounded by a prefix
-   and a suffix.  */
-extern uint8_t *
-       u8_ct_tolower (const uint8_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_ct_tolower (const uint16_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_ct_tolower (const uint32_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint32_t *resultbuf, size_t *lengthp);
-
-/* Return the titlecase mapping of a string that is surrounded by a prefix
-   and a suffix.  */
-extern uint8_t *
-       u8_ct_totitle (const uint8_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_ct_totitle (const uint16_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_ct_totitle (const uint32_t *s, size_t n,
-                      casing_prefix_context_t prefix_context,
-                      casing_suffix_context_t suffix_context,
-                      const char *iso639_language,
-                      uninorm_t nf,
-                      uint32_t *resultbuf, size_t *lengthp);
-
-/* Return the case folded string.
-   Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent
-   to comparing S1 and S2 with uN_casecmp().
-   The nf argument identifies the normalization form to apply after the
-   case-mapping.  It can also be NULL, for no normalization.  */
-extern uint8_t *
-       u8_casefold (const uint8_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf,
-                    uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_casefold (const uint16_t *s, size_t n, const char *iso639_language,
-                     uninorm_t nf,
-                     uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_casefold (const uint32_t *s, size_t n, const char *iso639_language,
-                     uninorm_t nf,
-                     uint32_t *resultbuf, size_t *lengthp);
-/* Likewise, for a string that is surrounded by a prefix and a suffix.  */
-extern uint8_t *
-       u8_ct_casefold (const uint8_t *s, size_t n,
-                       casing_prefix_context_t prefix_context,
-                       casing_suffix_context_t suffix_context,
-                       const char *iso639_language,
-                       uninorm_t nf,
-                       uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_ct_casefold (const uint16_t *s, size_t n,
-                        casing_prefix_context_t prefix_context,
-                        casing_suffix_context_t suffix_context,
-                        const char *iso639_language,
-                        uninorm_t nf,
-                        uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_ct_casefold (const uint32_t *s, size_t n,
-                        casing_prefix_context_t prefix_context,
-                        casing_suffix_context_t suffix_context,
-                        const char *iso639_language,
-                        uninorm_t nf,
-                        uint32_t *resultbuf, size_t *lengthp);
-
-/* Compare S1 and S2, ignoring differences in case and normalization.
-   The nf argument identifies the normalization form to apply after the
-   case-mapping.  It can also be NULL, for no normalization.
-   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
-   return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_casecmp (const uint8_t *s1, size_t n1,
-                   const uint8_t *s2, size_t n2,
-                   const char *iso639_language, uninorm_t nf, int *resultp);
-extern int
-       u16_casecmp (const uint16_t *s1, size_t n1,
-                    const uint16_t *s2, size_t n2,
-                    const char *iso639_language, uninorm_t nf, int *resultp);
-extern int
-       u32_casecmp (const uint32_t *s1, size_t n1,
-                    const uint32_t *s2, size_t n2,
-                    const char *iso639_language, uninorm_t nf, int *resultp);
-extern int
-       ulc_casecmp (const char *s1, size_t n1,
-                    const char *s2, size_t n2,
-                    const char *iso639_language, uninorm_t nf, int *resultp);
-
-/* Convert the string S of length N to a NUL-terminated byte sequence, in such
-   a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib
-   function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll().
-   NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization.  */
-extern char *
-       u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language,
-                    uninorm_t nf, char *resultbuf, size_t *lengthp);
-extern char *
-       u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language,
-                     uninorm_t nf, char *resultbuf, size_t *lengthp);
-extern char *
-       u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language,
-                     uninorm_t nf, char *resultbuf, size_t *lengthp);
-extern char *
-       ulc_casexfrm (const char *s, size_t n, const char *iso639_language,
-                     uninorm_t nf, char *resultbuf, size_t *lengthp);
-
-/* Compare S1 and S2, ignoring differences in case and normalization, using the
-   collation rules of the current locale.
-   The nf argument identifies the normalization form to apply after the
-   case-mapping.  It must be either UNINORM_NFC or UNINORM_NFKC.  It can also
-   be NULL, for no normalization.
-   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
-   return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_casecoll (const uint8_t *s1, size_t n1,
-                    const uint8_t *s2, size_t n2,
-                    const char *iso639_language, uninorm_t nf, int *resultp);
-extern int
-       u16_casecoll (const uint16_t *s1, size_t n1,
-                     const uint16_t *s2, size_t n2,
-                     const char *iso639_language, uninorm_t nf, int *resultp);
-extern int
-       u32_casecoll (const uint32_t *s1, size_t n1,
-                     const uint32_t *s2, size_t n2,
-                     const char *iso639_language, uninorm_t nf, int *resultp);
-extern int
-       ulc_casecoll (const char *s1, size_t n1,
-                     const char *s2, size_t n2,
-                     const char *iso639_language, uninorm_t nf, int *resultp);
-
-
-/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false
-   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_is_uppercase (const uint8_t *s, size_t n,
-                        const char *iso639_language,
-                        bool *resultp);
-extern int
-       u16_is_uppercase (const uint16_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-extern int
-       u32_is_uppercase (const uint32_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-
-/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false
-   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_is_lowercase (const uint8_t *s, size_t n,
-                        const char *iso639_language,
-                        bool *resultp);
-extern int
-       u16_is_lowercase (const uint16_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-extern int
-       u32_is_lowercase (const uint32_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-
-/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false
-   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_is_titlecase (const uint8_t *s, size_t n,
-                        const char *iso639_language,
-                        bool *resultp);
-extern int
-       u16_is_titlecase (const uint16_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-extern int
-       u32_is_titlecase (const uint32_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-
-/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to
-   false otherwise, and return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_is_casefolded (const uint8_t *s, size_t n,
-                         const char *iso639_language,
-                         bool *resultp);
-extern int
-       u16_is_casefolded (const uint16_t *s, size_t n,
-                          const char *iso639_language,
-                          bool *resultp);
-extern int
-       u32_is_casefolded (const uint32_t *s, size_t n,
-                          const char *iso639_language,
-                          bool *resultp);
-
-/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to
-   either upper case or lower case or title case is not a no-op.
-   Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping,
-   under the lower case mapping, and under the title case mapping; in other
-   words, when NFD(S) consists entirely of caseless characters.
-   Upon failure, return -1 with errno set.  */
-extern int
-       u8_is_cased (const uint8_t *s, size_t n,
-                    const char *iso639_language,
-                    bool *resultp);
-extern int
-       u16_is_cased (const uint16_t *s, size_t n,
-                     const char *iso639_language,
-                     bool *resultp);
-extern int
-       u32_is_cased (const uint32_t *s, size_t n,
-                     const char *iso639_language,
-                     bool *resultp);
-
-
-/* ========================================================================= */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNICASE_H */
new file mode 100644
--- /dev/null
+++ b/lib/unicase.in.h
@@ -0,0 +1,457 @@
+/* Unicode character case mappings.
+   Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNICASE_H
+#define _UNICASE_H
+
+#include "unitypes.h"
+
+/* Get bool.  */
+#include <stdbool.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get uninorm_t.  */
+#include "uninorm.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ========================================================================= */
+
+/* Character case mappings.
+   These mappings are locale and context independent.
+   WARNING! These functions are not sufficient for languages such as German.
+   Better use the functions below that treat an entire string at once and are
+   language aware.  */
+
+/* Return the uppercase mapping of a Unicode character.  */
+extern ucs4_t
+       uc_toupper (ucs4_t uc);
+
+/* Return the lowercase mapping of a Unicode character.  */
+extern ucs4_t
+       uc_tolower (ucs4_t uc);
+
+/* Return the titlecase mapping of a Unicode character.  */
+extern ucs4_t
+       uc_totitle (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* String case mappings.  */
+
+/* These functions are locale dependent.  The iso639_language argument
+   identifies the language (e.g. "tr" for Turkish).  NULL means to use
+   locale independent case mappings.  */
+
+/* Return the ISO 639 language code of the current locale.
+   Return "" if it is unknown, or in the "C" locale.  */
+extern const char *
+       uc_locale_language (void);
+
+/* Conventions:
+
+   All functions prefixed with u8_ operate on UTF-8 encoded strings.
+   Their unit is an uint8_t (1 byte).
+
+   All functions prefixed with u16_ operate on UTF-16 encoded strings.
+   Their unit is an uint16_t (a 2-byte word).
+
+   All functions prefixed with u32_ operate on UCS-4 encoded strings.
+   Their unit is an uint32_t (a 4-byte word).
+
+   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
+   n units.
+
+   Functions returning a string result take a (resultbuf, lengthp) argument
+   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
+   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
+   allocated string is returned.  In both cases, *lengthp is set to the
+   length (number of units) of the returned string.  In case of error,
+   NULL is returned and errno is set.  */
+
+/* Return the uppercase mapping of a string.
+   The nf argument identifies the normalization form to apply after the
+   case-mapping.  It can also be NULL, for no normalization.  */
+extern uint8_t *
+       u8_toupper (const uint8_t *s, size_t n, const char *iso639_language,
+                   uninorm_t nf,
+                   uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_toupper (const uint16_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_toupper (const uint32_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint32_t *resultbuf, size_t *lengthp);
+
+/* Return the lowercase mapping of a string.
+   The nf argument identifies the normalization form to apply after the
+   case-mapping.  It can also be NULL, for no normalization.  */
+extern uint8_t *
+       u8_tolower (const uint8_t *s, size_t n, const char *iso639_language,
+                   uninorm_t nf,
+                   uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_tolower (const uint16_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_tolower (const uint32_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint32_t *resultbuf, size_t *lengthp);
+
+/* Return the titlecase mapping of a string.
+   The nf argument identifies the normalization form to apply after the
+   case-mapping.  It can also be NULL, for no normalization.  */
+extern uint8_t *
+       u8_totitle (const uint8_t *s, size_t n, const char *iso639_language,
+                   uninorm_t nf,
+                   uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_totitle (const uint16_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_totitle (const uint32_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint32_t *resultbuf, size_t *lengthp);
+
+/* The case-mapping context given by a prefix string.  */
+typedef struct casing_prefix_context
+        {
+          /* These fields are private, undocumented.  */
+          uint32_t last_char_except_ignorable;
+          uint32_t last_char_normal_or_above;
+        }
+        casing_prefix_context_t;
+/* The case-mapping context of the empty prefix string.  */
+extern const casing_prefix_context_t unicase_empty_prefix_context;
+/* Return the case-mapping context of a given prefix string.  */
+extern casing_prefix_context_t
+       u8_casing_prefix_context (const uint8_t *s, size_t n);
+extern casing_prefix_context_t
+       u16_casing_prefix_context (const uint16_t *s, size_t n);
+extern casing_prefix_context_t
+       u32_casing_prefix_context (const uint32_t *s, size_t n);
+/* Return the case-mapping context of the prefix concat(A, S), given the
+   case-mapping context of the prefix A.  */
+extern casing_prefix_context_t
+       u8_casing_prefixes_context (const uint8_t *s, size_t n,
+                                   casing_prefix_context_t a_context);
+extern casing_prefix_context_t
+       u16_casing_prefixes_context (const uint16_t *s, size_t n,
+                                    casing_prefix_context_t a_context);
+extern casing_prefix_context_t
+       u32_casing_prefixes_context (const uint32_t *s, size_t n,
+                                    casing_prefix_context_t a_context);
+
+/* The case-mapping context given by a suffix string.  */
+typedef struct casing_suffix_context
+        {
+          /* These fields are private, undocumented.  */
+          uint32_t first_char_except_ignorable;
+          uint32_t bits;
+        }
+        casing_suffix_context_t;
+/* The case-mapping context of the empty suffix string.  */
+extern const casing_suffix_context_t unicase_empty_suffix_context;
+/* Return the case-mapping context of a given suffix string.  */
+extern casing_suffix_context_t
+       u8_casing_suffix_context (const uint8_t *s, size_t n);
+extern casing_suffix_context_t
+       u16_casing_suffix_context (const uint16_t *s, size_t n);
+extern casing_suffix_context_t
+       u32_casing_suffix_context (const uint32_t *s, size_t n);
+/* Return the case-mapping context of the suffix concat(S, A), given the
+   case-mapping context of the suffix A.  */
+extern casing_suffix_context_t
+       u8_casing_suffixes_context (const uint8_t *s, size_t n,
+                                   casing_suffix_context_t a_context);
+extern casing_suffix_context_t
+       u16_casing_suffixes_context (const uint16_t *s, size_t n,
+                                    casing_suffix_context_t a_context);
+extern casing_suffix_context_t
+       u32_casing_suffixes_context (const uint32_t *s, size_t n,
+                                    casing_suffix_context_t a_context);
+
+/* Return the uppercase mapping of a string that is surrounded by a prefix
+   and a suffix.  */
+extern uint8_t *
+       u8_ct_toupper (const uint8_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_ct_toupper (const uint16_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_ct_toupper (const uint32_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint32_t *resultbuf, size_t *lengthp);
+
+/* Return the lowercase mapping of a string that is surrounded by a prefix
+   and a suffix.  */
+extern uint8_t *
+       u8_ct_tolower (const uint8_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_ct_tolower (const uint16_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_ct_tolower (const uint32_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint32_t *resultbuf, size_t *lengthp);
+
+/* Return the titlecase mapping of a string that is surrounded by a prefix
+   and a suffix.  */
+extern uint8_t *
+       u8_ct_totitle (const uint8_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_ct_totitle (const uint16_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_ct_totitle (const uint32_t *s, size_t n,
+                      casing_prefix_context_t prefix_context,
+                      casing_suffix_context_t suffix_context,
+                      const char *iso639_language,
+                      uninorm_t nf,
+                      uint32_t *resultbuf, size_t *lengthp);
+
+/* Return the case folded string.
+   Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent
+   to comparing S1 and S2 with uN_casecmp().
+   The nf argument identifies the normalization form to apply after the
+   case-mapping.  It can also be NULL, for no normalization.  */
+extern uint8_t *
+       u8_casefold (const uint8_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf,
+                    uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_casefold (const uint16_t *s, size_t n, const char *iso639_language,
+                     uninorm_t nf,
+                     uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_casefold (const uint32_t *s, size_t n, const char *iso639_language,
+                     uninorm_t nf,
+                     uint32_t *resultbuf, size_t *lengthp);
+/* Likewise, for a string that is surrounded by a prefix and a suffix.  */
+extern uint8_t *
+       u8_ct_casefold (const uint8_t *s, size_t n,
+                       casing_prefix_context_t prefix_context,
+                       casing_suffix_context_t suffix_context,
+                       const char *iso639_language,
+                       uninorm_t nf,
+                       uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_ct_casefold (const uint16_t *s, size_t n,
+                        casing_prefix_context_t prefix_context,
+                        casing_suffix_context_t suffix_context,
+                        const char *iso639_language,
+                        uninorm_t nf,
+                        uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_ct_casefold (const uint32_t *s, size_t n,
+                        casing_prefix_context_t prefix_context,
+                        casing_suffix_context_t suffix_context,
+                        const char *iso639_language,
+                        uninorm_t nf,
+                        uint32_t *resultbuf, size_t *lengthp);
+
+/* Compare S1 and S2, ignoring differences in case and normalization.
+   The nf argument identifies the normalization form to apply after the
+   case-mapping.  It can also be NULL, for no normalization.
+   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
+   return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_casecmp (const uint8_t *s1, size_t n1,
+                   const uint8_t *s2, size_t n2,
+                   const char *iso639_language, uninorm_t nf, int *resultp);
+extern int
+       u16_casecmp (const uint16_t *s1, size_t n1,
+                    const uint16_t *s2, size_t n2,
+                    const char *iso639_language, uninorm_t nf, int *resultp);
+extern int
+       u32_casecmp (const uint32_t *s1, size_t n1,
+                    const uint32_t *s2, size_t n2,
+                    const char *iso639_language, uninorm_t nf, int *resultp);
+extern int
+       ulc_casecmp (const char *s1, size_t n1,
+                    const char *s2, size_t n2,
+                    const char *iso639_language, uninorm_t nf, int *resultp);
+
+/* Convert the string S of length N to a NUL-terminated byte sequence, in such
+   a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib
+   function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll().
+   NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization.  */
+extern char *
+       u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language,
+                    uninorm_t nf, char *resultbuf, size_t *lengthp);
+extern char *
+       u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language,
+                     uninorm_t nf, char *resultbuf, size_t *lengthp);
+extern char *
+       u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language,
+                     uninorm_t nf, char *resultbuf, size_t *lengthp);
+extern char *
+       ulc_casexfrm (const char *s, size_t n, const char *iso639_language,
+                     uninorm_t nf, char *resultbuf, size_t *lengthp);
+
+/* Compare S1 and S2, ignoring differences in case and normalization, using the
+   collation rules of the current locale.
+   The nf argument identifies the normalization form to apply after the
+   case-mapping.  It must be either UNINORM_NFC or UNINORM_NFKC.  It can also
+   be NULL, for no normalization.
+   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
+   return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_casecoll (const uint8_t *s1, size_t n1,
+                    const uint8_t *s2, size_t n2,
+                    const char *iso639_language, uninorm_t nf, int *resultp);
+extern int
+       u16_casecoll (const uint16_t *s1, size_t n1,
+                     const uint16_t *s2, size_t n2,
+                     const char *iso639_language, uninorm_t nf, int *resultp);
+extern int
+       u32_casecoll (const uint32_t *s1, size_t n1,
+                     const uint32_t *s2, size_t n2,
+                     const char *iso639_language, uninorm_t nf, int *resultp);
+extern int
+       ulc_casecoll (const char *s1, size_t n1,
+                     const char *s2, size_t n2,
+                     const char *iso639_language, uninorm_t nf, int *resultp);
+
+
+/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false
+   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_is_uppercase (const uint8_t *s, size_t n,
+                        const char *iso639_language,
+                        bool *resultp);
+extern int
+       u16_is_uppercase (const uint16_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+extern int
+       u32_is_uppercase (const uint32_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+
+/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false
+   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_is_lowercase (const uint8_t *s, size_t n,
+                        const char *iso639_language,
+                        bool *resultp);
+extern int
+       u16_is_lowercase (const uint16_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+extern int
+       u32_is_lowercase (const uint32_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+
+/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false
+   otherwise, and return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_is_titlecase (const uint8_t *s, size_t n,
+                        const char *iso639_language,
+                        bool *resultp);
+extern int
+       u16_is_titlecase (const uint16_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+extern int
+       u32_is_titlecase (const uint32_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+
+/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to
+   false otherwise, and return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_is_casefolded (const uint8_t *s, size_t n,
+                         const char *iso639_language,
+                         bool *resultp);
+extern int
+       u16_is_casefolded (const uint16_t *s, size_t n,
+                          const char *iso639_language,
+                          bool *resultp);
+extern int
+       u32_is_casefolded (const uint32_t *s, size_t n,
+                          const char *iso639_language,
+                          bool *resultp);
+
+/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to
+   either upper case or lower case or title case is not a no-op.
+   Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping,
+   under the lower case mapping, and under the title case mapping; in other
+   words, when NFD(S) consists entirely of caseless characters.
+   Upon failure, return -1 with errno set.  */
+extern int
+       u8_is_cased (const uint8_t *s, size_t n,
+                    const char *iso639_language,
+                    bool *resultp);
+extern int
+       u16_is_cased (const uint16_t *s, size_t n,
+                     const char *iso639_language,
+                     bool *resultp);
+extern int
+       u32_is_cased (const uint32_t *s, size_t n,
+                     const char *iso639_language,
+                     bool *resultp);
+
+
+/* ========================================================================= */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNICASE_H */
deleted file mode 100644
--- a/lib/uniconv.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* Conversions between Unicode and legacy encodings.
-   Copyright (C) 2002, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNICONV_H
-#define _UNICONV_H
-
-/* Get size_t.  */
-#include <stddef.h>
-
-#include "unitypes.h"
-
-/* Get enum iconv_ilseq_handler.  */
-#include "iconveh.h"
-
-/* Get uniconv_register_autodetect() declaration.  */
-#include "striconveha.h"
-
-/* Get locale_charset() declaration.  */
-#include "localcharset.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Converts an entire string, possibly including NUL bytes, from one encoding
-   to a Unicode encoding.
-   Converts a memory region given in encoding FROMCODE.  FROMCODE is as for
-   iconv_open(3).
-   The input is in the memory region between SRC (inclusive) and SRC + SRCLEN
-   (exclusive).
-   If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this
-   array is filled with offsets into the result, i.e. the character starting
-   at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]],
-   and other offsets are set to (size_t)(-1).
-   RESULTBUF and *LENGTHP should initially be a scratch buffer and its size,
-   or *RESULTBUF can be NULL.
-   May erase the contents of the memory at RESULTBUF.
-   If successful: The resulting Unicode string (non-NULL) is returned and its
-   length stored in *LENGTHP.  The resulting string is RESULTBUF if no dynamic
-   memory allocation was necessary, or a freshly allocated memory block
-   otherwise.
-   In case of error: NULL is returned and errno is set.  Particular errno
-   values: EINVAL, EILSEQ, ENOMEM.  */
-extern uint8_t *
-       u8_conv_from_encoding (const char *fromcode,
-                              enum iconv_ilseq_handler handler,
-                              const char *src, size_t srclen,
-                              size_t *offsets,
-                              uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_conv_from_encoding (const char *fromcode,
-                               enum iconv_ilseq_handler handler,
-                               const char *src, size_t srclen,
-                               size_t *offsets,
-                               uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_conv_from_encoding (const char *fromcode,
-                               enum iconv_ilseq_handler handler,
-                               const char *src, size_t srclen,
-                               size_t *offsets,
-                               uint32_t *resultbuf, size_t *lengthp);
-
-/* Converts an entire Unicode string, possibly including NUL units, from a
-   Unicode encoding to a given encoding.
-   Converts a memory region to encoding TOCODE.  TOCODE is as for
-   iconv_open(3).
-   The input is in the memory region between SRC (inclusive) and SRC + SRCLEN
-   (exclusive).
-   If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this
-   array is filled with offsets into the result, i.e. the character starting
-   at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]],
-   and other offsets are set to (size_t)(-1).
-   RESULTBUF and *LENGTHP should initially be a scratch buffer and its size,
-   or RESULTBUF can be NULL.
-   May erase the contents of the memory at RESULTBUF.
-   If successful: The resulting string (non-NULL) is returned and its length
-   stored in *LENGTHP.  The resulting string is RESULTBUF if no dynamic memory
-   allocation was necessary, or a freshly allocated memory block otherwise.
-   In case of error: NULL is returned and errno is set.  Particular errno
-   values: EINVAL, EILSEQ, ENOMEM.  */
-extern char *
-       u8_conv_to_encoding (const char *tocode,
-                            enum iconv_ilseq_handler handler,
-                            const uint8_t *src, size_t srclen,
-                            size_t *offsets,
-                            char *resultbuf, size_t *lengthp);
-extern char *
-       u16_conv_to_encoding (const char *tocode,
-                             enum iconv_ilseq_handler handler,
-                             const uint16_t *src, size_t srclen,
-                             size_t *offsets,
-                             char *resultbuf, size_t *lengthp);
-extern char *
-       u32_conv_to_encoding (const char *tocode,
-                             enum iconv_ilseq_handler handler,
-                             const uint32_t *src, size_t srclen,
-                             size_t *offsets,
-                             char *resultbuf, size_t *lengthp);
-
-/* Converts a NUL terminated string from a given encoding.
-   The result is malloc allocated, or NULL (with errno set) in case of error.
-   Particular errno values: EILSEQ, ENOMEM.  */
-extern uint8_t *
-       u8_strconv_from_encoding (const char *string,
-                                 const char *fromcode,
-                                 enum iconv_ilseq_handler handler);
-extern uint16_t *
-       u16_strconv_from_encoding (const char *string,
-                                  const char *fromcode,
-                                  enum iconv_ilseq_handler handler);
-extern uint32_t *
-       u32_strconv_from_encoding (const char *string,
-                                  const char *fromcode,
-                                  enum iconv_ilseq_handler handler);
-
-/* Converts a NUL terminated string to a given encoding.
-   The result is malloc allocated, or NULL (with errno set) in case of error.
-   Particular errno values: EILSEQ, ENOMEM.  */
-extern char *
-       u8_strconv_to_encoding (const uint8_t *string,
-                               const char *tocode,
-                               enum iconv_ilseq_handler handler);
-extern char *
-       u16_strconv_to_encoding (const uint16_t *string,
-                                const char *tocode,
-                                enum iconv_ilseq_handler handler);
-extern char *
-       u32_strconv_to_encoding (const uint32_t *string,
-                                const char *tocode,
-                                enum iconv_ilseq_handler handler);
-
-/* Converts a NUL terminated string from the locale encoding.
-   The result is malloc allocated, or NULL (with errno set) in case of error.
-   Particular errno values: ENOMEM.  */
-extern uint8_t *
-       u8_strconv_from_locale (const char *string);
-extern uint16_t *
-       u16_strconv_from_locale (const char *string);
-extern uint32_t *
-       u32_strconv_from_locale (const char *string);
-
-/* Converts a NUL terminated string to the locale encoding.
-   The result is malloc allocated, or NULL (with errno set) in case of error.
-   Particular errno values: ENOMEM.  */
-extern char *
-       u8_strconv_to_locale (const uint8_t *string);
-extern char *
-       u16_strconv_to_locale (const uint16_t *string);
-extern char *
-       u32_strconv_to_locale (const uint32_t *string);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNICONV_H */
new file mode 100644
--- /dev/null
+++ b/lib/uniconv.in.h
@@ -0,0 +1,172 @@
+/* Conversions between Unicode and legacy encodings.
+   Copyright (C) 2002, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNICONV_H
+#define _UNICONV_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#include "unitypes.h"
+
+/* Get enum iconv_ilseq_handler.  */
+#include "iconveh.h"
+
+/* Get uniconv_register_autodetect() declaration.  */
+#include "striconveha.h"
+
+/* Get locale_charset() declaration.  */
+#include "localcharset.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Converts an entire string, possibly including NUL bytes, from one encoding
+   to a Unicode encoding.
+   Converts a memory region given in encoding FROMCODE.  FROMCODE is as for
+   iconv_open(3).
+   The input is in the memory region between SRC (inclusive) and SRC + SRCLEN
+   (exclusive).
+   If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this
+   array is filled with offsets into the result, i.e. the character starting
+   at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]],
+   and other offsets are set to (size_t)(-1).
+   RESULTBUF and *LENGTHP should initially be a scratch buffer and its size,
+   or *RESULTBUF can be NULL.
+   May erase the contents of the memory at RESULTBUF.
+   If successful: The resulting Unicode string (non-NULL) is returned and its
+   length stored in *LENGTHP.  The resulting string is RESULTBUF if no dynamic
+   memory allocation was necessary, or a freshly allocated memory block
+   otherwise.
+   In case of error: NULL is returned and errno is set.  Particular errno
+   values: EINVAL, EILSEQ, ENOMEM.  */
+extern uint8_t *
+       u8_conv_from_encoding (const char *fromcode,
+                              enum iconv_ilseq_handler handler,
+                              const char *src, size_t srclen,
+                              size_t *offsets,
+                              uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_conv_from_encoding (const char *fromcode,
+                               enum iconv_ilseq_handler handler,
+                               const char *src, size_t srclen,
+                               size_t *offsets,
+                               uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_conv_from_encoding (const char *fromcode,
+                               enum iconv_ilseq_handler handler,
+                               const char *src, size_t srclen,
+                               size_t *offsets,
+                               uint32_t *resultbuf, size_t *lengthp);
+
+/* Converts an entire Unicode string, possibly including NUL units, from a
+   Unicode encoding to a given encoding.
+   Converts a memory region to encoding TOCODE.  TOCODE is as for
+   iconv_open(3).
+   The input is in the memory region between SRC (inclusive) and SRC + SRCLEN
+   (exclusive).
+   If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this
+   array is filled with offsets into the result, i.e. the character starting
+   at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]],
+   and other offsets are set to (size_t)(-1).
+   RESULTBUF and *LENGTHP should initially be a scratch buffer and its size,
+   or RESULTBUF can be NULL.
+   May erase the contents of the memory at RESULTBUF.
+   If successful: The resulting string (non-NULL) is returned and its length
+   stored in *LENGTHP.  The resulting string is RESULTBUF if no dynamic memory
+   allocation was necessary, or a freshly allocated memory block otherwise.
+   In case of error: NULL is returned and errno is set.  Particular errno
+   values: EINVAL, EILSEQ, ENOMEM.  */
+extern char *
+       u8_conv_to_encoding (const char *tocode,
+                            enum iconv_ilseq_handler handler,
+                            const uint8_t *src, size_t srclen,
+                            size_t *offsets,
+                            char *resultbuf, size_t *lengthp);
+extern char *
+       u16_conv_to_encoding (const char *tocode,
+                             enum iconv_ilseq_handler handler,
+                             const uint16_t *src, size_t srclen,
+                             size_t *offsets,
+                             char *resultbuf, size_t *lengthp);
+extern char *
+       u32_conv_to_encoding (const char *tocode,
+                             enum iconv_ilseq_handler handler,
+                             const uint32_t *src, size_t srclen,
+                             size_t *offsets,
+                             char *resultbuf, size_t *lengthp);
+
+/* Converts a NUL terminated string from a given encoding.
+   The result is malloc allocated, or NULL (with errno set) in case of error.
+   Particular errno values: EILSEQ, ENOMEM.  */
+extern uint8_t *
+       u8_strconv_from_encoding (const char *string,
+                                 const char *fromcode,
+                                 enum iconv_ilseq_handler handler);
+extern uint16_t *
+       u16_strconv_from_encoding (const char *string,
+                                  const char *fromcode,
+                                  enum iconv_ilseq_handler handler);
+extern uint32_t *
+       u32_strconv_from_encoding (const char *string,
+                                  const char *fromcode,
+                                  enum iconv_ilseq_handler handler);
+
+/* Converts a NUL terminated string to a given encoding.
+   The result is malloc allocated, or NULL (with errno set) in case of error.
+   Particular errno values: EILSEQ, ENOMEM.  */
+extern char *
+       u8_strconv_to_encoding (const uint8_t *string,
+                               const char *tocode,
+                               enum iconv_ilseq_handler handler);
+extern char *
+       u16_strconv_to_encoding (const uint16_t *string,
+                                const char *tocode,
+                                enum iconv_ilseq_handler handler);
+extern char *
+       u32_strconv_to_encoding (const uint32_t *string,
+                                const char *tocode,
+                                enum iconv_ilseq_handler handler);
+
+/* Converts a NUL terminated string from the locale encoding.
+   The result is malloc allocated, or NULL (with errno set) in case of error.
+   Particular errno values: ENOMEM.  */
+extern uint8_t *
+       u8_strconv_from_locale (const char *string);
+extern uint16_t *
+       u16_strconv_from_locale (const char *string);
+extern uint32_t *
+       u32_strconv_from_locale (const char *string);
+
+/* Converts a NUL terminated string to the locale encoding.
+   The result is malloc allocated, or NULL (with errno set) in case of error.
+   Particular errno values: ENOMEM.  */
+extern char *
+       u8_strconv_to_locale (const uint8_t *string);
+extern char *
+       u16_strconv_to_locale (const uint16_t *string);
+extern char *
+       u32_strconv_to_locale (const uint32_t *string);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNICONV_H */
deleted file mode 100644
--- a/lib/unictype.h
+++ /dev/null
@@ -1,717 +0,0 @@
-/* Unicode character classification and properties.
-   Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNICTYPE_H
-#define _UNICTYPE_H
-
-#include "unitypes.h"
-
-/* Get bool.  */
-#include <stdbool.h>
-
-/* Get size_t.  */
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ========================================================================= */
-
-/* Field 1 of Unicode Character Database: Character name.
-   See "uniname.h".  */
-
-/* ========================================================================= */
-
-/* Field 2 of Unicode Character Database: General category.  */
-
-/* Data type denoting a General category value.  This is not just a bitmask,
-   but rather a bitmask and a pointer to the lookup table, so that programs
-   that use only the predefined bitmasks (i.e. don't combine bitmasks with &
-   and |) don't have a link-time dependency towards the big general table.  */
-typedef struct
-{
-  uint32_t bitmask : 31;
-  /*bool*/ unsigned int generic : 1;
-  union
-  {
-    const void *table;                               /* when generic is 0 */
-    bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */
-  } lookup;
-}
-uc_general_category_t;
-
-/* Bits and bit masks denoting General category values.  UnicodeData-3.2.0.html
-   says a 32-bit integer will always suffice to represent them.
-   These bit masks can only be used with the uc_is_general_category_withtable
-   function.  */
-enum
-{
-  UC_CATEGORY_MASK_L  = 0x0000001f,
-  UC_CATEGORY_MASK_Lu = 0x00000001,
-  UC_CATEGORY_MASK_Ll = 0x00000002,
-  UC_CATEGORY_MASK_Lt = 0x00000004,
-  UC_CATEGORY_MASK_Lm = 0x00000008,
-  UC_CATEGORY_MASK_Lo = 0x00000010,
-  UC_CATEGORY_MASK_M  = 0x000000e0,
-  UC_CATEGORY_MASK_Mn = 0x00000020,
-  UC_CATEGORY_MASK_Mc = 0x00000040,
-  UC_CATEGORY_MASK_Me = 0x00000080,
-  UC_CATEGORY_MASK_N  = 0x00000700,
-  UC_CATEGORY_MASK_Nd = 0x00000100,
-  UC_CATEGORY_MASK_Nl = 0x00000200,
-  UC_CATEGORY_MASK_No = 0x00000400,
-  UC_CATEGORY_MASK_P  = 0x0003f800,
-  UC_CATEGORY_MASK_Pc = 0x00000800,
-  UC_CATEGORY_MASK_Pd = 0x00001000,
-  UC_CATEGORY_MASK_Ps = 0x00002000,
-  UC_CATEGORY_MASK_Pe = 0x00004000,
-  UC_CATEGORY_MASK_Pi = 0x00008000,
-  UC_CATEGORY_MASK_Pf = 0x00010000,
-  UC_CATEGORY_MASK_Po = 0x00020000,
-  UC_CATEGORY_MASK_S  = 0x003c0000,
-  UC_CATEGORY_MASK_Sm = 0x00040000,
-  UC_CATEGORY_MASK_Sc = 0x00080000,
-  UC_CATEGORY_MASK_Sk = 0x00100000,
-  UC_CATEGORY_MASK_So = 0x00200000,
-  UC_CATEGORY_MASK_Z  = 0x01c00000,
-  UC_CATEGORY_MASK_Zs = 0x00400000,
-  UC_CATEGORY_MASK_Zl = 0x00800000,
-  UC_CATEGORY_MASK_Zp = 0x01000000,
-  UC_CATEGORY_MASK_C  = 0x3e000000,
-  UC_CATEGORY_MASK_Cc = 0x02000000,
-  UC_CATEGORY_MASK_Cf = 0x04000000,
-  UC_CATEGORY_MASK_Cs = 0x08000000,
-  UC_CATEGORY_MASK_Co = 0x10000000,
-  UC_CATEGORY_MASK_Cn = 0x20000000
-};
-
-/* Predefined General category values.  */
-extern const uc_general_category_t UC_CATEGORY_L;
-extern const uc_general_category_t UC_CATEGORY_Lu;
-extern const uc_general_category_t UC_CATEGORY_Ll;
-extern const uc_general_category_t UC_CATEGORY_Lt;
-extern const uc_general_category_t UC_CATEGORY_Lm;
-extern const uc_general_category_t UC_CATEGORY_Lo;
-extern const uc_general_category_t UC_CATEGORY_M;
-extern const uc_general_category_t UC_CATEGORY_Mn;
-extern const uc_general_category_t UC_CATEGORY_Mc;
-extern const uc_general_category_t UC_CATEGORY_Me;
-extern const uc_general_category_t UC_CATEGORY_N;
-extern const uc_general_category_t UC_CATEGORY_Nd;
-extern const uc_general_category_t UC_CATEGORY_Nl;
-extern const uc_general_category_t UC_CATEGORY_No;
-extern const uc_general_category_t UC_CATEGORY_P;
-extern const uc_general_category_t UC_CATEGORY_Pc;
-extern const uc_general_category_t UC_CATEGORY_Pd;
-extern const uc_general_category_t UC_CATEGORY_Ps;
-extern const uc_general_category_t UC_CATEGORY_Pe;
-extern const uc_general_category_t UC_CATEGORY_Pi;
-extern const uc_general_category_t UC_CATEGORY_Pf;
-extern const uc_general_category_t UC_CATEGORY_Po;
-extern const uc_general_category_t UC_CATEGORY_S;
-extern const uc_general_category_t UC_CATEGORY_Sm;
-extern const uc_general_category_t UC_CATEGORY_Sc;
-extern const uc_general_category_t UC_CATEGORY_Sk;
-extern const uc_general_category_t UC_CATEGORY_So;
-extern const uc_general_category_t UC_CATEGORY_Z;
-extern const uc_general_category_t UC_CATEGORY_Zs;
-extern const uc_general_category_t UC_CATEGORY_Zl;
-extern const uc_general_category_t UC_CATEGORY_Zp;
-extern const uc_general_category_t UC_CATEGORY_C;
-extern const uc_general_category_t UC_CATEGORY_Cc;
-extern const uc_general_category_t UC_CATEGORY_Cf;
-extern const uc_general_category_t UC_CATEGORY_Cs;
-extern const uc_general_category_t UC_CATEGORY_Co;
-extern const uc_general_category_t UC_CATEGORY_Cn;
-/* Non-public.  */
-extern const uc_general_category_t _UC_CATEGORY_NONE;
-
-/* Alias names for predefined General category values.  */
-#define UC_LETTER                    UC_CATEGORY_L
-#define UC_UPPERCASE_LETTER          UC_CATEGORY_Lu
-#define UC_LOWERCASE_LETTER          UC_CATEGORY_Ll
-#define UC_TITLECASE_LETTER          UC_CATEGORY_Lt
-#define UC_MODIFIER_LETTER           UC_CATEGORY_Lm
-#define UC_OTHER_LETTER              UC_CATEGORY_Lo
-#define UC_MARK                      UC_CATEGORY_M
-#define UC_NON_SPACING_MARK          UC_CATEGORY_Mn
-#define UC_COMBINING_SPACING_MARK    UC_CATEGORY_Mc
-#define UC_ENCLOSING_MARK            UC_CATEGORY_Me
-#define UC_NUMBER                    UC_CATEGORY_N
-#define UC_DECIMAL_DIGIT_NUMBER      UC_CATEGORY_Nd
-#define UC_LETTER_NUMBER             UC_CATEGORY_Nl
-#define UC_OTHER_NUMBER              UC_CATEGORY_No
-#define UC_PUNCTUATION               UC_CATEGORY_P
-#define UC_CONNECTOR_PUNCTUATION     UC_CATEGORY_Pc
-#define UC_DASH_PUNCTUATION          UC_CATEGORY_Pd
-#define UC_OPEN_PUNCTUATION          UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */
-#define UC_CLOSE_PUNCTUATION         UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */
-#define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi
-#define UC_FINAL_QUOTE_PUNCTUATION   UC_CATEGORY_Pf
-#define UC_OTHER_PUNCTUATION         UC_CATEGORY_Po
-#define UC_SYMBOL                    UC_CATEGORY_S
-#define UC_MATH_SYMBOL               UC_CATEGORY_Sm
-#define UC_CURRENCY_SYMBOL           UC_CATEGORY_Sc
-#define UC_MODIFIER_SYMBOL           UC_CATEGORY_Sk
-#define UC_OTHER_SYMBOL              UC_CATEGORY_So
-#define UC_SEPARATOR                 UC_CATEGORY_Z
-#define UC_SPACE_SEPARATOR           UC_CATEGORY_Zs
-#define UC_LINE_SEPARATOR            UC_CATEGORY_Zl
-#define UC_PARAGRAPH_SEPARATOR       UC_CATEGORY_Zp
-#define UC_OTHER                     UC_CATEGORY_C
-#define UC_CONTROL                   UC_CATEGORY_Cc
-#define UC_FORMAT                    UC_CATEGORY_Cf
-#define UC_SURROGATE                 UC_CATEGORY_Cs /* all of them are invalid characters */
-#define UC_PRIVATE_USE               UC_CATEGORY_Co
-#define UC_UNASSIGNED                UC_CATEGORY_Cn /* some of them are invalid characters */
-
-/* Return the union of two general categories.
-   This corresponds to the unions of the two sets of characters.  */
-extern uc_general_category_t
-       uc_general_category_or (uc_general_category_t category1,
-                               uc_general_category_t category2);
-
-/* Return the intersection of two general categories as bit masks.
-   This *does*not* correspond to the intersection of the two sets of
-   characters.  */
-extern uc_general_category_t
-       uc_general_category_and (uc_general_category_t category1,
-                                uc_general_category_t category2);
-
-/* Return the intersection of a general category with the complement of a
-   second general category, as bit masks.
-   This *does*not* correspond to the intersection with complement, when
-   viewing the categories as sets of characters.  */
-extern uc_general_category_t
-       uc_general_category_and_not (uc_general_category_t category1,
-                                    uc_general_category_t category2);
-
-/* Return the name of a general category.  */
-extern const char *
-       uc_general_category_name (uc_general_category_t category);
-
-/* Return the general category given by name, e.g. "Lu".  */
-extern uc_general_category_t
-       uc_general_category_byname (const char *category_name);
-
-/* Return the general category of a Unicode character.  */
-extern uc_general_category_t
-       uc_general_category (ucs4_t uc);
-
-/* Test whether a Unicode character belongs to a given category.
-   The CATEGORY argument can be the combination of several predefined
-   general categories.  */
-extern bool
-       uc_is_general_category (ucs4_t uc, uc_general_category_t category);
-/* Likewise.  This function uses a big table comprising all categories.  */
-extern bool
-       uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask);
-
-/* ========================================================================= */
-
-/* Field 3 of Unicode Character Database: Canonical combining class.  */
-
-/* The possible results of uc_combining_class (0..255) are described in
-   UCD.html.  The list here is not definitive; more values can be added
-   in future versions.  */
-enum
-{
-  UC_CCC_NR   =   0, /* Not Reordered */
-  UC_CCC_OV   =   1, /* Overlay */
-  UC_CCC_NK   =   7, /* Nukta */
-  UC_CCC_KV   =   8, /* Kana Voicing */
-  UC_CCC_VR   =   9, /* Virama */
-  UC_CCC_ATBL = 200, /* Attached Below Left */
-  UC_CCC_ATB  = 202, /* Attached Below */
-  UC_CCC_ATAR = 216, /* Attached Above Right */
-  UC_CCC_BL   = 218, /* Below Left */
-  UC_CCC_B    = 220, /* Below */
-  UC_CCC_BR   = 222, /* Below Right */
-  UC_CCC_L    = 224, /* Left */
-  UC_CCC_R    = 226, /* Right */
-  UC_CCC_AL   = 228, /* Above Left */
-  UC_CCC_A    = 230, /* Above */
-  UC_CCC_AR   = 232, /* Above Right */
-  UC_CCC_DB   = 233, /* Double Below */
-  UC_CCC_DA   = 234, /* Double Above */
-  UC_CCC_IS   = 240  /* Iota Subscript */
-};
-
-/* Return the canonical combining class of a Unicode character.  */
-extern int
-       uc_combining_class (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Field 4 of Unicode Character Database: Bidirectional category.  */
-
-enum
-{
-  UC_BIDI_L,   /* Left-to-Right */
-  UC_BIDI_LRE, /* Left-to-Right Embedding */
-  UC_BIDI_LRO, /* Left-to-Right Override */
-  UC_BIDI_R,   /* Right-to-Left */
-  UC_BIDI_AL,  /* Right-to-Left Arabic */
-  UC_BIDI_RLE, /* Right-to-Left Embedding */
-  UC_BIDI_RLO, /* Right-to-Left Override */
-  UC_BIDI_PDF, /* Pop Directional Format */
-  UC_BIDI_EN,  /* European Number */
-  UC_BIDI_ES,  /* European Number Separator */
-  UC_BIDI_ET,  /* European Number Terminator */
-  UC_BIDI_AN,  /* Arabic Number */
-  UC_BIDI_CS,  /* Common Number Separator */
-  UC_BIDI_NSM, /* Non-Spacing Mark */
-  UC_BIDI_BN,  /* Boundary Neutral */
-  UC_BIDI_B,   /* Paragraph Separator */
-  UC_BIDI_S,   /* Segment Separator */
-  UC_BIDI_WS,  /* Whitespace */
-  UC_BIDI_ON   /* Other Neutral */
-};
-
-/* Return the name of a bidirectional category.  */
-extern const char *
-       uc_bidi_category_name (int category);
-
-/* Return the bidirectional category given by name, e.g. "LRE".  */
-extern int
-       uc_bidi_category_byname (const char *category_name);
-
-/* Return the bidirectional category of a Unicode character.  */
-extern int
-       uc_bidi_category (ucs4_t uc);
-
-/* Test whether a Unicode character belongs to a given bidirectional
-   category.  */
-extern bool
-       uc_is_bidi_category (ucs4_t uc, int category);
-
-/* ========================================================================= */
-
-/* Field 5 of Unicode Character Database: Character decomposition mapping.
-   See "uninorm.h".  */
-
-/* ========================================================================= */
-
-/* Field 6 of Unicode Character Database: Decimal digit value.  */
-
-/* Return the decimal digit value of a Unicode character.  */
-extern int
-       uc_decimal_value (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Field 7 of Unicode Character Database: Digit value.  */
-
-/* Return the digit value of a Unicode character.  */
-extern int
-       uc_digit_value (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Field 8 of Unicode Character Database: Numeric value.  */
-
-/* Return the numeric value of a Unicode character.  */
-typedef struct
-{
-  int numerator;
-  int denominator;
-}
-uc_fraction_t;
-extern uc_fraction_t
-       uc_numeric_value (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Field 9 of Unicode Character Database: Mirrored.  */
-
-/* Return the mirrored character of a Unicode character UC in *PUC.  */
-extern bool
-       uc_mirror_char (ucs4_t uc, ucs4_t *puc);
-
-/* ========================================================================= */
-
-/* Field 10 of Unicode Character Database: Unicode 1.0 Name.
-   Not available in this library.  */
-
-/* ========================================================================= */
-
-/* Field 11 of Unicode Character Database: ISO 10646 comment.
-   Not available in this library.  */
-
-/* ========================================================================= */
-
-/* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping,
-   lowercase mapping, titlecase mapping.  See "unicase.h".  */
-
-/* ========================================================================= */
-
-/* Common API for properties.  */
-
-/* Data type denoting a property.  This is not just a number, but rather a
-   pointer to the test functions, so that programs that use only few of the
-   properties don't have a link-time dependency towards all the tables.  */
-typedef struct
-{
-  bool (*test_fn) (ucs4_t uc);
-}
-uc_property_t;
-
-/* Predefined properties.  */
-/* General.  */
-extern const uc_property_t UC_PROPERTY_WHITE_SPACE;
-extern const uc_property_t UC_PROPERTY_ALPHABETIC;
-extern const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC;
-extern const uc_property_t UC_PROPERTY_NOT_A_CHARACTER;
-extern const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT;
-extern const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT;
-extern const uc_property_t UC_PROPERTY_DEPRECATED;
-extern const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION;
-extern const uc_property_t UC_PROPERTY_VARIATION_SELECTOR;
-extern const uc_property_t UC_PROPERTY_PRIVATE_USE;
-extern const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE;
-/* Case.  */
-extern const uc_property_t UC_PROPERTY_UPPERCASE;
-extern const uc_property_t UC_PROPERTY_OTHER_UPPERCASE;
-extern const uc_property_t UC_PROPERTY_LOWERCASE;
-extern const uc_property_t UC_PROPERTY_OTHER_LOWERCASE;
-extern const uc_property_t UC_PROPERTY_TITLECASE;
-extern const uc_property_t UC_PROPERTY_SOFT_DOTTED;
-/* Identifiers.  */
-extern const uc_property_t UC_PROPERTY_ID_START;
-extern const uc_property_t UC_PROPERTY_OTHER_ID_START;
-extern const uc_property_t UC_PROPERTY_ID_CONTINUE;
-extern const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE;
-extern const uc_property_t UC_PROPERTY_XID_START;
-extern const uc_property_t UC_PROPERTY_XID_CONTINUE;
-extern const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE;
-extern const uc_property_t UC_PROPERTY_PATTERN_SYNTAX;
-/* Shaping and rendering.  */
-extern const uc_property_t UC_PROPERTY_JOIN_CONTROL;
-extern const uc_property_t UC_PROPERTY_GRAPHEME_BASE;
-extern const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND;
-extern const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND;
-extern const uc_property_t UC_PROPERTY_GRAPHEME_LINK;
-/* Bidi.  */
-extern const uc_property_t UC_PROPERTY_BIDI_CONTROL;
-extern const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT;
-extern const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT;
-extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT;
-extern const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT;
-extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR;
-extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR;
-extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT;
-extern const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR;
-extern const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR;
-extern const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR;
-extern const uc_property_t UC_PROPERTY_BIDI_WHITESPACE;
-extern const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK;
-extern const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL;
-extern const uc_property_t UC_PROPERTY_BIDI_PDF;
-extern const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE;
-extern const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL;
-/* Numeric.  */
-extern const uc_property_t UC_PROPERTY_HEX_DIGIT;
-extern const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT;
-/* CJK.  */
-extern const uc_property_t UC_PROPERTY_IDEOGRAPHIC;
-extern const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH;
-extern const uc_property_t UC_PROPERTY_RADICAL;
-extern const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR;
-extern const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR;
-/* Misc.  */
-extern const uc_property_t UC_PROPERTY_ZERO_WIDTH;
-extern const uc_property_t UC_PROPERTY_SPACE;
-extern const uc_property_t UC_PROPERTY_NON_BREAK;
-extern const uc_property_t UC_PROPERTY_ISO_CONTROL;
-extern const uc_property_t UC_PROPERTY_FORMAT_CONTROL;
-extern const uc_property_t UC_PROPERTY_DASH;
-extern const uc_property_t UC_PROPERTY_HYPHEN;
-extern const uc_property_t UC_PROPERTY_PUNCTUATION;
-extern const uc_property_t UC_PROPERTY_LINE_SEPARATOR;
-extern const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR;
-extern const uc_property_t UC_PROPERTY_QUOTATION_MARK;
-extern const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL;
-extern const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION;
-extern const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL;
-extern const uc_property_t UC_PROPERTY_MATH;
-extern const uc_property_t UC_PROPERTY_OTHER_MATH;
-extern const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION;
-extern const uc_property_t UC_PROPERTY_LEFT_OF_PAIR;
-extern const uc_property_t UC_PROPERTY_COMBINING;
-extern const uc_property_t UC_PROPERTY_COMPOSITE;
-extern const uc_property_t UC_PROPERTY_DECIMAL_DIGIT;
-extern const uc_property_t UC_PROPERTY_NUMERIC;
-extern const uc_property_t UC_PROPERTY_DIACRITIC;
-extern const uc_property_t UC_PROPERTY_EXTENDER;
-extern const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL;
-
-/* Return the property given by name, e.g. "White space".  */
-extern uc_property_t
-       uc_property_byname (const char *property_name);
-
-/* Test whether a property is valid.  */
-#define uc_property_is_valid(property) ((property).test_fn != NULL)
-
-/* Test whether a Unicode character has a given property.  */
-extern bool
-       uc_is_property (ucs4_t uc, uc_property_t property);
-extern bool uc_is_property_white_space (ucs4_t uc);
-extern bool uc_is_property_alphabetic (ucs4_t uc);
-extern bool uc_is_property_other_alphabetic (ucs4_t uc);
-extern bool uc_is_property_not_a_character (ucs4_t uc);
-extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc);
-extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc);
-extern bool uc_is_property_deprecated (ucs4_t uc);
-extern bool uc_is_property_logical_order_exception (ucs4_t uc);
-extern bool uc_is_property_variation_selector (ucs4_t uc);
-extern bool uc_is_property_private_use (ucs4_t uc);
-extern bool uc_is_property_unassigned_code_value (ucs4_t uc);
-extern bool uc_is_property_uppercase (ucs4_t uc);
-extern bool uc_is_property_other_uppercase (ucs4_t uc);
-extern bool uc_is_property_lowercase (ucs4_t uc);
-extern bool uc_is_property_other_lowercase (ucs4_t uc);
-extern bool uc_is_property_titlecase (ucs4_t uc);
-extern bool uc_is_property_soft_dotted (ucs4_t uc);
-extern bool uc_is_property_id_start (ucs4_t uc);
-extern bool uc_is_property_other_id_start (ucs4_t uc);
-extern bool uc_is_property_id_continue (ucs4_t uc);
-extern bool uc_is_property_other_id_continue (ucs4_t uc);
-extern bool uc_is_property_xid_start (ucs4_t uc);
-extern bool uc_is_property_xid_continue (ucs4_t uc);
-extern bool uc_is_property_pattern_white_space (ucs4_t uc);
-extern bool uc_is_property_pattern_syntax (ucs4_t uc);
-extern bool uc_is_property_join_control (ucs4_t uc);
-extern bool uc_is_property_grapheme_base (ucs4_t uc);
-extern bool uc_is_property_grapheme_extend (ucs4_t uc);
-extern bool uc_is_property_other_grapheme_extend (ucs4_t uc);
-extern bool uc_is_property_grapheme_link (ucs4_t uc);
-extern bool uc_is_property_bidi_control (ucs4_t uc);
-extern bool uc_is_property_bidi_left_to_right (ucs4_t uc);
-extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc);
-extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc);
-extern bool uc_is_property_bidi_european_digit (ucs4_t uc);
-extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc);
-extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc);
-extern bool uc_is_property_bidi_common_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_block_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_segment_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_whitespace (ucs4_t uc);
-extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc);
-extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc);
-extern bool uc_is_property_bidi_pdf (ucs4_t uc);
-extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc);
-extern bool uc_is_property_bidi_other_neutral (ucs4_t uc);
-extern bool uc_is_property_hex_digit (ucs4_t uc);
-extern bool uc_is_property_ascii_hex_digit (ucs4_t uc);
-extern bool uc_is_property_ideographic (ucs4_t uc);
-extern bool uc_is_property_unified_ideograph (ucs4_t uc);
-extern bool uc_is_property_radical (ucs4_t uc);
-extern bool uc_is_property_ids_binary_operator (ucs4_t uc);
-extern bool uc_is_property_ids_trinary_operator (ucs4_t uc);
-extern bool uc_is_property_zero_width (ucs4_t uc);
-extern bool uc_is_property_space (ucs4_t uc);
-extern bool uc_is_property_non_break (ucs4_t uc);
-extern bool uc_is_property_iso_control (ucs4_t uc);
-extern bool uc_is_property_format_control (ucs4_t uc);
-extern bool uc_is_property_dash (ucs4_t uc);
-extern bool uc_is_property_hyphen (ucs4_t uc);
-extern bool uc_is_property_punctuation (ucs4_t uc);
-extern bool uc_is_property_line_separator (ucs4_t uc);
-extern bool uc_is_property_paragraph_separator (ucs4_t uc);
-extern bool uc_is_property_quotation_mark (ucs4_t uc);
-extern bool uc_is_property_sentence_terminal (ucs4_t uc);
-extern bool uc_is_property_terminal_punctuation (ucs4_t uc);
-extern bool uc_is_property_currency_symbol (ucs4_t uc);
-extern bool uc_is_property_math (ucs4_t uc);
-extern bool uc_is_property_other_math (ucs4_t uc);
-extern bool uc_is_property_paired_punctuation (ucs4_t uc);
-extern bool uc_is_property_left_of_pair (ucs4_t uc);
-extern bool uc_is_property_combining (ucs4_t uc);
-extern bool uc_is_property_composite (ucs4_t uc);
-extern bool uc_is_property_decimal_digit (ucs4_t uc);
-extern bool uc_is_property_numeric (ucs4_t uc);
-extern bool uc_is_property_diacritic (ucs4_t uc);
-extern bool uc_is_property_extender (ucs4_t uc);
-extern bool uc_is_property_ignorable_control (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Subdivision of the Unicode characters into scripts.  */
-
-typedef struct
-{
-  unsigned int code : 21;
-  unsigned int start : 1;
-  unsigned int end : 1;
-}
-uc_interval_t;
-typedef struct
-{
-  unsigned int nintervals;
-  const uc_interval_t *intervals;
-  const char *name;
-}
-uc_script_t;
-
-/* Return the script of a Unicode character.  */
-extern const uc_script_t *
-       uc_script (ucs4_t uc);
-
-/* Return the script given by name, e.g. "HAN".  */
-extern const uc_script_t *
-       uc_script_byname (const char *script_name);
-
-/* Test whether a Unicode character belongs to a given script.  */
-extern bool
-       uc_is_script (ucs4_t uc, const uc_script_t *script);
-
-/* Get the list of all scripts.  */
-extern void
-       uc_all_scripts (const uc_script_t **scripts, size_t *count);
-
-/* ========================================================================= */
-
-/* Subdivision of the Unicode character range into blocks.  */
-
-typedef struct
-{
-  ucs4_t start;
-  ucs4_t end;
-  const char *name;
-}
-uc_block_t;
-
-/* Return the block a character belongs to.  */
-extern const uc_block_t *
-       uc_block (ucs4_t uc);
-
-/* Test whether a Unicode character belongs to a given block.  */
-extern bool
-       uc_is_block (ucs4_t uc, const uc_block_t *block);
-
-/* Get the list of all blocks.  */
-extern void
-       uc_all_blocks (const uc_block_t **blocks, size_t *count);
-
-/* ========================================================================= */
-
-/* Properties taken from language standards.  */
-
-/* Test whether a Unicode character is considered whitespace in ISO C 99.  */
-extern bool
-       uc_is_c_whitespace (ucs4_t uc);
-
-/* Test whether a Unicode character is considered whitespace in Java.  */
-extern bool
-       uc_is_java_whitespace (ucs4_t uc);
-
-enum
-{
-  UC_IDENTIFIER_START,    /* valid as first or subsequent character */
-  UC_IDENTIFIER_VALID,    /* valid as subsequent character only */
-  UC_IDENTIFIER_INVALID,  /* not valid */
-  UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */
-};
-
-/* Return the categorization of a Unicode character w.r.t. the ISO C 99
-   identifier syntax.  */
-extern int
-       uc_c_ident_category (ucs4_t uc);
-
-/* Return the categorization of a Unicode character w.r.t. the Java
-   identifier syntax.  */
-extern int
-       uc_java_ident_category (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Like ISO C <ctype.h> and <wctype.h>.  These functions are deprecated,
-   because this set of functions was designed with ASCII in mind and cannot
-   reflect the more diverse reality of the Unicode character set.  But they
-   can be a quick-and-dirty porting aid when migrating from wchar_t APIs
-   to Unicode strings.  */
-
-/* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true.  */
-extern bool
-       uc_is_alnum (ucs4_t uc);
-
-/* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true,
-   or any character that is one of a locale-specific set of characters for
-   which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space'
-   is true.  */
-extern bool
-       uc_is_alpha (ucs4_t uc);
-
-/* Test for any control character.  */
-extern bool
-       uc_is_cntrl (ucs4_t uc);
-
-/* Test for any character that corresponds to a decimal-digit character.  */
-extern bool
-       uc_is_digit (ucs4_t uc);
-
-/* Test for any character for which 'uc_is_print' is true and 'uc_is_space'
-   is false.  */
-extern bool
-       uc_is_graph (ucs4_t uc);
-
-/* Test for any character that corresponds to a lowercase letter or is one
-   of a locale-specific set of characters for which none of 'uc_is_cntrl',
-   'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true.  */
-extern bool
-       uc_is_lower (ucs4_t uc);
-
-/* Test for any printing character.  */
-extern bool
-       uc_is_print (ucs4_t uc);
-
-/* Test for any printing character that is one of a locale-specific set of
-   characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true.  */
-extern bool
-       uc_is_punct (ucs4_t uc);
-
-/* Test for any character that corresponds to a locale-specific set of
-   characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct'
-   is true.  */
-extern bool
-       uc_is_space (ucs4_t uc);
-
-/* Test for any character that corresponds to an uppercase letter or is one
-   of a locale-specific set of character for which none of 'uc_is_cntrl',
-   'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true.  */
-extern bool
-       uc_is_upper (ucs4_t uc);
-
-/* Test for any character that corresponds to a hexadecimal-digit
-   character.  */
-extern bool
-       uc_is_xdigit (ucs4_t uc);
-
-/* GNU extension. */
-/* Test for any character that corresponds to a standard blank character or
-   a locale-specific set of characters for which 'uc_is_alnum' is false.  */
-extern bool
-       uc_is_blank (ucs4_t uc);
-
-/* ========================================================================= */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNICTYPE_H */
new file mode 100644
--- /dev/null
+++ b/lib/unictype.in.h
@@ -0,0 +1,717 @@
+/* Unicode character classification and properties.
+   Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNICTYPE_H
+#define _UNICTYPE_H
+
+#include "unitypes.h"
+
+/* Get bool.  */
+#include <stdbool.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ========================================================================= */
+
+/* Field 1 of Unicode Character Database: Character name.
+   See "uniname.h".  */
+
+/* ========================================================================= */
+
+/* Field 2 of Unicode Character Database: General category.  */
+
+/* Data type denoting a General category value.  This is not just a bitmask,
+   but rather a bitmask and a pointer to the lookup table, so that programs
+   that use only the predefined bitmasks (i.e. don't combine bitmasks with &
+   and |) don't have a link-time dependency towards the big general table.  */
+typedef struct
+{
+  uint32_t bitmask : 31;
+  /*bool*/ unsigned int generic : 1;
+  union
+  {
+    const void *table;                               /* when generic is 0 */
+    bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */
+  } lookup;
+}
+uc_general_category_t;
+
+/* Bits and bit masks denoting General category values.  UnicodeData-3.2.0.html
+   says a 32-bit integer will always suffice to represent them.
+   These bit masks can only be used with the uc_is_general_category_withtable
+   function.  */
+enum
+{
+  UC_CATEGORY_MASK_L  = 0x0000001f,
+  UC_CATEGORY_MASK_Lu = 0x00000001,
+  UC_CATEGORY_MASK_Ll = 0x00000002,
+  UC_CATEGORY_MASK_Lt = 0x00000004,
+  UC_CATEGORY_MASK_Lm = 0x00000008,
+  UC_CATEGORY_MASK_Lo = 0x00000010,
+  UC_CATEGORY_MASK_M  = 0x000000e0,
+  UC_CATEGORY_MASK_Mn = 0x00000020,
+  UC_CATEGORY_MASK_Mc = 0x00000040,
+  UC_CATEGORY_MASK_Me = 0x00000080,
+  UC_CATEGORY_MASK_N  = 0x00000700,
+  UC_CATEGORY_MASK_Nd = 0x00000100,
+  UC_CATEGORY_MASK_Nl = 0x00000200,
+  UC_CATEGORY_MASK_No = 0x00000400,
+  UC_CATEGORY_MASK_P  = 0x0003f800,
+  UC_CATEGORY_MASK_Pc = 0x00000800,
+  UC_CATEGORY_MASK_Pd = 0x00001000,
+  UC_CATEGORY_MASK_Ps = 0x00002000,
+  UC_CATEGORY_MASK_Pe = 0x00004000,
+  UC_CATEGORY_MASK_Pi = 0x00008000,
+  UC_CATEGORY_MASK_Pf = 0x00010000,
+  UC_CATEGORY_MASK_Po = 0x00020000,
+  UC_CATEGORY_MASK_S  = 0x003c0000,
+  UC_CATEGORY_MASK_Sm = 0x00040000,
+  UC_CATEGORY_MASK_Sc = 0x00080000,
+  UC_CATEGORY_MASK_Sk = 0x00100000,
+  UC_CATEGORY_MASK_So = 0x00200000,
+  UC_CATEGORY_MASK_Z  = 0x01c00000,
+  UC_CATEGORY_MASK_Zs = 0x00400000,
+  UC_CATEGORY_MASK_Zl = 0x00800000,
+  UC_CATEGORY_MASK_Zp = 0x01000000,
+  UC_CATEGORY_MASK_C  = 0x3e000000,
+  UC_CATEGORY_MASK_Cc = 0x02000000,
+  UC_CATEGORY_MASK_Cf = 0x04000000,
+  UC_CATEGORY_MASK_Cs = 0x08000000,
+  UC_CATEGORY_MASK_Co = 0x10000000,
+  UC_CATEGORY_MASK_Cn = 0x20000000
+};
+
+/* Predefined General category values.  */
+extern const uc_general_category_t UC_CATEGORY_L;
+extern const uc_general_category_t UC_CATEGORY_Lu;
+extern const uc_general_category_t UC_CATEGORY_Ll;
+extern const uc_general_category_t UC_CATEGORY_Lt;
+extern const uc_general_category_t UC_CATEGORY_Lm;
+extern const uc_general_category_t UC_CATEGORY_Lo;
+extern const uc_general_category_t UC_CATEGORY_M;
+extern const uc_general_category_t UC_CATEGORY_Mn;
+extern const uc_general_category_t UC_CATEGORY_Mc;
+extern const uc_general_category_t UC_CATEGORY_Me;
+extern const uc_general_category_t UC_CATEGORY_N;
+extern const uc_general_category_t UC_CATEGORY_Nd;
+extern const uc_general_category_t UC_CATEGORY_Nl;
+extern const uc_general_category_t UC_CATEGORY_No;
+extern const uc_general_category_t UC_CATEGORY_P;
+extern const uc_general_category_t UC_CATEGORY_Pc;
+extern const uc_general_category_t UC_CATEGORY_Pd;
+extern const uc_general_category_t UC_CATEGORY_Ps;
+extern const uc_general_category_t UC_CATEGORY_Pe;
+extern const uc_general_category_t UC_CATEGORY_Pi;
+extern const uc_general_category_t UC_CATEGORY_Pf;
+extern const uc_general_category_t UC_CATEGORY_Po;
+extern const uc_general_category_t UC_CATEGORY_S;
+extern const uc_general_category_t UC_CATEGORY_Sm;
+extern const uc_general_category_t UC_CATEGORY_Sc;
+extern const uc_general_category_t UC_CATEGORY_Sk;
+extern const uc_general_category_t UC_CATEGORY_So;
+extern const uc_general_category_t UC_CATEGORY_Z;
+extern const uc_general_category_t UC_CATEGORY_Zs;
+extern const uc_general_category_t UC_CATEGORY_Zl;
+extern const uc_general_category_t UC_CATEGORY_Zp;
+extern const uc_general_category_t UC_CATEGORY_C;
+extern const uc_general_category_t UC_CATEGORY_Cc;
+extern const uc_general_category_t UC_CATEGORY_Cf;
+extern const uc_general_category_t UC_CATEGORY_Cs;
+extern const uc_general_category_t UC_CATEGORY_Co;
+extern const uc_general_category_t UC_CATEGORY_Cn;
+/* Non-public.  */
+extern const uc_general_category_t _UC_CATEGORY_NONE;
+
+/* Alias names for predefined General category values.  */
+#define UC_LETTER                    UC_CATEGORY_L
+#define UC_UPPERCASE_LETTER          UC_CATEGORY_Lu
+#define UC_LOWERCASE_LETTER          UC_CATEGORY_Ll
+#define UC_TITLECASE_LETTER          UC_CATEGORY_Lt
+#define UC_MODIFIER_LETTER           UC_CATEGORY_Lm
+#define UC_OTHER_LETTER              UC_CATEGORY_Lo
+#define UC_MARK                      UC_CATEGORY_M
+#define UC_NON_SPACING_MARK          UC_CATEGORY_Mn
+#define UC_COMBINING_SPACING_MARK    UC_CATEGORY_Mc
+#define UC_ENCLOSING_MARK            UC_CATEGORY_Me
+#define UC_NUMBER                    UC_CATEGORY_N
+#define UC_DECIMAL_DIGIT_NUMBER      UC_CATEGORY_Nd
+#define UC_LETTER_NUMBER             UC_CATEGORY_Nl
+#define UC_OTHER_NUMBER              UC_CATEGORY_No
+#define UC_PUNCTUATION               UC_CATEGORY_P
+#define UC_CONNECTOR_PUNCTUATION     UC_CATEGORY_Pc
+#define UC_DASH_PUNCTUATION          UC_CATEGORY_Pd
+#define UC_OPEN_PUNCTUATION          UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */
+#define UC_CLOSE_PUNCTUATION         UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */
+#define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi
+#define UC_FINAL_QUOTE_PUNCTUATION   UC_CATEGORY_Pf
+#define UC_OTHER_PUNCTUATION         UC_CATEGORY_Po
+#define UC_SYMBOL                    UC_CATEGORY_S
+#define UC_MATH_SYMBOL               UC_CATEGORY_Sm
+#define UC_CURRENCY_SYMBOL           UC_CATEGORY_Sc
+#define UC_MODIFIER_SYMBOL           UC_CATEGORY_Sk
+#define UC_OTHER_SYMBOL              UC_CATEGORY_So
+#define UC_SEPARATOR                 UC_CATEGORY_Z
+#define UC_SPACE_SEPARATOR           UC_CATEGORY_Zs
+#define UC_LINE_SEPARATOR            UC_CATEGORY_Zl
+#define UC_PARAGRAPH_SEPARATOR       UC_CATEGORY_Zp
+#define UC_OTHER                     UC_CATEGORY_C
+#define UC_CONTROL                   UC_CATEGORY_Cc
+#define UC_FORMAT                    UC_CATEGORY_Cf
+#define UC_SURROGATE                 UC_CATEGORY_Cs /* all of them are invalid characters */
+#define UC_PRIVATE_USE               UC_CATEGORY_Co
+#define UC_UNASSIGNED                UC_CATEGORY_Cn /* some of them are invalid characters */
+
+/* Return the union of two general categories.
+   This corresponds to the unions of the two sets of characters.  */
+extern uc_general_category_t
+       uc_general_category_or (uc_general_category_t category1,
+                               uc_general_category_t category2);
+
+/* Return the intersection of two general categories as bit masks.
+   This *does*not* correspond to the intersection of the two sets of
+   characters.  */
+extern uc_general_category_t
+       uc_general_category_and (uc_general_category_t category1,
+                                uc_general_category_t category2);
+
+/* Return the intersection of a general category with the complement of a
+   second general category, as bit masks.
+   This *does*not* correspond to the intersection with complement, when
+   viewing the categories as sets of characters.  */
+extern uc_general_category_t
+       uc_general_category_and_not (uc_general_category_t category1,
+                                    uc_general_category_t category2);
+
+/* Return the name of a general category.  */
+extern const char *
+       uc_general_category_name (uc_general_category_t category);
+
+/* Return the general category given by name, e.g. "Lu".  */
+extern uc_general_category_t
+       uc_general_category_byname (const char *category_name);
+
+/* Return the general category of a Unicode character.  */
+extern uc_general_category_t
+       uc_general_category (ucs4_t uc);
+
+/* Test whether a Unicode character belongs to a given category.
+   The CATEGORY argument can be the combination of several predefined
+   general categories.  */
+extern bool
+       uc_is_general_category (ucs4_t uc, uc_general_category_t category);
+/* Likewise.  This function uses a big table comprising all categories.  */
+extern bool
+       uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask);
+
+/* ========================================================================= */
+
+/* Field 3 of Unicode Character Database: Canonical combining class.  */
+
+/* The possible results of uc_combining_class (0..255) are described in
+   UCD.html.  The list here is not definitive; more values can be added
+   in future versions.  */
+enum
+{
+  UC_CCC_NR   =   0, /* Not Reordered */
+  UC_CCC_OV   =   1, /* Overlay */
+  UC_CCC_NK   =   7, /* Nukta */
+  UC_CCC_KV   =   8, /* Kana Voicing */
+  UC_CCC_VR   =   9, /* Virama */
+  UC_CCC_ATBL = 200, /* Attached Below Left */
+  UC_CCC_ATB  = 202, /* Attached Below */
+  UC_CCC_ATAR = 216, /* Attached Above Right */
+  UC_CCC_BL   = 218, /* Below Left */
+  UC_CCC_B    = 220, /* Below */
+  UC_CCC_BR   = 222, /* Below Right */
+  UC_CCC_L    = 224, /* Left */
+  UC_CCC_R    = 226, /* Right */
+  UC_CCC_AL   = 228, /* Above Left */
+  UC_CCC_A    = 230, /* Above */
+  UC_CCC_AR   = 232, /* Above Right */
+  UC_CCC_DB   = 233, /* Double Below */
+  UC_CCC_DA   = 234, /* Double Above */
+  UC_CCC_IS   = 240  /* Iota Subscript */
+};
+
+/* Return the canonical combining class of a Unicode character.  */
+extern int
+       uc_combining_class (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Field 4 of Unicode Character Database: Bidirectional category.  */
+
+enum
+{
+  UC_BIDI_L,   /* Left-to-Right */
+  UC_BIDI_LRE, /* Left-to-Right Embedding */
+  UC_BIDI_LRO, /* Left-to-Right Override */
+  UC_BIDI_R,   /* Right-to-Left */
+  UC_BIDI_AL,  /* Right-to-Left Arabic */
+  UC_BIDI_RLE, /* Right-to-Left Embedding */
+  UC_BIDI_RLO, /* Right-to-Left Override */
+  UC_BIDI_PDF, /* Pop Directional Format */
+  UC_BIDI_EN,  /* European Number */
+  UC_BIDI_ES,  /* European Number Separator */
+  UC_BIDI_ET,  /* European Number Terminator */
+  UC_BIDI_AN,  /* Arabic Number */
+  UC_BIDI_CS,  /* Common Number Separator */
+  UC_BIDI_NSM, /* Non-Spacing Mark */
+  UC_BIDI_BN,  /* Boundary Neutral */
+  UC_BIDI_B,   /* Paragraph Separator */
+  UC_BIDI_S,   /* Segment Separator */
+  UC_BIDI_WS,  /* Whitespace */
+  UC_BIDI_ON   /* Other Neutral */
+};
+
+/* Return the name of a bidirectional category.  */
+extern const char *
+       uc_bidi_category_name (int category);
+
+/* Return the bidirectional category given by name, e.g. "LRE".  */
+extern int
+       uc_bidi_category_byname (const char *category_name);
+
+/* Return the bidirectional category of a Unicode character.  */
+extern int
+       uc_bidi_category (ucs4_t uc);
+
+/* Test whether a Unicode character belongs to a given bidirectional
+   category.  */
+extern bool
+       uc_is_bidi_category (ucs4_t uc, int category);
+
+/* ========================================================================= */
+
+/* Field 5 of Unicode Character Database: Character decomposition mapping.
+   See "uninorm.h".  */
+
+/* ========================================================================= */
+
+/* Field 6 of Unicode Character Database: Decimal digit value.  */
+
+/* Return the decimal digit value of a Unicode character.  */
+extern int
+       uc_decimal_value (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Field 7 of Unicode Character Database: Digit value.  */
+
+/* Return the digit value of a Unicode character.  */
+extern int
+       uc_digit_value (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Field 8 of Unicode Character Database: Numeric value.  */
+
+/* Return the numeric value of a Unicode character.  */
+typedef struct
+{
+  int numerator;
+  int denominator;
+}
+uc_fraction_t;
+extern uc_fraction_t
+       uc_numeric_value (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Field 9 of Unicode Character Database: Mirrored.  */
+
+/* Return the mirrored character of a Unicode character UC in *PUC.  */
+extern bool
+       uc_mirror_char (ucs4_t uc, ucs4_t *puc);
+
+/* ========================================================================= */
+
+/* Field 10 of Unicode Character Database: Unicode 1.0 Name.
+   Not available in this library.  */
+
+/* ========================================================================= */
+
+/* Field 11 of Unicode Character Database: ISO 10646 comment.
+   Not available in this library.  */
+
+/* ========================================================================= */
+
+/* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping,
+   lowercase mapping, titlecase mapping.  See "unicase.h".  */
+
+/* ========================================================================= */
+
+/* Common API for properties.  */
+
+/* Data type denoting a property.  This is not just a number, but rather a
+   pointer to the test functions, so that programs that use only few of the
+   properties don't have a link-time dependency towards all the tables.  */
+typedef struct
+{
+  bool (*test_fn) (ucs4_t uc);
+}
+uc_property_t;
+
+/* Predefined properties.  */
+/* General.  */
+extern const uc_property_t UC_PROPERTY_WHITE_SPACE;
+extern const uc_property_t UC_PROPERTY_ALPHABETIC;
+extern const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC;
+extern const uc_property_t UC_PROPERTY_NOT_A_CHARACTER;
+extern const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT;
+extern const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT;
+extern const uc_property_t UC_PROPERTY_DEPRECATED;
+extern const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION;
+extern const uc_property_t UC_PROPERTY_VARIATION_SELECTOR;
+extern const uc_property_t UC_PROPERTY_PRIVATE_USE;
+extern const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE;
+/* Case.  */
+extern const uc_property_t UC_PROPERTY_UPPERCASE;
+extern const uc_property_t UC_PROPERTY_OTHER_UPPERCASE;
+extern const uc_property_t UC_PROPERTY_LOWERCASE;
+extern const uc_property_t UC_PROPERTY_OTHER_LOWERCASE;
+extern const uc_property_t UC_PROPERTY_TITLECASE;
+extern const uc_property_t UC_PROPERTY_SOFT_DOTTED;
+/* Identifiers.  */
+extern const uc_property_t UC_PROPERTY_ID_START;
+extern const uc_property_t UC_PROPERTY_OTHER_ID_START;
+extern const uc_property_t UC_PROPERTY_ID_CONTINUE;
+extern const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE;
+extern const uc_property_t UC_PROPERTY_XID_START;
+extern const uc_property_t UC_PROPERTY_XID_CONTINUE;
+extern const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE;
+extern const uc_property_t UC_PROPERTY_PATTERN_SYNTAX;
+/* Shaping and rendering.  */
+extern const uc_property_t UC_PROPERTY_JOIN_CONTROL;
+extern const uc_property_t UC_PROPERTY_GRAPHEME_BASE;
+extern const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND;
+extern const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND;
+extern const uc_property_t UC_PROPERTY_GRAPHEME_LINK;
+/* Bidi.  */
+extern const uc_property_t UC_PROPERTY_BIDI_CONTROL;
+extern const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT;
+extern const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT;
+extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT;
+extern const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT;
+extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR;
+extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR;
+extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT;
+extern const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR;
+extern const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR;
+extern const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR;
+extern const uc_property_t UC_PROPERTY_BIDI_WHITESPACE;
+extern const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK;
+extern const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL;
+extern const uc_property_t UC_PROPERTY_BIDI_PDF;
+extern const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE;
+extern const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL;
+/* Numeric.  */
+extern const uc_property_t UC_PROPERTY_HEX_DIGIT;
+extern const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT;
+/* CJK.  */
+extern const uc_property_t UC_PROPERTY_IDEOGRAPHIC;
+extern const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH;
+extern const uc_property_t UC_PROPERTY_RADICAL;
+extern const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR;
+extern const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR;
+/* Misc.  */
+extern const uc_property_t UC_PROPERTY_ZERO_WIDTH;
+extern const uc_property_t UC_PROPERTY_SPACE;
+extern const uc_property_t UC_PROPERTY_NON_BREAK;
+extern const uc_property_t UC_PROPERTY_ISO_CONTROL;
+extern const uc_property_t UC_PROPERTY_FORMAT_CONTROL;
+extern const uc_property_t UC_PROPERTY_DASH;
+extern const uc_property_t UC_PROPERTY_HYPHEN;
+extern const uc_property_t UC_PROPERTY_PUNCTUATION;
+extern const uc_property_t UC_PROPERTY_LINE_SEPARATOR;
+extern const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR;
+extern const uc_property_t UC_PROPERTY_QUOTATION_MARK;
+extern const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL;
+extern const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION;
+extern const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL;
+extern const uc_property_t UC_PROPERTY_MATH;
+extern const uc_property_t UC_PROPERTY_OTHER_MATH;
+extern const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION;
+extern const uc_property_t UC_PROPERTY_LEFT_OF_PAIR;
+extern const uc_property_t UC_PROPERTY_COMBINING;
+extern const uc_property_t UC_PROPERTY_COMPOSITE;
+extern const uc_property_t UC_PROPERTY_DECIMAL_DIGIT;
+extern const uc_property_t UC_PROPERTY_NUMERIC;
+extern const uc_property_t UC_PROPERTY_DIACRITIC;
+extern const uc_property_t UC_PROPERTY_EXTENDER;
+extern const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL;
+
+/* Return the property given by name, e.g. "White space".  */
+extern uc_property_t
+       uc_property_byname (const char *property_name);
+
+/* Test whether a property is valid.  */
+#define uc_property_is_valid(property) ((property).test_fn != NULL)
+
+/* Test whether a Unicode character has a given property.  */
+extern bool
+       uc_is_property (ucs4_t uc, uc_property_t property);
+extern bool uc_is_property_white_space (ucs4_t uc);
+extern bool uc_is_property_alphabetic (ucs4_t uc);
+extern bool uc_is_property_other_alphabetic (ucs4_t uc);
+extern bool uc_is_property_not_a_character (ucs4_t uc);
+extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc);
+extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc);
+extern bool uc_is_property_deprecated (ucs4_t uc);
+extern bool uc_is_property_logical_order_exception (ucs4_t uc);
+extern bool uc_is_property_variation_selector (ucs4_t uc);
+extern bool uc_is_property_private_use (ucs4_t uc);
+extern bool uc_is_property_unassigned_code_value (ucs4_t uc);
+extern bool uc_is_property_uppercase (ucs4_t uc);
+extern bool uc_is_property_other_uppercase (ucs4_t uc);
+extern bool uc_is_property_lowercase (ucs4_t uc);
+extern bool uc_is_property_other_lowercase (ucs4_t uc);
+extern bool uc_is_property_titlecase (ucs4_t uc);
+extern bool uc_is_property_soft_dotted (ucs4_t uc);
+extern bool uc_is_property_id_start (ucs4_t uc);
+extern bool uc_is_property_other_id_start (ucs4_t uc);
+extern bool uc_is_property_id_continue (ucs4_t uc);
+extern bool uc_is_property_other_id_continue (ucs4_t uc);
+extern bool uc_is_property_xid_start (ucs4_t uc);
+extern bool uc_is_property_xid_continue (ucs4_t uc);
+extern bool uc_is_property_pattern_white_space (ucs4_t uc);
+extern bool uc_is_property_pattern_syntax (ucs4_t uc);
+extern bool uc_is_property_join_control (ucs4_t uc);
+extern bool uc_is_property_grapheme_base (ucs4_t uc);
+extern bool uc_is_property_grapheme_extend (ucs4_t uc);
+extern bool uc_is_property_other_grapheme_extend (ucs4_t uc);
+extern bool uc_is_property_grapheme_link (ucs4_t uc);
+extern bool uc_is_property_bidi_control (ucs4_t uc);
+extern bool uc_is_property_bidi_left_to_right (ucs4_t uc);
+extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc);
+extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc);
+extern bool uc_is_property_bidi_european_digit (ucs4_t uc);
+extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc);
+extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc);
+extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc);
+extern bool uc_is_property_bidi_common_separator (ucs4_t uc);
+extern bool uc_is_property_bidi_block_separator (ucs4_t uc);
+extern bool uc_is_property_bidi_segment_separator (ucs4_t uc);
+extern bool uc_is_property_bidi_whitespace (ucs4_t uc);
+extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc);
+extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc);
+extern bool uc_is_property_bidi_pdf (ucs4_t uc);
+extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc);
+extern bool uc_is_property_bidi_other_neutral (ucs4_t uc);
+extern bool uc_is_property_hex_digit (ucs4_t uc);
+extern bool uc_is_property_ascii_hex_digit (ucs4_t uc);
+extern bool uc_is_property_ideographic (ucs4_t uc);
+extern bool uc_is_property_unified_ideograph (ucs4_t uc);
+extern bool uc_is_property_radical (ucs4_t uc);
+extern bool uc_is_property_ids_binary_operator (ucs4_t uc);
+extern bool uc_is_property_ids_trinary_operator (ucs4_t uc);
+extern bool uc_is_property_zero_width (ucs4_t uc);
+extern bool uc_is_property_space (ucs4_t uc);
+extern bool uc_is_property_non_break (ucs4_t uc);
+extern bool uc_is_property_iso_control (ucs4_t uc);
+extern bool uc_is_property_format_control (ucs4_t uc);
+extern bool uc_is_property_dash (ucs4_t uc);
+extern bool uc_is_property_hyphen (ucs4_t uc);
+extern bool uc_is_property_punctuation (ucs4_t uc);
+extern bool uc_is_property_line_separator (ucs4_t uc);
+extern bool uc_is_property_paragraph_separator (ucs4_t uc);
+extern bool uc_is_property_quotation_mark (ucs4_t uc);
+extern bool uc_is_property_sentence_terminal (ucs4_t uc);
+extern bool uc_is_property_terminal_punctuation (ucs4_t uc);
+extern bool uc_is_property_currency_symbol (ucs4_t uc);
+extern bool uc_is_property_math (ucs4_t uc);
+extern bool uc_is_property_other_math (ucs4_t uc);
+extern bool uc_is_property_paired_punctuation (ucs4_t uc);
+extern bool uc_is_property_left_of_pair (ucs4_t uc);
+extern bool uc_is_property_combining (ucs4_t uc);
+extern bool uc_is_property_composite (ucs4_t uc);
+extern bool uc_is_property_decimal_digit (ucs4_t uc);
+extern bool uc_is_property_numeric (ucs4_t uc);
+extern bool uc_is_property_diacritic (ucs4_t uc);
+extern bool uc_is_property_extender (ucs4_t uc);
+extern bool uc_is_property_ignorable_control (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Subdivision of the Unicode characters into scripts.  */
+
+typedef struct
+{
+  unsigned int code : 21;
+  unsigned int start : 1;
+  unsigned int end : 1;
+}
+uc_interval_t;
+typedef struct
+{
+  unsigned int nintervals;
+  const uc_interval_t *intervals;
+  const char *name;
+}
+uc_script_t;
+
+/* Return the script of a Unicode character.  */
+extern const uc_script_t *
+       uc_script (ucs4_t uc);
+
+/* Return the script given by name, e.g. "HAN".  */
+extern const uc_script_t *
+       uc_script_byname (const char *script_name);
+
+/* Test whether a Unicode character belongs to a given script.  */
+extern bool
+       uc_is_script (ucs4_t uc, const uc_script_t *script);
+
+/* Get the list of all scripts.  */
+extern void
+       uc_all_scripts (const uc_script_t **scripts, size_t *count);
+
+/* ========================================================================= */
+
+/* Subdivision of the Unicode character range into blocks.  */
+
+typedef struct
+{
+  ucs4_t start;
+  ucs4_t end;
+  const char *name;
+}
+uc_block_t;
+
+/* Return the block a character belongs to.  */
+extern const uc_block_t *
+       uc_block (ucs4_t uc);
+
+/* Test whether a Unicode character belongs to a given block.  */
+extern bool
+       uc_is_block (ucs4_t uc, const uc_block_t *block);
+
+/* Get the list of all blocks.  */
+extern void
+       uc_all_blocks (const uc_block_t **blocks, size_t *count);
+
+/* ========================================================================= */
+
+/* Properties taken from language standards.  */
+
+/* Test whether a Unicode character is considered whitespace in ISO C 99.  */
+extern bool
+       uc_is_c_whitespace (ucs4_t uc);
+
+/* Test whether a Unicode character is considered whitespace in Java.  */
+extern bool
+       uc_is_java_whitespace (ucs4_t uc);
+
+enum
+{
+  UC_IDENTIFIER_START,    /* valid as first or subsequent character */
+  UC_IDENTIFIER_VALID,    /* valid as subsequent character only */
+  UC_IDENTIFIER_INVALID,  /* not valid */
+  UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */
+};
+
+/* Return the categorization of a Unicode character w.r.t. the ISO C 99
+   identifier syntax.  */
+extern int
+       uc_c_ident_category (ucs4_t uc);
+
+/* Return the categorization of a Unicode character w.r.t. the Java
+   identifier syntax.  */
+extern int
+       uc_java_ident_category (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Like ISO C <ctype.h> and <wctype.h>.  These functions are deprecated,
+   because this set of functions was designed with ASCII in mind and cannot
+   reflect the more diverse reality of the Unicode character set.  But they
+   can be a quick-and-dirty porting aid when migrating from wchar_t APIs
+   to Unicode strings.  */
+
+/* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true.  */
+extern bool
+       uc_is_alnum (ucs4_t uc);
+
+/* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true,
+   or any character that is one of a locale-specific set of characters for
+   which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space'
+   is true.  */
+extern bool
+       uc_is_alpha (ucs4_t uc);
+
+/* Test for any control character.  */
+extern bool
+       uc_is_cntrl (ucs4_t uc);
+
+/* Test for any character that corresponds to a decimal-digit character.  */
+extern bool
+       uc_is_digit (ucs4_t uc);
+
+/* Test for any character for which 'uc_is_print' is true and 'uc_is_space'
+   is false.  */
+extern bool
+       uc_is_graph (ucs4_t uc);
+
+/* Test for any character that corresponds to a lowercase letter or is one
+   of a locale-specific set of characters for which none of 'uc_is_cntrl',
+   'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true.  */
+extern bool
+       uc_is_lower (ucs4_t uc);
+
+/* Test for any printing character.  */
+extern bool
+       uc_is_print (ucs4_t uc);
+
+/* Test for any printing character that is one of a locale-specific set of
+   characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true.  */
+extern bool
+       uc_is_punct (ucs4_t uc);
+
+/* Test for any character that corresponds to a locale-specific set of
+   characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct'
+   is true.  */
+extern bool
+       uc_is_space (ucs4_t uc);
+
+/* Test for any character that corresponds to an uppercase letter or is one
+   of a locale-specific set of character for which none of 'uc_is_cntrl',
+   'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true.  */
+extern bool
+       uc_is_upper (ucs4_t uc);
+
+/* Test for any character that corresponds to a hexadecimal-digit
+   character.  */
+extern bool
+       uc_is_xdigit (ucs4_t uc);
+
+/* GNU extension. */
+/* Test for any character that corresponds to a standard blank character or
+   a locale-specific set of characters for which 'uc_is_alnum' is false.  */
+extern bool
+       uc_is_blank (ucs4_t uc);
+
+/* ========================================================================= */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNICTYPE_H */
deleted file mode 100644
--- a/lib/unilbrk.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Line breaking of Unicode strings.
-   Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2001.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNILBRK_H
-#define _UNILBRK_H
-
-/* Get size_t.  */
-#include <stddef.h>
-
-#include "unitypes.h"
-
-/* Get locale_charset() declaration.  */
-#include "localcharset.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* These functions are locale dependent.  The encoding argument identifies
-   the encoding (e.g. "ISO-8859-2" for Polish).  */
-
-
-/* Line breaking.  */
-
-enum
-{
-  UC_BREAK_UNDEFINED,
-  UC_BREAK_PROHIBITED,
-  UC_BREAK_POSSIBLE,
-  UC_BREAK_MANDATORY,
-  UC_BREAK_HYPHENATION
-};
-
-/* Determine the line break points in S, and store the result at p[0..n-1].
-   p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character.
-   p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between
-          s[i-1] and s[i].
-   p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be
-          inserted between s[i-1] and s[i].  But beware of language dependent
-          hyphenation rules.
-   p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separated.
- */
-extern void
-       u8_possible_linebreaks (const uint8_t *s, size_t n,
-                               const char *encoding, char *p);
-extern void
-       u16_possible_linebreaks (const uint16_t *s, size_t n,
-                                const char *encoding, char *p);
-extern void
-       u32_possible_linebreaks (const uint32_t *s, size_t n,
-                                const char *encoding, char *p);
-extern void
-       ulc_possible_linebreaks (const char *s, size_t n,
-                                const char *encoding, char *p);
-
-/* Choose the best line breaks, assuming the uc_width function.
-   The string is s[0..n-1].  The maximum number of columns per line is given
-   as WIDTH.  The starting column of the string is given as START_COLUMN.
-   If the algorithm shall keep room after the last piece, they can be given
-   as AT_END_COLUMNS.
-   o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes
-   precedence over p[i] as returned by the *_possible_linebreaks function.
-   The given ENCODING is used for disambiguating widths in uc_width.
-   Return the column after the end of the string, and store the result at
-   p[0..n-1].
- */
-extern int
-       u8_width_linebreaks (const uint8_t *s, size_t n, int width,
-                            int start_column, int at_end_columns,
-                            const char *o, const char *encoding,
-                            char *p);
-extern int
-       u16_width_linebreaks (const uint16_t *s, size_t n, int width,
-                             int start_column, int at_end_columns,
-                             const char *o, const char *encoding,
-                             char *p);
-extern int
-       u32_width_linebreaks (const uint32_t *s, size_t n, int width,
-                             int start_column, int at_end_columns,
-                             const char *o, const char *encoding,
-                             char *p);
-extern int
-       ulc_width_linebreaks (const char *s, size_t n, int width,
-                             int start_column, int at_end_columns,
-                             const char *o, const char *encoding,
-                             char *p);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _UNILBRK_H */
new file mode 100644
--- /dev/null
+++ b/lib/unilbrk.in.h
@@ -0,0 +1,110 @@
+/* Line breaking of Unicode strings.
+   Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNILBRK_H
+#define _UNILBRK_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#include "unitypes.h"
+
+/* Get locale_charset() declaration.  */
+#include "localcharset.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* These functions are locale dependent.  The encoding argument identifies
+   the encoding (e.g. "ISO-8859-2" for Polish).  */
+
+
+/* Line breaking.  */
+
+enum
+{
+  UC_BREAK_UNDEFINED,
+  UC_BREAK_PROHIBITED,
+  UC_BREAK_POSSIBLE,
+  UC_BREAK_MANDATORY,
+  UC_BREAK_HYPHENATION
+};
+
+/* Determine the line break points in S, and store the result at p[0..n-1].
+   p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character.
+   p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between
+          s[i-1] and s[i].
+   p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be
+          inserted between s[i-1] and s[i].  But beware of language dependent
+          hyphenation rules.
+   p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separated.
+ */
+extern void
+       u8_possible_linebreaks (const uint8_t *s, size_t n,
+                               const char *encoding, char *p);
+extern void
+       u16_possible_linebreaks (const uint16_t *s, size_t n,
+                                const char *encoding, char *p);
+extern void
+       u32_possible_linebreaks (const uint32_t *s, size_t n,
+                                const char *encoding, char *p);
+extern void
+       ulc_possible_linebreaks (const char *s, size_t n,
+                                const char *encoding, char *p);
+
+/* Choose the best line breaks, assuming the uc_width function.
+   The string is s[0..n-1].  The maximum number of columns per line is given
+   as WIDTH.  The starting column of the string is given as START_COLUMN.
+   If the algorithm shall keep room after the last piece, they can be given
+   as AT_END_COLUMNS.
+   o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes
+   precedence over p[i] as returned by the *_possible_linebreaks function.
+   The given ENCODING is used for disambiguating widths in uc_width.
+   Return the column after the end of the string, and store the result at
+   p[0..n-1].
+ */
+extern int
+       u8_width_linebreaks (const uint8_t *s, size_t n, int width,
+                            int start_column, int at_end_columns,
+                            const char *o, const char *encoding,
+                            char *p);
+extern int
+       u16_width_linebreaks (const uint16_t *s, size_t n, int width,
+                             int start_column, int at_end_columns,
+                             const char *o, const char *encoding,
+                             char *p);
+extern int
+       u32_width_linebreaks (const uint32_t *s, size_t n, int width,
+                             int start_column, int at_end_columns,
+                             const char *o, const char *encoding,
+                             char *p);
+extern int
+       ulc_width_linebreaks (const char *s, size_t n, int width,
+                             int start_column, int at_end_columns,
+                             const char *o, const char *encoding,
+                             char *p);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _UNILBRK_H */
deleted file mode 100644
--- a/lib/uniname.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Association between Unicode characters and their names.
-   Copyright (C) 2000-2002, 2005, 2007, 2009-2010 Free Software Foundation,
-   Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNINAME_H
-#define _UNINAME_H
-
-#include "unitypes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Required size of buffer for a Unicode character name.  */
-#define UNINAME_MAX 256
-
-/* Looks up the name of a Unicode character, in uppercase ASCII.
-   Returns the filled buf, or NULL if the character does not have a name.  */
-extern char *
-       unicode_character_name (ucs4_t uc, char *buf);
-
-/* Looks up the Unicode character with a given name, in upper- or lowercase
-   ASCII.  Returns the character if found, or UNINAME_INVALID if not found.  */
-extern ucs4_t
-       unicode_name_character (const char *name);
-#define UNINAME_INVALID ((ucs4_t) 0xFFFF)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNINAME_H */
new file mode 100644
--- /dev/null
+++ b/lib/uniname.in.h
@@ -0,0 +1,45 @@
+/* Association between Unicode characters and their names.
+   Copyright (C) 2000-2002, 2005, 2007, 2009-2010 Free Software Foundation,
+   Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNINAME_H
+#define _UNINAME_H
+
+#include "unitypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Required size of buffer for a Unicode character name.  */
+#define UNINAME_MAX 256
+
+/* Looks up the name of a Unicode character, in uppercase ASCII.
+   Returns the filled buf, or NULL if the character does not have a name.  */
+extern char *
+       unicode_character_name (ucs4_t uc, char *buf);
+
+/* Looks up the Unicode character with a given name, in upper- or lowercase
+   ASCII.  Returns the character if found, or UNINAME_INVALID if not found.  */
+extern ucs4_t
+       unicode_name_character (const char *name);
+#define UNINAME_INVALID ((ucs4_t) 0xFFFF)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNINAME_H */
deleted file mode 100644
--- a/lib/uninorm.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/* Normalization forms (composition and decomposition) of Unicode strings.
-   Copyright (C) 2001-2002, 2009-2010 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2009.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNINORM_H
-#define _UNINORM_H
-
-/* Get size_t.  */
-#include <stddef.h>
-
-#include "unitypes.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Conventions:
-
-   All functions prefixed with u8_ operate on UTF-8 encoded strings.
-   Their unit is an uint8_t (1 byte).
-
-   All functions prefixed with u16_ operate on UTF-16 encoded strings.
-   Their unit is an uint16_t (a 2-byte word).
-
-   All functions prefixed with u32_ operate on UCS-4 encoded strings.
-   Their unit is an uint32_t (a 4-byte word).
-
-   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
-   n units.
-
-   Functions returning a string result take a (resultbuf, lengthp) argument
-   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
-   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
-   allocated string is returned.  In both cases, *lengthp is set to the
-   length (number of units) of the returned string.  In case of error,
-   NULL is returned and errno is set.  */
-
-
-enum
-{
-  UC_DECOMP_CANONICAL,/*            Canonical decomposition.                  */
-  UC_DECOMP_FONT,    /*   <font>    A font variant (e.g. a blackletter form). */
-  UC_DECOMP_NOBREAK, /* <noBreak>   A no-break version of a space or hyphen.  */
-  UC_DECOMP_INITIAL, /* <initial>   An initial presentation form (Arabic).    */
-  UC_DECOMP_MEDIAL,  /*  <medial>   A medial presentation form (Arabic).      */
-  UC_DECOMP_FINAL,   /*  <final>    A final presentation form (Arabic).       */
-  UC_DECOMP_ISOLATED,/* <isolated>  An isolated presentation form (Arabic).   */
-  UC_DECOMP_CIRCLE,  /*  <circle>   An encircled form.                        */
-  UC_DECOMP_SUPER,   /*  <super>    A superscript form.                       */
-  UC_DECOMP_SUB,     /*   <sub>     A subscript form.                         */
-  UC_DECOMP_VERTICAL,/* <vertical>  A vertical layout presentation form.      */
-  UC_DECOMP_WIDE,    /*   <wide>    A wide (or zenkaku) compatibility character. */
-  UC_DECOMP_NARROW,  /*  <narrow>   A narrow (or hankaku) compatibility character. */
-  UC_DECOMP_SMALL,   /*  <small>    A small variant form (CNS compatibility). */
-  UC_DECOMP_SQUARE,  /*  <square>   A CJK squared font variant.               */
-  UC_DECOMP_FRACTION,/* <fraction>  A vulgar fraction form.                   */
-  UC_DECOMP_COMPAT   /*  <compat>   Otherwise unspecified compatibility character. */
-};
-
-/* Maximum size of decomposition of a single Unicode character.  */
-#define UC_DECOMPOSITION_MAX_LENGTH 32
-
-/* Return the character decomposition mapping of a Unicode character.
-   DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH
-   ucs_t elements.
-   When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are
-   filled and N is returned.  Otherwise -1 is returned.  */
-extern int
-       uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition);
-
-/* Return the canonical character decomposition mapping of a Unicode character.
-   DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH
-   ucs_t elements.
-   When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is
-   returned.  Otherwise -1 is returned.  */
-extern int
-       uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition);
-
-
-/* Attempt to combine the Unicode characters uc1, uc2.
-   uc1 is known to have canonical combining class 0.
-   Return the combination of uc1 and uc2, if it exists.
-   Return 0 otherwise.
-   Not all decompositions can be recombined using this function.  See the
-   Unicode file CompositionExclusions.txt for details.  */
-extern ucs4_t
-       uc_composition (ucs4_t uc1, ucs4_t uc2);
-
-
-/* An object of type uninorm_t denotes a Unicode normalization form.  */
-struct unicode_normalization_form;
-typedef const struct unicode_normalization_form *uninorm_t;
-
-/* UNINORM_NFD: Normalization form D: canonical decomposition.  */
-extern const struct unicode_normalization_form uninorm_nfd;
-#define UNINORM_NFD (&uninorm_nfd)
-
-/* UNINORM_NFC: Normalization form C: canonical decomposition, then
-   canonical composition.  */
-extern const struct unicode_normalization_form uninorm_nfc;
-#define UNINORM_NFC (&uninorm_nfc)
-
-/* UNINORM_NFKD: Normalization form KD: compatibility decomposition.  */
-extern const struct unicode_normalization_form uninorm_nfkd;
-#define UNINORM_NFKD (&uninorm_nfkd)
-
-/* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then
-   canonical composition.  */
-extern const struct unicode_normalization_form uninorm_nfkc;
-#define UNINORM_NFKC (&uninorm_nfkc)
-
-/* Test whether a normalization form does compatibility decomposition.  */
-#define uninorm_is_compat_decomposing(nf) \
-  ((* (const unsigned int *) (nf) >> 0) & 1)
-
-/* Test whether a normalization form includes canonical composition.  */
-#define uninorm_is_composing(nf) \
-  ((* (const unsigned int *) (nf) >> 1) & 1)
-
-/* Return the decomposing variant of a normalization form.
-   This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD.  */
-extern uninorm_t uninorm_decomposing_form (uninorm_t nf);
-
-
-/* Return the specified normalization form of a string.  */
-extern uint8_t *
-       u8_normalize (uninorm_t nf, const uint8_t *s, size_t n,
-                     uint8_t *resultbuf, size_t *lengthp);
-extern uint16_t *
-       u16_normalize (uninorm_t nf, const uint16_t *s, size_t n,
-                      uint16_t *resultbuf, size_t *lengthp);
-extern uint32_t *
-       u32_normalize (uninorm_t nf, const uint32_t *s, size_t n,
-                      uint32_t *resultbuf, size_t *lengthp);
-
-
-/* Compare S1 and S2, ignoring differences in normalization.
-   NF must be either UNINORM_NFD or UNINORM_NFKD.
-   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
-   return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2,
-                   uninorm_t nf, int *resultp);
-extern int
-       u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2,
-                    uninorm_t nf, int *resultp);
-extern int
-       u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2,
-                    uninorm_t nf, int *resultp);
-
-
-/* Converts the string S of length N to a NUL-terminated byte sequence, in such
-   a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is
-   equivalent to comparing S1 and S2 with uN_normcoll().
-   NF must be either UNINORM_NFC or UNINORM_NFKC.  */
-extern char *
-       u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf,
-                    char *resultbuf, size_t *lengthp);
-extern char *
-       u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf,
-                     char *resultbuf, size_t *lengthp);
-extern char *
-       u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf,
-                     char *resultbuf, size_t *lengthp);
-
-
-/* Compare S1 and S2, ignoring differences in normalization, using the
-   collation rules of the current locale.
-   NF must be either UNINORM_NFC or UNINORM_NFKC.
-   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
-   return 0.  Upon failure, return -1 with errno set.  */
-extern int
-       u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2,
-                    uninorm_t nf, int *resultp);
-extern int
-       u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2,
-                     uninorm_t nf, int *resultp);
-extern int
-       u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2,
-                     uninorm_t nf, int *resultp);
-
-
-/* Normalization of a stream of Unicode characters.
-
-   A "stream of Unicode characters" is essentially a function that accepts an
-   ucs4_t argument repeatedly, optionally combined with a function that
-   "flushes" the stream.  */
-
-/* Data type of a stream of Unicode characters that normalizes its input
-   according to a given normalization form and passes the normalized character
-   sequence to the encapsulated stream of Unicode characters.  */
-struct uninorm_filter;
-
-/* Create and return a normalization filter for Unicode characters.
-   The pair (stream_func, stream_data) is the encapsulated stream.
-   stream_func (stream_data, uc) receives the Unicode character uc
-   and returns 0 if successful, or -1 with errno set upon failure.
-   Return the new filter, or NULL with errno set upon failure.  */
-extern struct uninorm_filter *
-       uninorm_filter_create (uninorm_t nf,
-                              int (*stream_func) (void *stream_data, ucs4_t uc),
-                              void *stream_data);
-
-/* Stuff a Unicode character into a normalizing filter.
-   Return 0 if successful, or -1 with errno set upon failure.  */
-extern int
-       uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc);
-
-/* Bring data buffered in the filter to its destination, the encapsulated
-   stream.
-   Return 0 if successful, or -1 with errno set upon failure.
-   Note! If after calling this function, additional characters are written
-   into the filter, the resulting character sequence in the encapsulated stream
-   will not necessarily be normalized.  */
-extern int
-       uninorm_filter_flush (struct uninorm_filter *filter);
-
-/* Bring data buffered in the filter to its destination, the encapsulated
-   stream, then close and free the filter.
-   Return 0 if successful, or -1 with errno set upon failure.  */
-extern int
-       uninorm_filter_free (struct uninorm_filter *filter);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _UNINORM_H */
new file mode 100644
--- /dev/null
+++ b/lib/uninorm.in.h
@@ -0,0 +1,245 @@
+/* Normalization forms (composition and decomposition) of Unicode strings.
+   Copyright (C) 2001-2002, 2009-2010 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNINORM_H
+#define _UNINORM_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#include "unitypes.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Conventions:
+
+   All functions prefixed with u8_ operate on UTF-8 encoded strings.
+   Their unit is an uint8_t (1 byte).
+
+   All functions prefixed with u16_ operate on UTF-16 encoded strings.
+   Their unit is an uint16_t (a 2-byte word).
+
+   All functions prefixed with u32_ operate on UCS-4 encoded strings.
+   Their unit is an uint32_t (a 4-byte word).
+
+   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
+   n units.
+
+   Functions returning a string result take a (resultbuf, lengthp) argument
+   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
+   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
+   allocated string is returned.  In both cases, *lengthp is set to the
+   length (number of units) of the returned string.  In case of error,
+   NULL is returned and errno is set.  */
+
+
+enum
+{
+  UC_DECOMP_CANONICAL,/*            Canonical decomposition.                  */
+  UC_DECOMP_FONT,    /*   <font>    A font variant (e.g. a blackletter form). */
+  UC_DECOMP_NOBREAK, /* <noBreak>   A no-break version of a space or hyphen.  */
+  UC_DECOMP_INITIAL, /* <initial>   An initial presentation form (Arabic).    */
+  UC_DECOMP_MEDIAL,  /*  <medial>   A medial presentation form (Arabic).      */
+  UC_DECOMP_FINAL,   /*  <final>    A final presentation form (Arabic).       */
+  UC_DECOMP_ISOLATED,/* <isolated>  An isolated presentation form (Arabic).   */
+  UC_DECOMP_CIRCLE,  /*  <circle>   An encircled form.                        */
+  UC_DECOMP_SUPER,   /*  <super>    A superscript form.                       */
+  UC_DECOMP_SUB,     /*   <sub>     A subscript form.                         */
+  UC_DECOMP_VERTICAL,/* <vertical>  A vertical layout presentation form.      */
+  UC_DECOMP_WIDE,    /*   <wide>    A wide (or zenkaku) compatibility character. */
+  UC_DECOMP_NARROW,  /*  <narrow>   A narrow (or hankaku) compatibility character. */
+  UC_DECOMP_SMALL,   /*  <small>    A small variant form (CNS compatibility). */
+  UC_DECOMP_SQUARE,  /*  <square>   A CJK squared font variant.               */
+  UC_DECOMP_FRACTION,/* <fraction>  A vulgar fraction form.                   */
+  UC_DECOMP_COMPAT   /*  <compat>   Otherwise unspecified compatibility character. */
+};
+
+/* Maximum size of decomposition of a single Unicode character.  */
+#define UC_DECOMPOSITION_MAX_LENGTH 32
+
+/* Return the character decomposition mapping of a Unicode character.
+   DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH
+   ucs_t elements.
+   When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are
+   filled and N is returned.  Otherwise -1 is returned.  */
+extern int
+       uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition);
+
+/* Return the canonical character decomposition mapping of a Unicode character.
+   DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH
+   ucs_t elements.
+   When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is
+   returned.  Otherwise -1 is returned.  */
+extern int
+       uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition);
+
+
+/* Attempt to combine the Unicode characters uc1, uc2.
+   uc1 is known to have canonical combining class 0.
+   Return the combination of uc1 and uc2, if it exists.
+   Return 0 otherwise.
+   Not all decompositions can be recombined using this function.  See the
+   Unicode file CompositionExclusions.txt for details.  */
+extern ucs4_t
+       uc_composition (ucs4_t uc1, ucs4_t uc2);
+
+
+/* An object of type uninorm_t denotes a Unicode normalization form.  */
+struct unicode_normalization_form;
+typedef const struct unicode_normalization_form *uninorm_t;
+
+/* UNINORM_NFD: Normalization form D: canonical decomposition.  */
+extern const struct unicode_normalization_form uninorm_nfd;
+#define UNINORM_NFD (&uninorm_nfd)
+
+/* UNINORM_NFC: Normalization form C: canonical decomposition, then
+   canonical composition.  */
+extern const struct unicode_normalization_form uninorm_nfc;
+#define UNINORM_NFC (&uninorm_nfc)
+
+/* UNINORM_NFKD: Normalization form KD: compatibility decomposition.  */
+extern const struct unicode_normalization_form uninorm_nfkd;
+#define UNINORM_NFKD (&uninorm_nfkd)
+
+/* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then
+   canonical composition.  */
+extern const struct unicode_normalization_form uninorm_nfkc;
+#define UNINORM_NFKC (&uninorm_nfkc)
+
+/* Test whether a normalization form does compatibility decomposition.  */
+#define uninorm_is_compat_decomposing(nf) \
+  ((* (const unsigned int *) (nf) >> 0) & 1)
+
+/* Test whether a normalization form includes canonical composition.  */
+#define uninorm_is_composing(nf) \
+  ((* (const unsigned int *) (nf) >> 1) & 1)
+
+/* Return the decomposing variant of a normalization form.
+   This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD.  */
+extern uninorm_t uninorm_decomposing_form (uninorm_t nf);
+
+
+/* Return the specified normalization form of a string.  */
+extern uint8_t *
+       u8_normalize (uninorm_t nf, const uint8_t *s, size_t n,
+                     uint8_t *resultbuf, size_t *lengthp);
+extern uint16_t *
+       u16_normalize (uninorm_t nf, const uint16_t *s, size_t n,
+                      uint16_t *resultbuf, size_t *lengthp);
+extern uint32_t *
+       u32_normalize (uninorm_t nf, const uint32_t *s, size_t n,
+                      uint32_t *resultbuf, size_t *lengthp);
+
+
+/* Compare S1 and S2, ignoring differences in normalization.
+   NF must be either UNINORM_NFD or UNINORM_NFKD.
+   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
+   return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2,
+                   uninorm_t nf, int *resultp);
+extern int
+       u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2,
+                    uninorm_t nf, int *resultp);
+extern int
+       u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2,
+                    uninorm_t nf, int *resultp);
+
+
+/* Converts the string S of length N to a NUL-terminated byte sequence, in such
+   a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is
+   equivalent to comparing S1 and S2 with uN_normcoll().
+   NF must be either UNINORM_NFC or UNINORM_NFKC.  */
+extern char *
+       u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf,
+                    char *resultbuf, size_t *lengthp);
+extern char *
+       u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf,
+                     char *resultbuf, size_t *lengthp);
+extern char *
+       u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf,
+                     char *resultbuf, size_t *lengthp);
+
+
+/* Compare S1 and S2, ignoring differences in normalization, using the
+   collation rules of the current locale.
+   NF must be either UNINORM_NFC or UNINORM_NFKC.
+   If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and
+   return 0.  Upon failure, return -1 with errno set.  */
+extern int
+       u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2,
+                    uninorm_t nf, int *resultp);
+extern int
+       u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2,
+                     uninorm_t nf, int *resultp);
+extern int
+       u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2,
+                     uninorm_t nf, int *resultp);
+
+
+/* Normalization of a stream of Unicode characters.
+
+   A "stream of Unicode characters" is essentially a function that accepts an
+   ucs4_t argument repeatedly, optionally combined with a function that
+   "flushes" the stream.  */
+
+/* Data type of a stream of Unicode characters that normalizes its input
+   according to a given normalization form and passes the normalized character
+   sequence to the encapsulated stream of Unicode characters.  */
+struct uninorm_filter;
+
+/* Create and return a normalization filter for Unicode characters.
+   The pair (stream_func, stream_data) is the encapsulated stream.
+   stream_func (stream_data, uc) receives the Unicode character uc
+   and returns 0 if successful, or -1 with errno set upon failure.
+   Return the new filter, or NULL with errno set upon failure.  */
+extern struct uninorm_filter *
+       uninorm_filter_create (uninorm_t nf,
+                              int (*stream_func) (void *stream_data, ucs4_t uc),
+                              void *stream_data);
+
+/* Stuff a Unicode character into a normalizing filter.
+   Return 0 if successful, or -1 with errno set upon failure.  */
+extern int
+       uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc);
+
+/* Bring data buffered in the filter to its destination, the encapsulated
+   stream.
+   Return 0 if successful, or -1 with errno set upon failure.
+   Note! If after calling this function, additional characters are written
+   into the filter, the resulting character sequence in the encapsulated stream
+   will not necessarily be normalized.  */
+extern int
+       uninorm_filter_flush (struct uninorm_filter *filter);
+
+/* Bring data buffered in the filter to its destination, the encapsulated
+   stream, then close and free the filter.
+   Return 0 if successful, or -1 with errno set upon failure.  */
+extern int
+       uninorm_filter_free (struct uninorm_filter *filter);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _UNINORM_H */
deleted file mode 100644
--- a/lib/unistdio.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Elementary Unicode string functions.
-   Copyright (C) 2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNISTDIO_H
-#define _UNISTDIO_H
-
-#include "unitypes.h"
-
-/* Get size_t.  */
-#include <stddef.h>
-
-/* Get FILE.  */
-#include <stdio.h>
-
-/* Get va_list.  */
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* These work like the printf function family.
-   In the format string:
-   The format directive 'U' takes an UTF-8 string (const uint8_t *).
-   The format directive 'lU' takes an UTF-16 string (const uint16_t *).
-   The format directive 'llU' takes an UTF-32 string (const uint32_t *).
-
-   The prefix (ulc_, u8_, u16_, u16_) indicates the type of the resulting
-   string.  The prefix 'ulc' stands for "locale encoded".
-
-   An infix 'v' indicates that a va_list is passed instead of multiple
-   arguments.
-
-   The functions *sprintf have a 'buf' argument that is assumed to be large
-   enough.  (DANGEROUS!  Overflowing the buffer will crash the program.)
-   The functions *snprintf have a 'buf' argument that is assumed to be 'size'
-   units large.  (DANGEROUS!  The resulting string might be truncated in the
-   middle of a multibyte character.)
-   The functions *asprintf have a 'resultp' argument.  The result will be
-   freshly allocated and stored in *resultp.
-   The functions *asnprintf have a (resultbuf, lengthp) argument pair.  If
-   resultbuf is not NULL and the result fits into *lengthp units, it is put
-   in resultbuf, and resultbuf is returned.  Otherwise, a freshly allocated
-   string is returned.  In both cases, *lengthp is set to the length (number
-   of units) of the returned string.  In case of error, NULL is returned and
-   errno is set.
- */
-
-/* ASCII format string, result in locale dependent encoded 'char *'.  */
-extern int
-       ulc_sprintf (char *buf,
-                    const char *format, ...);
-extern int
-       ulc_snprintf (char *buf, size_t size,
-                     const char *format, ...);
-extern int
-       ulc_asprintf (char **resultp,
-                     const char *format, ...);
-extern char *
-       ulc_asnprintf (char *resultbuf, size_t *lengthp,
-                      const char *format, ...);
-extern int
-       ulc_vsprintf (char *buf,
-                     const char *format, va_list ap);
-extern int
-       ulc_vsnprintf (char *buf, size_t size,
-                      const char *format, va_list ap);
-extern int
-       ulc_vasprintf (char **resultp,
-                      const char *format, va_list ap);
-extern char *
-       ulc_vasnprintf (char *resultbuf, size_t *lengthp,
-                       const char *format, va_list ap);
-
-/* ASCII format string, result in UTF-8 format.  */
-extern int
-       u8_sprintf (uint8_t *buf,
-                   const char *format, ...);
-extern int
-       u8_snprintf (uint8_t *buf, size_t size,
-                    const char *format, ...);
-extern int
-       u8_asprintf (uint8_t **resultp,
-                    const char *format, ...);
-extern uint8_t *
-       u8_asnprintf (uint8_t *resultbuf, size_t *lengthp,
-                     const char *format, ...);
-extern int
-       u8_vsprintf (uint8_t *buf,
-                    const char *format, va_list ap);
-extern int
-       u8_vsnprintf (uint8_t *buf, size_t size,
-                     const char *format, va_list ap);
-extern int
-       u8_vasprintf (uint8_t **resultp,
-                     const char *format, va_list ap);
-extern uint8_t *
-       u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp,
-                      const char *format, va_list ap);
-
-/* UTF-8 format string, result in UTF-8 format.  */
-extern int
-       u8_u8_sprintf (uint8_t *buf,
-                      const uint8_t *format, ...);
-extern int
-       u8_u8_snprintf (uint8_t *buf, size_t size,
-                       const uint8_t *format, ...);
-extern int
-       u8_u8_asprintf (uint8_t **resultp,
-                       const uint8_t *format, ...);
-extern uint8_t *
-       u8_u8_asnprintf (uint8_t *resultbuf, size_t *lengthp,
-                        const uint8_t *format, ...);
-extern int
-       u8_u8_vsprintf (uint8_t *buf,
-                       const uint8_t *format, va_list ap);
-extern int
-       u8_u8_vsnprintf (uint8_t *buf, size_t size,
-                        const uint8_t *format, va_list ap);
-extern int
-       u8_u8_vasprintf (uint8_t **resultp,
-                        const uint8_t *format, va_list ap);
-extern uint8_t *
-       u8_u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp,
-                         const uint8_t *format, va_list ap);
-
-/* ASCII format string, result in UTF-16 format.  */
-extern int
-       u16_sprintf (uint16_t *buf,
-                    const char *format, ...);
-extern int
-       u16_snprintf (uint16_t *buf, size_t size,
-                     const char *format, ...);
-extern int
-       u16_asprintf (uint16_t **resultp,
-                     const char *format, ...);
-extern uint16_t *
-       u16_asnprintf (uint16_t *resultbuf, size_t *lengthp,
-                      const char *format, ...);
-extern int
-       u16_vsprintf (uint16_t *buf,
-                     const char *format, va_list ap);
-extern int
-       u16_vsnprintf (uint16_t *buf, size_t size,
-                      const char *format, va_list ap);
-extern int
-       u16_vasprintf (uint16_t **resultp,
-                      const char *format, va_list ap);
-extern uint16_t *
-       u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp,
-                       const char *format, va_list ap);
-
-/* UTF-16 format string, result in UTF-16 format.  */
-extern int
-       u16_u16_sprintf (uint16_t *buf,
-                        const uint16_t *format, ...);
-extern int
-       u16_u16_snprintf (uint16_t *buf, size_t size,
-                         const uint16_t *format, ...);
-extern int
-       u16_u16_asprintf (uint16_t **resultp,
-                         const uint16_t *format, ...);
-extern uint16_t *
-       u16_u16_asnprintf (uint16_t *resultbuf, size_t *lengthp,
-                          const uint16_t *format, ...);
-extern int
-       u16_u16_vsprintf (uint16_t *buf,
-                         const uint16_t *format, va_list ap);
-extern int
-       u16_u16_vsnprintf (uint16_t *buf, size_t size,
-                          const uint16_t *format, va_list ap);
-extern int
-       u16_u16_vasprintf (uint16_t **resultp,
-                          const uint16_t *format, va_list ap);
-extern uint16_t *
-       u16_u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp,
-                           const uint16_t *format, va_list ap);
-
-/* ASCII format string, result in UTF-32 format.  */
-extern int
-       u32_sprintf (uint32_t *buf,
-                    const char *format, ...);
-extern int
-       u32_snprintf (uint32_t *buf, size_t size,
-                     const char *format, ...);
-extern int
-       u32_asprintf (uint32_t **resultp,
-                     const char *format, ...);
-extern uint32_t *
-       u32_asnprintf (uint32_t *resultbuf, size_t *lengthp,
-                      const char *format, ...);
-extern int
-       u32_vsprintf (uint32_t *buf,
-                     const char *format, va_list ap);
-extern int
-       u32_vsnprintf (uint32_t *buf, size_t size,
-                      const char *format, va_list ap);
-extern int
-       u32_vasprintf (uint32_t **resultp,
-                      const char *format, va_list ap);
-extern uint32_t *
-       u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp,
-                       const char *format, va_list ap);
-
-/* UTF-32 format string, result in UTF-32 format.  */
-extern int
-       u32_u32_sprintf (uint32_t *buf,
-                        const uint32_t *format, ...);
-extern int
-       u32_u32_snprintf (uint32_t *buf, size_t size,
-                         const uint32_t *format, ...);
-extern int
-       u32_u32_asprintf (uint32_t **resultp,
-                         const uint32_t *format, ...);
-extern uint32_t *
-       u32_u32_asnprintf (uint32_t *resultbuf, size_t *lengthp,
-                          const uint32_t *format, ...);
-extern int
-       u32_u32_vsprintf (uint32_t *buf,
-                         const uint32_t *format, va_list ap);
-extern int
-       u32_u32_vsnprintf (uint32_t *buf, size_t size,
-                          const uint32_t *format, va_list ap);
-extern int
-       u32_u32_vasprintf (uint32_t **resultp,
-                          const uint32_t *format, va_list ap);
-extern uint32_t *
-       u32_u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp,
-                           const uint32_t *format, va_list ap);
-
-/* ASCII format string, output to FILE in locale dependent encoding.  */
-extern int
-       ulc_fprintf (FILE *stream,
-                    const char *format, ...);
-extern int
-       ulc_vfprintf (FILE *stream,
-                     const char *format, va_list ap);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNISTDIO_H */
new file mode 100644
--- /dev/null
+++ b/lib/unistdio.in.h
@@ -0,0 +1,256 @@
+/* Elementary Unicode string functions.
+   Copyright (C) 2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNISTDIO_H
+#define _UNISTDIO_H
+
+#include "unitypes.h"
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get FILE.  */
+#include <stdio.h>
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These work like the printf function family.
+   In the format string:
+   The format directive 'U' takes an UTF-8 string (const uint8_t *).
+   The format directive 'lU' takes an UTF-16 string (const uint16_t *).
+   The format directive 'llU' takes an UTF-32 string (const uint32_t *).
+
+   The prefix (ulc_, u8_, u16_, u16_) indicates the type of the resulting
+   string.  The prefix 'ulc' stands for "locale encoded".
+
+   An infix 'v' indicates that a va_list is passed instead of multiple
+   arguments.
+
+   The functions *sprintf have a 'buf' argument that is assumed to be large
+   enough.  (DANGEROUS!  Overflowing the buffer will crash the program.)
+   The functions *snprintf have a 'buf' argument that is assumed to be 'size'
+   units large.  (DANGEROUS!  The resulting string might be truncated in the
+   middle of a multibyte character.)
+   The functions *asprintf have a 'resultp' argument.  The result will be
+   freshly allocated and stored in *resultp.
+   The functions *asnprintf have a (resultbuf, lengthp) argument pair.  If
+   resultbuf is not NULL and the result fits into *lengthp units, it is put
+   in resultbuf, and resultbuf is returned.  Otherwise, a freshly allocated
+   string is returned.  In both cases, *lengthp is set to the length (number
+   of units) of the returned string.  In case of error, NULL is returned and
+   errno is set.
+ */
+
+/* ASCII format string, result in locale dependent encoded 'char *'.  */
+extern int
+       ulc_sprintf (char *buf,
+                    const char *format, ...);
+extern int
+       ulc_snprintf (char *buf, size_t size,
+                     const char *format, ...);
+extern int
+       ulc_asprintf (char **resultp,
+                     const char *format, ...);
+extern char *
+       ulc_asnprintf (char *resultbuf, size_t *lengthp,
+                      const char *format, ...);
+extern int
+       ulc_vsprintf (char *buf,
+                     const char *format, va_list ap);
+extern int
+       ulc_vsnprintf (char *buf, size_t size,
+                      const char *format, va_list ap);
+extern int
+       ulc_vasprintf (char **resultp,
+                      const char *format, va_list ap);
+extern char *
+       ulc_vasnprintf (char *resultbuf, size_t *lengthp,
+                       const char *format, va_list ap);
+
+/* ASCII format string, result in UTF-8 format.  */
+extern int
+       u8_sprintf (uint8_t *buf,
+                   const char *format, ...);
+extern int
+       u8_snprintf (uint8_t *buf, size_t size,
+                    const char *format, ...);
+extern int
+       u8_asprintf (uint8_t **resultp,
+                    const char *format, ...);
+extern uint8_t *
+       u8_asnprintf (uint8_t *resultbuf, size_t *lengthp,
+                     const char *format, ...);
+extern int
+       u8_vsprintf (uint8_t *buf,
+                    const char *format, va_list ap);
+extern int
+       u8_vsnprintf (uint8_t *buf, size_t size,
+                     const char *format, va_list ap);
+extern int
+       u8_vasprintf (uint8_t **resultp,
+                     const char *format, va_list ap);
+extern uint8_t *
+       u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp,
+                      const char *format, va_list ap);
+
+/* UTF-8 format string, result in UTF-8 format.  */
+extern int
+       u8_u8_sprintf (uint8_t *buf,
+                      const uint8_t *format, ...);
+extern int
+       u8_u8_snprintf (uint8_t *buf, size_t size,
+                       const uint8_t *format, ...);
+extern int
+       u8_u8_asprintf (uint8_t **resultp,
+                       const uint8_t *format, ...);
+extern uint8_t *
+       u8_u8_asnprintf (uint8_t *resultbuf, size_t *lengthp,
+                        const uint8_t *format, ...);
+extern int
+       u8_u8_vsprintf (uint8_t *buf,
+                       const uint8_t *format, va_list ap);
+extern int
+       u8_u8_vsnprintf (uint8_t *buf, size_t size,
+                        const uint8_t *format, va_list ap);
+extern int
+       u8_u8_vasprintf (uint8_t **resultp,
+                        const uint8_t *format, va_list ap);
+extern uint8_t *
+       u8_u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp,
+                         const uint8_t *format, va_list ap);
+
+/* ASCII format string, result in UTF-16 format.  */
+extern int
+       u16_sprintf (uint16_t *buf,
+                    const char *format, ...);
+extern int
+       u16_snprintf (uint16_t *buf, size_t size,
+                     const char *format, ...);
+extern int
+       u16_asprintf (uint16_t **resultp,
+                     const char *format, ...);
+extern uint16_t *
+       u16_asnprintf (uint16_t *resultbuf, size_t *lengthp,
+                      const char *format, ...);
+extern int
+       u16_vsprintf (uint16_t *buf,
+                     const char *format, va_list ap);
+extern int
+       u16_vsnprintf (uint16_t *buf, size_t size,
+                      const char *format, va_list ap);
+extern int
+       u16_vasprintf (uint16_t **resultp,
+                      const char *format, va_list ap);
+extern uint16_t *
+       u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp,
+                       const char *format, va_list ap);
+
+/* UTF-16 format string, result in UTF-16 format.  */
+extern int
+       u16_u16_sprintf (uint16_t *buf,
+                        const uint16_t *format, ...);
+extern int
+       u16_u16_snprintf (uint16_t *buf, size_t size,
+                         const uint16_t *format, ...);
+extern int
+       u16_u16_asprintf (uint16_t **resultp,
+                         const uint16_t *format, ...);
+extern uint16_t *
+       u16_u16_asnprintf (uint16_t *resultbuf, size_t *lengthp,
+                          const uint16_t *format, ...);
+extern int
+       u16_u16_vsprintf (uint16_t *buf,
+                         const uint16_t *format, va_list ap);
+extern int
+       u16_u16_vsnprintf (uint16_t *buf, size_t size,
+                          const uint16_t *format, va_list ap);
+extern int
+       u16_u16_vasprintf (uint16_t **resultp,
+                          const uint16_t *format, va_list ap);
+extern uint16_t *
+       u16_u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp,
+                           const uint16_t *format, va_list ap);
+
+/* ASCII format string, result in UTF-32 format.  */
+extern int
+       u32_sprintf (uint32_t *buf,
+                    const char *format, ...);
+extern int
+       u32_snprintf (uint32_t *buf, size_t size,
+                     const char *format, ...);
+extern int
+       u32_asprintf (uint32_t **resultp,
+                     const char *format, ...);
+extern uint32_t *
+       u32_asnprintf (uint32_t *resultbuf, size_t *lengthp,
+                      const char *format, ...);
+extern int
+       u32_vsprintf (uint32_t *buf,
+                     const char *format, va_list ap);
+extern int
+       u32_vsnprintf (uint32_t *buf, size_t size,
+                      const char *format, va_list ap);
+extern int
+       u32_vasprintf (uint32_t **resultp,
+                      const char *format, va_list ap);
+extern uint32_t *
+       u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp,
+                       const char *format, va_list ap);
+
+/* UTF-32 format string, result in UTF-32 format.  */
+extern int
+       u32_u32_sprintf (uint32_t *buf,
+                        const uint32_t *format, ...);
+extern int
+       u32_u32_snprintf (uint32_t *buf, size_t size,
+                         const uint32_t *format, ...);
+extern int
+       u32_u32_asprintf (uint32_t **resultp,
+                         const uint32_t *format, ...);
+extern uint32_t *
+       u32_u32_asnprintf (uint32_t *resultbuf, size_t *lengthp,
+                          const uint32_t *format, ...);
+extern int
+       u32_u32_vsprintf (uint32_t *buf,
+                         const uint32_t *format, va_list ap);
+extern int
+       u32_u32_vsnprintf (uint32_t *buf, size_t size,
+                          const uint32_t *format, va_list ap);
+extern int
+       u32_u32_vasprintf (uint32_t **resultp,
+                          const uint32_t *format, va_list ap);
+extern uint32_t *
+       u32_u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp,
+                           const uint32_t *format, va_list ap);
+
+/* ASCII format string, output to FILE in locale dependent encoding.  */
+extern int
+       ulc_fprintf (FILE *stream,
+                    const char *format, ...);
+extern int
+       ulc_vfprintf (FILE *stream,
+                     const char *format, va_list ap);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNISTDIO_H */
deleted file mode 100644
--- a/lib/unistr.h
+++ /dev/null
@@ -1,685 +0,0 @@
-/* Elementary Unicode string functions.
-   Copyright (C) 2001-2002, 2005-2010 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNISTR_H
-#define _UNISTR_H
-
-#include "unitypes.h"
-
-/* Get common macros for C.  */
-#include "unused-parameter.h"
-
-/* Get bool.  */
-#include <stdbool.h>
-
-/* Get size_t.  */
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Conventions:
-
-   All functions prefixed with u8_ operate on UTF-8 encoded strings.
-   Their unit is an uint8_t (1 byte).
-
-   All functions prefixed with u16_ operate on UTF-16 encoded strings.
-   Their unit is an uint16_t (a 2-byte word).
-
-   All functions prefixed with u32_ operate on UCS-4 encoded strings.
-   Their unit is an uint32_t (a 4-byte word).
-
-   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
-   n units.
-
-   All arguments starting with "str" and the arguments of functions starting
-   with u8_str/u16_str/u32_str denote a NUL terminated string, i.e. a string
-   which terminates at the first NUL unit.  This termination unit is
-   considered part of the string for all memory allocation purposes, but
-   is not considered part of the string for all other logical purposes.
-
-   Functions returning a string result take a (resultbuf, lengthp) argument
-   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
-   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
-   allocated string is returned.  In both cases, *lengthp is set to the
-   length (number of units) of the returned string.  In case of error,
-   NULL is returned and errno is set.  */
-
-
-/* Elementary string checks.  */
-
-/* Check whether an UTF-8 string is well-formed.
-   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
-extern const uint8_t *
-       u8_check (const uint8_t *s, size_t n);
-
-/* Check whether an UTF-16 string is well-formed.
-   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
-extern const uint16_t *
-       u16_check (const uint16_t *s, size_t n);
-
-/* Check whether an UCS-4 string is well-formed.
-   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
-extern const uint32_t *
-       u32_check (const uint32_t *s, size_t n);
-
-
-/* Elementary string conversions.  */
-
-/* Convert an UTF-8 string to an UTF-16 string.  */
-extern uint16_t *
-       u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf,
-                  size_t *lengthp);
-
-/* Convert an UTF-8 string to an UCS-4 string.  */
-extern uint32_t *
-       u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf,
-                  size_t *lengthp);
-
-/* Convert an UTF-16 string to an UTF-8 string.  */
-extern uint8_t *
-       u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf,
-                  size_t *lengthp);
-
-/* Convert an UTF-16 string to an UCS-4 string.  */
-extern uint32_t *
-       u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf,
-                   size_t *lengthp);
-
-/* Convert an UCS-4 string to an UTF-8 string.  */
-extern uint8_t *
-       u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf,
-                  size_t *lengthp);
-
-/* Convert an UCS-4 string to an UTF-16 string.  */
-extern uint16_t *
-       u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf,
-                   size_t *lengthp);
-
-
-/* Elementary string functions.  */
-
-/* Return the length (number of units) of the first character in S, which is
-   no longer than N.  Return 0 if it is the NUL character.  Return -1 upon
-   failure.  */
-/* Similar to mblen(), except that s must not be NULL.  */
-extern int
-       u8_mblen (const uint8_t *s, size_t n);
-extern int
-       u16_mblen (const uint16_t *s, size_t n);
-extern int
-       u32_mblen (const uint32_t *s, size_t n);
-
-/* Return the length (number of units) of the first character in S, putting
-   its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
-   and an appropriate number of units is returned.
-   The number of available units, N, must be > 0.  */
-/* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0,
-   and the NUL character is not treated specially.  */
-/* The variants with _safe suffix are safe, even if the library is compiled
-   without --enable-safety.  */
-
-#ifdef GNULIB_UNISTR_U8_MBTOUC_UNSAFE
-# if !HAVE_INLINE
-extern int
-       u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n);
-# else
-extern int
-       u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n);
-static inline int
-u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n)
-{
-  uint8_t c = *s;
-
-  if (c < 0x80)
-    {
-      *puc = c;
-      return 1;
-    }
-  else
-    return u8_mbtouc_unsafe_aux (puc, s, n);
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U16_MBTOUC_UNSAFE
-# if !HAVE_INLINE
-extern int
-       u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n);
-# else
-extern int
-       u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n);
-static inline int
-u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n)
-{
-  uint16_t c = *s;
-
-  if (c < 0xd800 || c >= 0xe000)
-    {
-      *puc = c;
-      return 1;
-    }
-  else
-    return u16_mbtouc_unsafe_aux (puc, s, n);
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U32_MBTOUC_UNSAFE
-# if !HAVE_INLINE
-extern int
-       u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
-# else
-static inline int
-u32_mbtouc_unsafe (ucs4_t *puc,
-                   const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
-{
-  uint32_t c = *s;
-
-#  if CONFIG_UNICODE_SAFETY
-  if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
-#  endif
-    *puc = c;
-#  if CONFIG_UNICODE_SAFETY
-  else
-    /* invalid multibyte character */
-    *puc = 0xfffd;
-#  endif
-  return 1;
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U8_MBTOUC
-# if !HAVE_INLINE
-extern int
-       u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n);
-# else
-extern int
-       u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n);
-static inline int
-u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
-{
-  uint8_t c = *s;
-
-  if (c < 0x80)
-    {
-      *puc = c;
-      return 1;
-    }
-  else
-    return u8_mbtouc_aux (puc, s, n);
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U16_MBTOUC
-# if !HAVE_INLINE
-extern int
-       u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n);
-# else
-extern int
-       u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n);
-static inline int
-u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n)
-{
-  uint16_t c = *s;
-
-  if (c < 0xd800 || c >= 0xe000)
-    {
-      *puc = c;
-      return 1;
-    }
-  else
-    return u16_mbtouc_aux (puc, s, n);
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U32_MBTOUC
-# if !HAVE_INLINE
-extern int
-       u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
-# else
-static inline int
-u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
-{
-  uint32_t c = *s;
-
-  if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
-    *puc = c;
-  else
-    /* invalid multibyte character */
-    *puc = 0xfffd;
-  return 1;
-}
-# endif
-#endif
-
-/* Return the length (number of units) of the first character in S, putting
-   its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
-   and -1 is returned for an invalid sequence of units, -2 is returned for an
-   incomplete sequence of units.
-   The number of available units, N, must be > 0.  */
-/* Similar to u*_mbtouc(), except that the return value gives more details
-   about the failure, similar to mbrtowc().  */
-
-#ifdef GNULIB_UNISTR_U8_MBTOUCR
-extern int
-       u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n);
-#endif
-
-#ifdef GNULIB_UNISTR_U16_MBTOUCR
-extern int
-       u16_mbtoucr (ucs4_t *puc, const uint16_t *s, size_t n);
-#endif
-
-#ifdef GNULIB_UNISTR_U32_MBTOUCR
-extern int
-       u32_mbtoucr (ucs4_t *puc, const uint32_t *s, size_t n);
-#endif
-
-/* Put the multibyte character represented by UC in S, returning its
-   length.  Return -1 upon failure, -2 if the number of available units, N,
-   is too small.  The latter case cannot occur if N >= 6/2/1, respectively.  */
-/* Similar to wctomb(), except that s must not be NULL, and the argument n
-   must be specified.  */
-
-#ifdef GNULIB_UNISTR_U8_UCTOMB
-/* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr.  */
-extern int
-       u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n);
-# if !HAVE_INLINE
-extern int
-       u8_uctomb (uint8_t *s, ucs4_t uc, int n);
-# else
-static inline int
-u8_uctomb (uint8_t *s, ucs4_t uc, int n)
-{
-  if (uc < 0x80 && n > 0)
-    {
-      s[0] = uc;
-      return 1;
-    }
-  else
-    return u8_uctomb_aux (s, uc, n);
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U16_UCTOMB
-/* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr.  */
-extern int
-       u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n);
-# if !HAVE_INLINE
-extern int
-       u16_uctomb (uint16_t *s, ucs4_t uc, int n);
-# else
-static inline int
-u16_uctomb (uint16_t *s, ucs4_t uc, int n)
-{
-  if (uc < 0xd800 && n > 0)
-    {
-      s[0] = uc;
-      return 1;
-    }
-  else
-    return u16_uctomb_aux (s, uc, n);
-}
-# endif
-#endif
-
-#ifdef GNULIB_UNISTR_U32_UCTOMB
-# if !HAVE_INLINE
-extern int
-       u32_uctomb (uint32_t *s, ucs4_t uc, int n);
-# else
-static inline int
-u32_uctomb (uint32_t *s, ucs4_t uc, int n)
-{
-  if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000))
-    {
-      if (n > 0)
-        {
-          *s = uc;
-          return 1;
-        }
-      else
-        return -2;
-    }
-  else
-    return -1;
-}
-# endif
-#endif
-
-/* Copy N units from SRC to DEST.  */
-/* Similar to memcpy().  */
-extern uint8_t *
-       u8_cpy (uint8_t *dest, const uint8_t *src, size_t n);
-extern uint16_t *
-       u16_cpy (uint16_t *dest, const uint16_t *src, size_t n);
-extern uint32_t *
-       u32_cpy (uint32_t *dest, const uint32_t *src, size_t n);
-
-/* Copy N units from SRC to DEST, guaranteeing correct behavior for
-   overlapping memory areas.  */
-/* Similar to memmove().  */
-extern uint8_t *
-       u8_move (uint8_t *dest, const uint8_t *src, size_t n);
-extern uint16_t *
-       u16_move (uint16_t *dest, const uint16_t *src, size_t n);
-extern uint32_t *
-       u32_move (uint32_t *dest, const uint32_t *src, size_t n);
-
-/* Set the first N characters of S to UC.  UC should be a character that
-   occupies only 1 unit.  */
-/* Similar to memset().  */
-extern uint8_t *
-       u8_set (uint8_t *s, ucs4_t uc, size_t n);
-extern uint16_t *
-       u16_set (uint16_t *s, ucs4_t uc, size_t n);
-extern uint32_t *
-       u32_set (uint32_t *s, ucs4_t uc, size_t n);
-
-/* Compare S1 and S2, each of length N.  */
-/* Similar to memcmp().  */
-extern int
-       u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n);
-extern int
-       u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n);
-extern int
-       u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n);
-
-/* Compare S1 and S2.  */
-/* Similar to the gnulib function memcmp2().  */
-extern int
-       u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2);
-extern int
-       u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2);
-extern int
-       u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2);
-
-/* Search the string at S for UC.  */
-/* Similar to memchr().  */
-extern uint8_t *
-       u8_chr (const uint8_t *s, size_t n, ucs4_t uc);
-extern uint16_t *
-       u16_chr (const uint16_t *s, size_t n, ucs4_t uc);
-extern uint32_t *
-       u32_chr (const uint32_t *s, size_t n, ucs4_t uc);
-
-/* Count the number of Unicode characters in the N units from S.  */
-/* Similar to mbsnlen().  */
-extern size_t
-       u8_mbsnlen (const uint8_t *s, size_t n);
-extern size_t
-       u16_mbsnlen (const uint16_t *s, size_t n);
-extern size_t
-       u32_mbsnlen (const uint32_t *s, size_t n);
-
-/* Elementary string functions with memory allocation.  */
-
-/* Make a freshly allocated copy of S, of length N.  */
-extern uint8_t *
-       u8_cpy_alloc (const uint8_t *s, size_t n);
-extern uint16_t *
-       u16_cpy_alloc (const uint16_t *s, size_t n);
-extern uint32_t *
-       u32_cpy_alloc (const uint32_t *s, size_t n);
-
-/* Elementary string functions on NUL terminated strings.  */
-
-/* Return the length (number of units) of the first character in S.
-   Return 0 if it is the NUL character.  Return -1 upon failure.  */
-extern int
-       u8_strmblen (const uint8_t *s);
-extern int
-       u16_strmblen (const uint16_t *s);
-extern int
-       u32_strmblen (const uint32_t *s);
-
-/* Return the length (number of units) of the first character in S, putting
-   its 'ucs4_t' representation in *PUC.  Return 0 if it is the NUL
-   character.  Return -1 upon failure.  */
-extern int
-       u8_strmbtouc (ucs4_t *puc, const uint8_t *s);
-extern int
-       u16_strmbtouc (ucs4_t *puc, const uint16_t *s);
-extern int
-       u32_strmbtouc (ucs4_t *puc, const uint32_t *s);
-
-/* Forward iteration step.  Advances the pointer past the next character,
-   or returns NULL if the end of the string has been reached.  Puts the
-   character's 'ucs4_t' representation in *PUC.  */
-extern const uint8_t *
-       u8_next (ucs4_t *puc, const uint8_t *s);
-extern const uint16_t *
-       u16_next (ucs4_t *puc, const uint16_t *s);
-extern const uint32_t *
-       u32_next (ucs4_t *puc, const uint32_t *s);
-
-/* Backward iteration step.  Advances the pointer to point to the previous
-   character, or returns NULL if the beginning of the string had been reached.
-   Puts the character's 'ucs4_t' representation in *PUC.  */
-extern const uint8_t *
-       u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start);
-extern const uint16_t *
-       u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start);
-extern const uint32_t *
-       u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start);
-
-/* Return the number of units in S.  */
-/* Similar to strlen(), wcslen().  */
-extern size_t
-       u8_strlen (const uint8_t *s);
-extern size_t
-       u16_strlen (const uint16_t *s);
-extern size_t
-       u32_strlen (const uint32_t *s);
-
-/* Return the number of units in S, but at most MAXLEN.  */
-/* Similar to strnlen(), wcsnlen().  */
-extern size_t
-       u8_strnlen (const uint8_t *s, size_t maxlen);
-extern size_t
-       u16_strnlen (const uint16_t *s, size_t maxlen);
-extern size_t
-       u32_strnlen (const uint32_t *s, size_t maxlen);
-
-/* Copy SRC to DEST.  */
-/* Similar to strcpy(), wcscpy().  */
-extern uint8_t *
-       u8_strcpy (uint8_t *dest, const uint8_t *src);
-extern uint16_t *
-       u16_strcpy (uint16_t *dest, const uint16_t *src);
-extern uint32_t *
-       u32_strcpy (uint32_t *dest, const uint32_t *src);
-
-/* Copy SRC to DEST, returning the address of the terminating NUL in DEST.  */
-/* Similar to stpcpy().  */
-extern uint8_t *
-       u8_stpcpy (uint8_t *dest, const uint8_t *src);
-extern uint16_t *
-       u16_stpcpy (uint16_t *dest, const uint16_t *src);
-extern uint32_t *
-       u32_stpcpy (uint32_t *dest, const uint32_t *src);
-
-/* Copy no more than N units of SRC to DEST.  */
-/* Similar to strncpy(), wcsncpy().  */
-extern uint8_t *
-       u8_strncpy (uint8_t *dest, const uint8_t *src, size_t n);
-extern uint16_t *
-       u16_strncpy (uint16_t *dest, const uint16_t *src, size_t n);
-extern uint32_t *
-       u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n);
-
-/* Copy no more than N units of SRC to DEST.  Return a pointer past the last
-   non-NUL unit written into DEST.  */
-/* Similar to stpncpy().  */
-extern uint8_t *
-       u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n);
-extern uint16_t *
-       u16_stpncpy (uint16_t *dest, const uint16_t *src, size_t n);
-extern uint32_t *
-       u32_stpncpy (uint32_t *dest, const uint32_t *src, size_t n);
-
-/* Append SRC onto DEST.  */
-/* Similar to strcat(), wcscat().  */
-extern uint8_t *
-       u8_strcat (uint8_t *dest, const uint8_t *src);
-extern uint16_t *
-       u16_strcat (uint16_t *dest, const uint16_t *src);
-extern uint32_t *
-       u32_strcat (uint32_t *dest, const uint32_t *src);
-
-/* Append no more than N units of SRC onto DEST.  */
-/* Similar to strncat(), wcsncat().  */
-extern uint8_t *
-       u8_strncat (uint8_t *dest, const uint8_t *src, size_t n);
-extern uint16_t *
-       u16_strncat (uint16_t *dest, const uint16_t *src, size_t n);
-extern uint32_t *
-       u32_strncat (uint32_t *dest, const uint32_t *src, size_t n);
-
-/* Compare S1 and S2.  */
-/* Similar to strcmp(), wcscmp().  */
-extern int
-       u8_strcmp (const uint8_t *s1, const uint8_t *s2);
-extern int
-       u16_strcmp (const uint16_t *s1, const uint16_t *s2);
-extern int
-       u32_strcmp (const uint32_t *s1, const uint32_t *s2);
-
-/* Compare S1 and S2 using the collation rules of the current locale.
-   Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2.
-   Upon failure, set errno and return any value.  */
-/* Similar to strcoll(), wcscoll().  */
-extern int
-       u8_strcoll (const uint8_t *s1, const uint8_t *s2);
-extern int
-       u16_strcoll (const uint16_t *s1, const uint16_t *s2);
-extern int
-       u32_strcoll (const uint32_t *s1, const uint32_t *s2);
-
-/* Compare no more than N units of S1 and S2.  */
-/* Similar to strncmp(), wcsncmp().  */
-extern int
-       u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n);
-extern int
-       u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n);
-extern int
-       u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n);
-
-/* Duplicate S, returning an identical malloc'd string.  */
-/* Similar to strdup(), wcsdup().  */
-extern uint8_t *
-       u8_strdup (const uint8_t *s);
-extern uint16_t *
-       u16_strdup (const uint16_t *s);
-extern uint32_t *
-       u32_strdup (const uint32_t *s);
-
-/* Find the first occurrence of UC in STR.  */
-/* Similar to strchr(), wcschr().  */
-extern uint8_t *
-       u8_strchr (const uint8_t *str, ucs4_t uc);
-extern uint16_t *
-       u16_strchr (const uint16_t *str, ucs4_t uc);
-extern uint32_t *
-       u32_strchr (const uint32_t *str, ucs4_t uc);
-
-/* Find the last occurrence of UC in STR.  */
-/* Similar to strrchr(), wcsrchr().  */
-extern uint8_t *
-       u8_strrchr (const uint8_t *str, ucs4_t uc);
-extern uint16_t *
-       u16_strrchr (const uint16_t *str, ucs4_t uc);
-extern uint32_t *
-       u32_strrchr (const uint32_t *str, ucs4_t uc);
-
-/* Return the length of the initial segment of STR which consists entirely
-   of Unicode characters not in REJECT.  */
-/* Similar to strcspn(), wcscspn().  */
-extern size_t
-       u8_strcspn (const uint8_t *str, const uint8_t *reject);
-extern size_t
-       u16_strcspn (const uint16_t *str, const uint16_t *reject);
-extern size_t
-       u32_strcspn (const uint32_t *str, const uint32_t *reject);
-
-/* Return the length of the initial segment of STR which consists entirely
-   of Unicode characters in ACCEPT.  */
-/* Similar to strspn(), wcsspn().  */
-extern size_t
-       u8_strspn (const uint8_t *str, const uint8_t *accept);
-extern size_t
-       u16_strspn (const uint16_t *str, const uint16_t *accept);
-extern size_t
-       u32_strspn (const uint32_t *str, const uint32_t *accept);
-
-/* Find the first occurrence in STR of any character in ACCEPT.  */
-/* Similar to strpbrk(), wcspbrk().  */
-extern uint8_t *
-       u8_strpbrk (const uint8_t *str, const uint8_t *accept);
-extern uint16_t *
-       u16_strpbrk (const uint16_t *str, const uint16_t *accept);
-extern uint32_t *
-       u32_strpbrk (const uint32_t *str, const uint32_t *accept);
-
-/* Find the first occurrence of NEEDLE in HAYSTACK.  */
-/* Similar to strstr(), wcsstr().  */
-extern uint8_t *
-       u8_strstr (const uint8_t *haystack, const uint8_t *needle);
-extern uint16_t *
-       u16_strstr (const uint16_t *haystack, const uint16_t *needle);
-extern uint32_t *
-       u32_strstr (const uint32_t *haystack, const uint32_t *needle);
-
-/* Test whether STR starts with PREFIX.  */
-extern bool
-       u8_startswith (const uint8_t *str, const uint8_t *prefix);
-extern bool
-       u16_startswith (const uint16_t *str, const uint16_t *prefix);
-extern bool
-       u32_startswith (const uint32_t *str, const uint32_t *prefix);
-
-/* Test whether STR ends with SUFFIX.  */
-extern bool
-       u8_endswith (const uint8_t *str, const uint8_t *suffix);
-extern bool
-       u16_endswith (const uint16_t *str, const uint16_t *suffix);
-extern bool
-       u32_endswith (const uint32_t *str, const uint32_t *suffix);
-
-/* Divide STR into tokens separated by characters in DELIM.
-   This interface is actually more similar to wcstok than to strtok.  */
-/* Similar to strtok_r(), wcstok().  */
-extern uint8_t *
-       u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr);
-extern uint16_t *
-       u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr);
-extern uint32_t *
-       u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNISTR_H */
new file mode 100644
--- /dev/null
+++ b/lib/unistr.in.h
@@ -0,0 +1,685 @@
+/* Elementary Unicode string functions.
+   Copyright (C) 2001-2002, 2005-2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNISTR_H
+#define _UNISTR_H
+
+#include "unitypes.h"
+
+/* Get common macros for C.  */
+#include "unused-parameter.h"
+
+/* Get bool.  */
+#include <stdbool.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Conventions:
+
+   All functions prefixed with u8_ operate on UTF-8 encoded strings.
+   Their unit is an uint8_t (1 byte).
+
+   All functions prefixed with u16_ operate on UTF-16 encoded strings.
+   Their unit is an uint16_t (a 2-byte word).
+
+   All functions prefixed with u32_ operate on UCS-4 encoded strings.
+   Their unit is an uint32_t (a 4-byte word).
+
+   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
+   n units.
+
+   All arguments starting with "str" and the arguments of functions starting
+   with u8_str/u16_str/u32_str denote a NUL terminated string, i.e. a string
+   which terminates at the first NUL unit.  This termination unit is
+   considered part of the string for all memory allocation purposes, but
+   is not considered part of the string for all other logical purposes.
+
+   Functions returning a string result take a (resultbuf, lengthp) argument
+   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
+   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
+   allocated string is returned.  In both cases, *lengthp is set to the
+   length (number of units) of the returned string.  In case of error,
+   NULL is returned and errno is set.  */
+
+
+/* Elementary string checks.  */
+
+/* Check whether an UTF-8 string is well-formed.
+   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
+extern const uint8_t *
+       u8_check (const uint8_t *s, size_t n);
+
+/* Check whether an UTF-16 string is well-formed.
+   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
+extern const uint16_t *
+       u16_check (const uint16_t *s, size_t n);
+
+/* Check whether an UCS-4 string is well-formed.
+   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
+extern const uint32_t *
+       u32_check (const uint32_t *s, size_t n);
+
+
+/* Elementary string conversions.  */
+
+/* Convert an UTF-8 string to an UTF-16 string.  */
+extern uint16_t *
+       u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UTF-8 string to an UCS-4 string.  */
+extern uint32_t *
+       u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UTF-16 string to an UTF-8 string.  */
+extern uint8_t *
+       u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UTF-16 string to an UCS-4 string.  */
+extern uint32_t *
+       u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf,
+                   size_t *lengthp);
+
+/* Convert an UCS-4 string to an UTF-8 string.  */
+extern uint8_t *
+       u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UCS-4 string to an UTF-16 string.  */
+extern uint16_t *
+       u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf,
+                   size_t *lengthp);
+
+
+/* Elementary string functions.  */
+
+/* Return the length (number of units) of the first character in S, which is
+   no longer than N.  Return 0 if it is the NUL character.  Return -1 upon
+   failure.  */
+/* Similar to mblen(), except that s must not be NULL.  */
+extern int
+       u8_mblen (const uint8_t *s, size_t n);
+extern int
+       u16_mblen (const uint16_t *s, size_t n);
+extern int
+       u32_mblen (const uint32_t *s, size_t n);
+
+/* Return the length (number of units) of the first character in S, putting
+   its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
+   and an appropriate number of units is returned.
+   The number of available units, N, must be > 0.  */
+/* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0,
+   and the NUL character is not treated specially.  */
+/* The variants with _safe suffix are safe, even if the library is compiled
+   without --enable-safety.  */
+
+#ifdef GNULIB_UNISTR_U8_MBTOUC_UNSAFE
+# if !HAVE_INLINE
+extern int
+       u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n);
+# else
+extern int
+       u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n);
+static inline int
+u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+  uint8_t c = *s;
+
+  if (c < 0x80)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u8_mbtouc_unsafe_aux (puc, s, n);
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U16_MBTOUC_UNSAFE
+# if !HAVE_INLINE
+extern int
+       u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n);
+# else
+extern int
+       u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n);
+static inline int
+u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n)
+{
+  uint16_t c = *s;
+
+  if (c < 0xd800 || c >= 0xe000)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u16_mbtouc_unsafe_aux (puc, s, n);
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U32_MBTOUC_UNSAFE
+# if !HAVE_INLINE
+extern int
+       u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
+# else
+static inline int
+u32_mbtouc_unsafe (ucs4_t *puc,
+                   const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
+{
+  uint32_t c = *s;
+
+#  if CONFIG_UNICODE_SAFETY
+  if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
+#  endif
+    *puc = c;
+#  if CONFIG_UNICODE_SAFETY
+  else
+    /* invalid multibyte character */
+    *puc = 0xfffd;
+#  endif
+  return 1;
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U8_MBTOUC
+# if !HAVE_INLINE
+extern int
+       u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n);
+# else
+extern int
+       u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n);
+static inline int
+u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+  uint8_t c = *s;
+
+  if (c < 0x80)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u8_mbtouc_aux (puc, s, n);
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U16_MBTOUC
+# if !HAVE_INLINE
+extern int
+       u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n);
+# else
+extern int
+       u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n);
+static inline int
+u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n)
+{
+  uint16_t c = *s;
+
+  if (c < 0xd800 || c >= 0xe000)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u16_mbtouc_aux (puc, s, n);
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U32_MBTOUC
+# if !HAVE_INLINE
+extern int
+       u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
+# else
+static inline int
+u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
+{
+  uint32_t c = *s;
+
+  if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
+    *puc = c;
+  else
+    /* invalid multibyte character */
+    *puc = 0xfffd;
+  return 1;
+}
+# endif
+#endif
+
+/* Return the length (number of units) of the first character in S, putting
+   its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
+   and -1 is returned for an invalid sequence of units, -2 is returned for an
+   incomplete sequence of units.
+   The number of available units, N, must be > 0.  */
+/* Similar to u*_mbtouc(), except that the return value gives more details
+   about the failure, similar to mbrtowc().  */
+
+#ifdef GNULIB_UNISTR_U8_MBTOUCR
+extern int
+       u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n);
+#endif
+
+#ifdef GNULIB_UNISTR_U16_MBTOUCR
+extern int
+       u16_mbtoucr (ucs4_t *puc, const uint16_t *s, size_t n);
+#endif
+
+#ifdef GNULIB_UNISTR_U32_MBTOUCR
+extern int
+       u32_mbtoucr (ucs4_t *puc, const uint32_t *s, size_t n);
+#endif
+
+/* Put the multibyte character represented by UC in S, returning its
+   length.  Return -1 upon failure, -2 if the number of available units, N,
+   is too small.  The latter case cannot occur if N >= 6/2/1, respectively.  */
+/* Similar to wctomb(), except that s must not be NULL, and the argument n
+   must be specified.  */
+
+#ifdef GNULIB_UNISTR_U8_UCTOMB
+/* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr.  */
+extern int
+       u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n);
+# if !HAVE_INLINE
+extern int
+       u8_uctomb (uint8_t *s, ucs4_t uc, int n);
+# else
+static inline int
+u8_uctomb (uint8_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0x80 && n > 0)
+    {
+      s[0] = uc;
+      return 1;
+    }
+  else
+    return u8_uctomb_aux (s, uc, n);
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U16_UCTOMB
+/* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr.  */
+extern int
+       u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n);
+# if !HAVE_INLINE
+extern int
+       u16_uctomb (uint16_t *s, ucs4_t uc, int n);
+# else
+static inline int
+u16_uctomb (uint16_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0xd800 && n > 0)
+    {
+      s[0] = uc;
+      return 1;
+    }
+  else
+    return u16_uctomb_aux (s, uc, n);
+}
+# endif
+#endif
+
+#ifdef GNULIB_UNISTR_U32_UCTOMB
+# if !HAVE_INLINE
+extern int
+       u32_uctomb (uint32_t *s, ucs4_t uc, int n);
+# else
+static inline int
+u32_uctomb (uint32_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000))
+    {
+      if (n > 0)
+        {
+          *s = uc;
+          return 1;
+        }
+      else
+        return -2;
+    }
+  else
+    return -1;
+}
+# endif
+#endif
+
+/* Copy N units from SRC to DEST.  */
+/* Similar to memcpy().  */
+extern uint8_t *
+       u8_cpy (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_cpy (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_cpy (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Copy N units from SRC to DEST, guaranteeing correct behavior for
+   overlapping memory areas.  */
+/* Similar to memmove().  */
+extern uint8_t *
+       u8_move (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_move (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_move (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Set the first N characters of S to UC.  UC should be a character that
+   occupies only 1 unit.  */
+/* Similar to memset().  */
+extern uint8_t *
+       u8_set (uint8_t *s, ucs4_t uc, size_t n);
+extern uint16_t *
+       u16_set (uint16_t *s, ucs4_t uc, size_t n);
+extern uint32_t *
+       u32_set (uint32_t *s, ucs4_t uc, size_t n);
+
+/* Compare S1 and S2, each of length N.  */
+/* Similar to memcmp().  */
+extern int
+       u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n);
+extern int
+       u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n);
+extern int
+       u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+
+/* Compare S1 and S2.  */
+/* Similar to the gnulib function memcmp2().  */
+extern int
+       u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2);
+extern int
+       u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2);
+extern int
+       u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2);
+
+/* Search the string at S for UC.  */
+/* Similar to memchr().  */
+extern uint8_t *
+       u8_chr (const uint8_t *s, size_t n, ucs4_t uc);
+extern uint16_t *
+       u16_chr (const uint16_t *s, size_t n, ucs4_t uc);
+extern uint32_t *
+       u32_chr (const uint32_t *s, size_t n, ucs4_t uc);
+
+/* Count the number of Unicode characters in the N units from S.  */
+/* Similar to mbsnlen().  */
+extern size_t
+       u8_mbsnlen (const uint8_t *s, size_t n);
+extern size_t
+       u16_mbsnlen (const uint16_t *s, size_t n);
+extern size_t
+       u32_mbsnlen (const uint32_t *s, size_t n);
+
+/* Elementary string functions with memory allocation.  */
+
+/* Make a freshly allocated copy of S, of length N.  */
+extern uint8_t *
+       u8_cpy_alloc (const uint8_t *s, size_t n);
+extern uint16_t *
+       u16_cpy_alloc (const uint16_t *s, size_t n);
+extern uint32_t *
+       u32_cpy_alloc (const uint32_t *s, size_t n);
+
+/* Elementary string functions on NUL terminated strings.  */
+
+/* Return the length (number of units) of the first character in S.
+   Return 0 if it is the NUL character.  Return -1 upon failure.  */
+extern int
+       u8_strmblen (const uint8_t *s);
+extern int
+       u16_strmblen (const uint16_t *s);
+extern int
+       u32_strmblen (const uint32_t *s);
+
+/* Return the length (number of units) of the first character in S, putting
+   its 'ucs4_t' representation in *PUC.  Return 0 if it is the NUL
+   character.  Return -1 upon failure.  */
+extern int
+       u8_strmbtouc (ucs4_t *puc, const uint8_t *s);
+extern int
+       u16_strmbtouc (ucs4_t *puc, const uint16_t *s);
+extern int
+       u32_strmbtouc (ucs4_t *puc, const uint32_t *s);
+
+/* Forward iteration step.  Advances the pointer past the next character,
+   or returns NULL if the end of the string has been reached.  Puts the
+   character's 'ucs4_t' representation in *PUC.  */
+extern const uint8_t *
+       u8_next (ucs4_t *puc, const uint8_t *s);
+extern const uint16_t *
+       u16_next (ucs4_t *puc, const uint16_t *s);
+extern const uint32_t *
+       u32_next (ucs4_t *puc, const uint32_t *s);
+
+/* Backward iteration step.  Advances the pointer to point to the previous
+   character, or returns NULL if the beginning of the string had been reached.
+   Puts the character's 'ucs4_t' representation in *PUC.  */
+extern const uint8_t *
+       u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start);
+extern const uint16_t *
+       u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start);
+extern const uint32_t *
+       u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start);
+
+/* Return the number of units in S.  */
+/* Similar to strlen(), wcslen().  */
+extern size_t
+       u8_strlen (const uint8_t *s);
+extern size_t
+       u16_strlen (const uint16_t *s);
+extern size_t
+       u32_strlen (const uint32_t *s);
+
+/* Return the number of units in S, but at most MAXLEN.  */
+/* Similar to strnlen(), wcsnlen().  */
+extern size_t
+       u8_strnlen (const uint8_t *s, size_t maxlen);
+extern size_t
+       u16_strnlen (const uint16_t *s, size_t maxlen);
+extern size_t
+       u32_strnlen (const uint32_t *s, size_t maxlen);
+
+/* Copy SRC to DEST.  */
+/* Similar to strcpy(), wcscpy().  */
+extern uint8_t *
+       u8_strcpy (uint8_t *dest, const uint8_t *src);
+extern uint16_t *
+       u16_strcpy (uint16_t *dest, const uint16_t *src);
+extern uint32_t *
+       u32_strcpy (uint32_t *dest, const uint32_t *src);
+
+/* Copy SRC to DEST, returning the address of the terminating NUL in DEST.  */
+/* Similar to stpcpy().  */
+extern uint8_t *
+       u8_stpcpy (uint8_t *dest, const uint8_t *src);
+extern uint16_t *
+       u16_stpcpy (uint16_t *dest, const uint16_t *src);
+extern uint32_t *
+       u32_stpcpy (uint32_t *dest, const uint32_t *src);
+
+/* Copy no more than N units of SRC to DEST.  */
+/* Similar to strncpy(), wcsncpy().  */
+extern uint8_t *
+       u8_strncpy (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_strncpy (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Copy no more than N units of SRC to DEST.  Return a pointer past the last
+   non-NUL unit written into DEST.  */
+/* Similar to stpncpy().  */
+extern uint8_t *
+       u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_stpncpy (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_stpncpy (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Append SRC onto DEST.  */
+/* Similar to strcat(), wcscat().  */
+extern uint8_t *
+       u8_strcat (uint8_t *dest, const uint8_t *src);
+extern uint16_t *
+       u16_strcat (uint16_t *dest, const uint16_t *src);
+extern uint32_t *
+       u32_strcat (uint32_t *dest, const uint32_t *src);
+
+/* Append no more than N units of SRC onto DEST.  */
+/* Similar to strncat(), wcsncat().  */
+extern uint8_t *
+       u8_strncat (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_strncat (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_strncat (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Compare S1 and S2.  */
+/* Similar to strcmp(), wcscmp().  */
+extern int
+       u8_strcmp (const uint8_t *s1, const uint8_t *s2);
+extern int
+       u16_strcmp (const uint16_t *s1, const uint16_t *s2);
+extern int
+       u32_strcmp (const uint32_t *s1, const uint32_t *s2);
+
+/* Compare S1 and S2 using the collation rules of the current locale.
+   Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2.
+   Upon failure, set errno and return any value.  */
+/* Similar to strcoll(), wcscoll().  */
+extern int
+       u8_strcoll (const uint8_t *s1, const uint8_t *s2);
+extern int
+       u16_strcoll (const uint16_t *s1, const uint16_t *s2);
+extern int
+       u32_strcoll (const uint32_t *s1, const uint32_t *s2);
+
+/* Compare no more than N units of S1 and S2.  */
+/* Similar to strncmp(), wcsncmp().  */
+extern int
+       u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n);
+extern int
+       u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n);
+extern int
+       u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+
+/* Duplicate S, returning an identical malloc'd string.  */
+/* Similar to strdup(), wcsdup().  */
+extern uint8_t *
+       u8_strdup (const uint8_t *s);
+extern uint16_t *
+       u16_strdup (const uint16_t *s);
+extern uint32_t *
+       u32_strdup (const uint32_t *s);
+
+/* Find the first occurrence of UC in STR.  */
+/* Similar to strchr(), wcschr().  */
+extern uint8_t *
+       u8_strchr (const uint8_t *str, ucs4_t uc);
+extern uint16_t *
+       u16_strchr (const uint16_t *str, ucs4_t uc);
+extern uint32_t *
+       u32_strchr (const uint32_t *str, ucs4_t uc);
+
+/* Find the last occurrence of UC in STR.  */
+/* Similar to strrchr(), wcsrchr().  */
+extern uint8_t *
+       u8_strrchr (const uint8_t *str, ucs4_t uc);
+extern uint16_t *
+       u16_strrchr (const uint16_t *str, ucs4_t uc);
+extern uint32_t *
+       u32_strrchr (const uint32_t *str, ucs4_t uc);
+
+/* Return the length of the initial segment of STR which consists entirely
+   of Unicode characters not in REJECT.  */
+/* Similar to strcspn(), wcscspn().  */
+extern size_t
+       u8_strcspn (const uint8_t *str, const uint8_t *reject);
+extern size_t
+       u16_strcspn (const uint16_t *str, const uint16_t *reject);
+extern size_t
+       u32_strcspn (const uint32_t *str, const uint32_t *reject);
+
+/* Return the length of the initial segment of STR which consists entirely
+   of Unicode characters in ACCEPT.  */
+/* Similar to strspn(), wcsspn().  */
+extern size_t
+       u8_strspn (const uint8_t *str, const uint8_t *accept);
+extern size_t
+       u16_strspn (const uint16_t *str, const uint16_t *accept);
+extern size_t
+       u32_strspn (const uint32_t *str, const uint32_t *accept);
+
+/* Find the first occurrence in STR of any character in ACCEPT.  */
+/* Similar to strpbrk(), wcspbrk().  */
+extern uint8_t *
+       u8_strpbrk (const uint8_t *str, const uint8_t *accept);
+extern uint16_t *
+       u16_strpbrk (const uint16_t *str, const uint16_t *accept);
+extern uint32_t *
+       u32_strpbrk (const uint32_t *str, const uint32_t *accept);
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.  */
+/* Similar to strstr(), wcsstr().  */
+extern uint8_t *
+       u8_strstr (const uint8_t *haystack, const uint8_t *needle);
+extern uint16_t *
+       u16_strstr (const uint16_t *haystack, const uint16_t *needle);
+extern uint32_t *
+       u32_strstr (const uint32_t *haystack, const uint32_t *needle);
+
+/* Test whether STR starts with PREFIX.  */
+extern bool
+       u8_startswith (const uint8_t *str, const uint8_t *prefix);
+extern bool
+       u16_startswith (const uint16_t *str, const uint16_t *prefix);
+extern bool
+       u32_startswith (const uint32_t *str, const uint32_t *prefix);
+
+/* Test whether STR ends with SUFFIX.  */
+extern bool
+       u8_endswith (const uint8_t *str, const uint8_t *suffix);
+extern bool
+       u16_endswith (const uint16_t *str, const uint16_t *suffix);
+extern bool
+       u32_endswith (const uint32_t *str, const uint32_t *suffix);
+
+/* Divide STR into tokens separated by characters in DELIM.
+   This interface is actually more similar to wcstok than to strtok.  */
+/* Similar to strtok_r(), wcstok().  */
+extern uint8_t *
+       u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr);
+extern uint16_t *
+       u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr);
+extern uint32_t *
+       u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNISTR_H */
deleted file mode 100644
--- a/lib/unitypes.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Elementary types for the GNU UniString library.
-   Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNITYPES_H
-#define _UNITYPES_H
-
-/* Get uint8_t, uint16_t, uint32_t.  */
-#include <stdint.h>
-
-/* Type representing a Unicode character.  */
-typedef uint32_t ucs4_t;
-
-#endif /* _UNITYPES_H */
new file mode 100644
--- /dev/null
+++ b/lib/unitypes.in.h
@@ -0,0 +1,26 @@
+/* Elementary types for the GNU UniString library.
+   Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNITYPES_H
+#define _UNITYPES_H
+
+/* Get uint8_t, uint16_t, uint32_t.  */
+#include <stdint.h>
+
+/* Type representing a Unicode character.  */
+typedef uint32_t ucs4_t;
+
+#endif /* _UNITYPES_H */
deleted file mode 100644
--- a/lib/uniwbrk.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Word breaks in Unicode strings.
-   Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2009.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNIWBRK_H
-#define _UNIWBRK_H
-
-/* Get size_t.  */
-#include <stddef.h>
-
-#include "unitypes.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ========================================================================= */
-
-/* Property defined in Unicode Standard Annex #29, section "Word Boundaries"
-   <http://www.unicode.org/reports/tr29/#Word_Boundaries>  */
-
-/* Possible values of the Word_Break property.
-   This enumeration may be extended in the future.  */
-enum
-{
-  WBP_OTHER        = 0,
-  WBP_CR           = 11,
-  WBP_LF           = 12,
-  WBP_NEWLINE      = 10,
-  WBP_EXTEND       = 8,
-  WBP_FORMAT       = 9,
-  WBP_KATAKANA     = 1,
-  WBP_ALETTER      = 2,
-  WBP_MIDNUMLET    = 3,
-  WBP_MIDLETTER    = 4,
-  WBP_MIDNUM       = 5,
-  WBP_NUMERIC      = 6,
-  WBP_EXTENDNUMLET = 7
-};
-
-/* Return the Word_Break property of a Unicode character.  */
-extern int
-       uc_wordbreak_property (ucs4_t uc);
-
-/* ========================================================================= */
-
-/* Word breaks.  */
-
-/* Determine the word break points in S, and store the result at p[0..n-1].
-   p[i] = 1 means that there is a word boundary between s[i-1] and s[i].
-   p[i] = 0 means that s[i-1] and s[i] must not be separated.
- */
-extern void
-       u8_wordbreaks (const uint8_t *s, size_t n, char *p);
-extern void
-       u16_wordbreaks (const uint16_t *s, size_t n, char *p);
-extern void
-       u32_wordbreaks (const uint32_t *s, size_t n, char *p);
-extern void
-       ulc_wordbreaks (const char *s, size_t n, char *p);
-
-/* ========================================================================= */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _UNIWBRK_H */
new file mode 100644
--- /dev/null
+++ b/lib/uniwbrk.in.h
@@ -0,0 +1,83 @@
+/* Word breaks in Unicode strings.
+   Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNIWBRK_H
+#define _UNIWBRK_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#include "unitypes.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ========================================================================= */
+
+/* Property defined in Unicode Standard Annex #29, section "Word Boundaries"
+   <http://www.unicode.org/reports/tr29/#Word_Boundaries>  */
+
+/* Possible values of the Word_Break property.
+   This enumeration may be extended in the future.  */
+enum
+{
+  WBP_OTHER        = 0,
+  WBP_CR           = 11,
+  WBP_LF           = 12,
+  WBP_NEWLINE      = 10,
+  WBP_EXTEND       = 8,
+  WBP_FORMAT       = 9,
+  WBP_KATAKANA     = 1,
+  WBP_ALETTER      = 2,
+  WBP_MIDNUMLET    = 3,
+  WBP_MIDLETTER    = 4,
+  WBP_MIDNUM       = 5,
+  WBP_NUMERIC      = 6,
+  WBP_EXTENDNUMLET = 7
+};
+
+/* Return the Word_Break property of a Unicode character.  */
+extern int
+       uc_wordbreak_property (ucs4_t uc);
+
+/* ========================================================================= */
+
+/* Word breaks.  */
+
+/* Determine the word break points in S, and store the result at p[0..n-1].
+   p[i] = 1 means that there is a word boundary between s[i-1] and s[i].
+   p[i] = 0 means that s[i-1] and s[i] must not be separated.
+ */
+extern void
+       u8_wordbreaks (const uint8_t *s, size_t n, char *p);
+extern void
+       u16_wordbreaks (const uint16_t *s, size_t n, char *p);
+extern void
+       u32_wordbreaks (const uint32_t *s, size_t n, char *p);
+extern void
+       ulc_wordbreaks (const char *s, size_t n, char *p);
+
+/* ========================================================================= */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _UNIWBRK_H */
deleted file mode 100644
--- a/lib/uniwidth.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Display width functions.
-   Copyright (C) 2001-2002, 2005, 2007, 2009-2010 Free Software Foundation,
-   Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as published
-   by the Free Software Foundation; either version 3 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNIWIDTH_H
-#define _UNIWIDTH_H
-
-#include "unitypes.h"
-
-/* Get size_t.  */
-#include <stddef.h>
-
-/* Get locale_charset() declaration.  */
-#include "localcharset.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Display width.  */
-
-/* These functions are locale dependent.  The encoding argument identifies
-   the encoding (e.g. "ISO-8859-2" for Polish).  */
-
-/* Determine number of column positions required for UC.  */
-extern int
-       uc_width (ucs4_t uc, const char *encoding);
-
-/* Determine number of column positions required for first N units
-   (or fewer if S ends before this) in S.  */
-extern int
-       u8_width (const uint8_t *s, size_t n, const char *encoding);
-extern int
-       u16_width (const uint16_t *s, size_t n, const char *encoding);
-extern int
-       u32_width (const uint32_t *s, size_t n, const char *encoding);
-
-/* Determine number of column positions required for S.  */
-extern int
-       u8_strwidth (const uint8_t *s, const char *encoding);
-extern int
-       u16_strwidth (const uint16_t *s, const char *encoding);
-extern int
-       u32_strwidth (const uint32_t *s, const char *encoding);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNIWIDTH_H */
new file mode 100644
--- /dev/null
+++ b/lib/uniwidth.in.h
@@ -0,0 +1,65 @@
+/* Display width functions.
+   Copyright (C) 2001-2002, 2005, 2007, 2009-2010 Free Software Foundation,
+   Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNIWIDTH_H
+#define _UNIWIDTH_H
+
+#include "unitypes.h"
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get locale_charset() declaration.  */
+#include "localcharset.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Display width.  */
+
+/* These functions are locale dependent.  The encoding argument identifies
+   the encoding (e.g. "ISO-8859-2" for Polish).  */
+
+/* Determine number of column positions required for UC.  */
+extern int
+       uc_width (ucs4_t uc, const char *encoding);
+
+/* Determine number of column positions required for first N units
+   (or fewer if S ends before this) in S.  */
+extern int
+       u8_width (const uint8_t *s, size_t n, const char *encoding);
+extern int
+       u16_width (const uint16_t *s, size_t n, const char *encoding);
+extern int
+       u32_width (const uint32_t *s, size_t n, const char *encoding);
+
+/* Determine number of column positions required for S.  */
+extern int
+       u8_strwidth (const uint8_t *s, const char *encoding);
+extern int
+       u16_strwidth (const uint16_t *s, const char *encoding);
+extern int
+       u32_strwidth (const uint32_t *s, const char *encoding);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNIWIDTH_H */
new file mode 100644
--- /dev/null
+++ b/m4/libunistring-base.m4
@@ -0,0 +1,145 @@
+# libunistring-base.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paolo Bonzini and Bruno Haible.
+
+dnl gl_LIBUNISTRING_LIBSOURCE([VERSION], [SourceFile])
+dnl Declares that SourceFile should be compiled, unless we are linking
+dnl with libunistring and its version is >= the given VERSION.
+dnl SourceFile should be relative to the lib directory and end in '.c'.
+dnl This macro is to be used for public libunistring API, not for
+dnl undocumented API.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a change that affects the behaviour of the
+dnl functions defined in SourceFile (even if SourceFile itself does not
+dnl change).
+
+AC_DEFUN([gl_LIBUNISTRING_LIBSOURCE],
+[
+  AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+  dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+  dnl gl_LIBUNISTRING_CORE if that macro has been run.
+  if gl_LIBUNISTRING_VERSION_CMP([$1])
+  then
+    m4_foreach_w([gl_source_file], [$2],
+      [AC_LIBOBJ(m4_bpatsubst(m4_defn([gl_source_file]), [\.c$], []))
+      ])
+  fi
+])
+
+dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile])
+dnl Declares that HeaderFile should be created, unless we are linking
+dnl with libunistring and its version is >= the given VERSION.
+dnl HeaderFile should be relative to the lib directory and end in '.h'.
+dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty).
+dnl
+dnl When we are linking with the already installed libunistring and its version
+dnl is < VERSION, we create HeaderFile here, because we may compile functions
+dnl (via gl_LIBUNISTRING_LIBSOURCE above) that are not contained in the
+dnl installed version.
+dnl When we are linking with the already installed libunistring and its version
+dnl is > VERSION, we don't create HeaderFile here: it could cause compilation
+dnl errors in other libunistring header files if some types are missing.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a non-comment change to the HeaderFile.
+
+AC_DEFUN([gl_LIBUNISTRING_LIBHEADER],
+[
+  AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+  dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+  dnl gl_LIBUNISTRING_CORE if that macro has been run.
+  if gl_LIBUNISTRING_VERSION_CMP([$1])
+  then
+    LIBUNISTRING_[]AS_TR_CPP([$2])='$2'
+  else
+    LIBUNISTRING_[]AS_TR_CPP([$2])=
+  fi
+  AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2]))
+])
+
+dnl Miscellaneous preparations/initializations.
+
+AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE],
+[
+  AC_REQUIRE([AC_PROG_AWK])
+
+dnl Sed expressions to extract the parts of a version number.
+changequote(,)
+gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+changequote([,])
+
+  if test "$HAVE_LIBUNISTRING" = yes; then
+    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
+    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
+    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+  fi
+])
+
+dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
+dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION
+dnl is less than the VERSION argument.
+dnl This is the unoptimized variant:
+AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP_ORIG],
+[ { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+         requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"`
+         requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"`
+         requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+         test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \
+         || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \
+              && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \
+                   || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \
+                        && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor
+                      }
+                 }
+            }
+       }
+  }
+])
+dnl This is the optimized variant, that assumes the argument is a literal:
+AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
+[ { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+         m4_pushdef([requested_version_major],
+           [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])])
+         m4_pushdef([requested_version_minor],
+           [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+         m4_pushdef([requested_version_subminor],
+           [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+         test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \
+         || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \
+              && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \
+                   || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \
+                        && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor
+                      }
+                 }
+            }
+         m4_popdef([requested_version_subminor])
+         m4_popdef([requested_version_minor])
+         m4_popdef([requested_version_major])
+       }
+  }
+])
+
+dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the
+dnl same as ORIG, otherwise to 0.
+m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])])
new file mode 100644
--- /dev/null
+++ b/m4/libunistring-optional.m4
@@ -0,0 +1,22 @@
+# libunistring-optional.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl gl_LIBUNISTRING_OPTIONAL
+dnl Searches for an installed libunistring or uses the included source code
+dnl parts.
+dnl If found, it sets and AC_SUBSTs HAVE_LIBUNISTRING=yes and the LIBUNISTRING
+dnl and LTLIBUNISTRING variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIBUNISTRING to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIBUNISTRING=no and LIBUNISTRING and LTLIBUNISTRING to empty.
+
+AC_DEFUN([gl_LIBUNISTRING_OPTIONAL],
+[
+  dnl gl_LIBUNISTRING does a couple of extra things if this macro is used.
+  AC_REQUIRE([gl_LIBUNISTRING])
+
+  AC_MSG_CHECKING([whether to use the included libunistring])
+  AC_MSG_RESULT([$gl_libunistring_use_included])
+])
--- a/m4/libunistring.m4
+++ b/m4/libunistring.m4
@@ -1,4 +1,4 @@
-# libunistring.m4 serial 5
+# libunistring.m4 serial 6
 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,12 +7,48 @@
 dnl gl_LIBUNISTRING
 dnl Searches for an installed libunistring.
 dnl If found, it sets and AC_SUBSTs HAVE_LIBUNISTRING=yes and the LIBUNISTRING
-dnl and LTLIBUNISTRING variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIBUNISTRING to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIBUNISTRING=no and LIBUNISTRING and LTLIBUNISTRING to empty.
+dnl and LTLIBUNISTRING variables, sets the LIBUNISTRING_VERSION variable, and
+dnl augments the CPPFLAGS variable, and #defines HAVE_LIBUNISTRING to 1.
+dnl Otherwise, it sets and AC_SUBSTs HAVE_LIBUNISTRING=no and LIBUNISTRING and
+dnl LTLIBUNISTRING to empty.
 
 AC_DEFUN([gl_LIBUNISTRING],
 [
+  AC_BEFORE([$0], [gl_LIBUNISTRING_LIBSOURCE])
+  AC_BEFORE([$0], [gl_LIBUNISTRING_LIBHEADER])
+  AC_BEFORE([$0], [gl_LIBUNISTRING_LIB_PREPARE])
+
+  m4_ifdef([gl_LIBUNISTRING_OPTIONAL],
+    [
+      AC_MSG_CHECKING([whether included libunistring is requested])
+      AC_ARG_WITH([included-libunistring],
+        [  --with-included-libunistring  use the libunistring parts included here],
+        [gl_libunistring_force_included=$withval],
+        [gl_libunistring_force_included=no])
+      AC_MSG_RESULT([$gl_libunistring_force_included])
+      gl_libunistring_use_included="$gl_libunistring_force_included"
+      if test "$gl_libunistring_use_included" = yes; then
+        dnl Assume that libunistring is not installed until some other macro
+        dnl explicitly invokes gl_LIBUNISTRING_CORE.
+        if test -z "$HAVE_LIBUNISTRING"; then
+          HAVE_LIBUNISTRING=no
+        fi
+        LIBUNISTRING=
+        LTLIBUNISTRING=
+      else
+        gl_LIBUNISTRING_CORE
+        if test $HAVE_LIBUNISTRING = no; then
+          gl_libunistring_use_included=yes
+          LIBUNISTRING=
+          LTLIBUNISTRING=
+        fi
+      fi
+    ],
+    [gl_LIBUNISTRING_CORE])
+])
+
+AC_DEFUN([gl_LIBUNISTRING_CORE],
+[
   AC_REQUIRE([AM_ICONV])
   if test -n "$LIBICONV"; then
     dnl First, try to link without -liconv. libunistring often depends on
@@ -42,4 +78,51 @@
       [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
       [no, consider installing GNU libunistring])
   fi
+  if test $HAVE_LIBUNISTRING = yes; then
+    dnl Determine the installed version.
+    AC_CACHE_CHECK([for libunistring version], [gl_cv_libunistring_version],
+      [AC_COMPUTE_INT([gl_libunistring_hexversion],
+                      [_LIBUNISTRING_VERSION],
+                      [#include <unistring/version.h>])
+       dnl Versions <= 0.9.3 had a hexversion of 0x0009.
+       dnl Use other tests to distinguish them.
+       if test $gl_libunistring_hexversion = 9; then
+         dnl Version 0.9.2 introduced the header <unistring/cdefs.h>.
+         AC_TRY_COMPILE([#include <unistring/cdefs.h>], ,
+           [gl_cv_libunistring_version092=true],
+           [gl_cv_libunistring_version092=false]);
+         if $gl_cv_libunistring_version092; then
+           dnl Version 0.9.3 changed a comment in <unistr.h>.
+           gl_ABSOLUTE_HEADER_ONE([unistr.h])
+           if test -n "$gl_cv_absolute_unistr_h" \
+              && grep 'Copy no more than N units of SRC to DEST.  Return a pointer' $gl_cv_absolute_unistr_h > /dev/null; then
+             dnl Detected version 0.9.3.
+             gl_libunistring_hexversion=2307
+           else
+             dnl Detected version 0.9.2.
+             gl_libunistring_hexversion=2306
+           fi
+         else
+           dnl Version 0.9.1 introduced the type casing_suffix_context_t.
+           AC_TRY_COMPILE([#include <unicase.h>
+                           casing_suffix_context_t ct;], ,
+             [gl_cv_libunistring_version091=true],
+             [gl_cv_libunistring_version091=false])
+           if $gl_cv_libunistring_version091; then
+             dnl Detected version 0.9.1.
+             gl_libunistring_hexversion=2305
+           else
+             dnl Detected version 0.9.
+             gl_libunistring_hexversion=2304
+           fi
+         fi
+       fi
+       dnl Transform into the usual major.minor.subminor notation.
+       gl_libunistring_major=`expr $gl_libunistring_hexversion / 65536`
+       gl_libunistring_minor=`expr $gl_libunistring_hexversion / 256 % 256`
+       gl_libunistring_subminor=`expr $gl_libunistring_hexversion % 256`
+       gl_cv_libunistring_version="$gl_libunistring_major.$gl_libunistring_minor.$gl_libunistring_subminor"
+      ])
+    LIBUNISTRING_VERSION="$gl_cv_libunistring_version"
+  fi
 ])
--- a/modules/libunistring
+++ b/modules/libunistring
@@ -3,6 +3,7 @@
 
 Files:
 m4/libunistring.m4
+m4/absolute-header.m4
 
 Depends-on:
 havelib
new file mode 100644
--- /dev/null
+++ b/modules/libunistring-optional
@@ -0,0 +1,27 @@
+Description:
+Try to use system libunistring for Unicode string functions.
+
+Files:
+m4/libunistring-optional.m4
+m4/libunistring.m4
+m4/absolute-header.m4
+
+Depends-on:
+havelib
+iconv
+
+configure.ac:
+gl_LIBUNISTRING_OPTIONAL
+
+Makefile.am:
+
+Include:
+
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+
+License:
+LGPL
+
+Maintainer:
+Paolo Bonzini, Bruno Haible
--- a/modules/unicase/base
+++ b/modules/unicase/base
@@ -2,7 +2,8 @@
 Base layer for Unicode character case mappings.
 
 Files:
-lib/unicase.h
+lib/unicase.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
@@ -10,8 +11,18 @@
 stdbool
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9.1], [unicase.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNICASE_H)
+
+unicase.h: unicase.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/unicase.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += unicase.h unicase.h-t
 
 Include:
 "unicase.h"
--- a/modules/unicase/cased-tests
+++ b/modules/unicase/cased-tests
@@ -12,4 +12,4 @@
 TESTS += test-cased
 check_PROGRAMS += test-cased
 test_cased_SOURCES = unicase/test-cased.c
-
+test_cased_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/empty-prefix-context
+++ b/modules/unicase/empty-prefix-context
@@ -8,9 +8,9 @@
 unicase/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/empty-prefix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/empty-prefix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/empty-suffix-context
+++ b/modules/unicase/empty-suffix-context
@@ -8,9 +8,9 @@
 unicase/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/empty-suffix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/empty-suffix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/ignorable-tests
+++ b/modules/unicase/ignorable-tests
@@ -12,4 +12,4 @@
 TESTS += test-ignorable
 check_PROGRAMS += test-ignorable
 test_ignorable_SOURCES = unicase/test-ignorable.c
-
+test_ignorable_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/locale-language
+++ b/modules/unicase/locale-language
@@ -11,9 +11,9 @@
 gperf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unicase/locale-language.c])
 
 Makefile.am:
-lib_SOURCES += unicase/locale-language.c
 
 unicase/locale-languages.h: $(srcdir)/unicase/locale-languages.gperf
 	$(GPERF) -m 10 $(srcdir)/unicase/locale-languages.gperf > $(srcdir)/unicase/locale-languages.h-t
--- a/modules/unicase/locale-language-tests
+++ b/modules/unicase/locale-language-tests
@@ -22,4 +22,4 @@
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-locale-language
 test_locale_language_SOURCES = unicase/test-locale-language.c
-test_locale_language_LDADD = $(LDADD) @INTL_MACOSX_LIBS@
+test_locale_language_LDADD = $(LDADD) $(LIBUNISTRING) @INTL_MACOSX_LIBS@
--- a/modules/unicase/tolower
+++ b/modules/unicase/tolower
@@ -10,9 +10,9 @@
 unicase/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unicase/tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/tolower-tests
+++ b/modules/unicase/tolower-tests
@@ -12,4 +12,4 @@
 TESTS += test-uc_tolower
 check_PROGRAMS += test-uc_tolower
 test_uc_tolower_SOURCES = unicase/test-uc_tolower.c
-
+test_uc_tolower_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/totitle
+++ b/modules/unicase/totitle
@@ -10,9 +10,9 @@
 unicase/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unicase/totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/totitle-tests
+++ b/modules/unicase/totitle-tests
@@ -12,4 +12,4 @@
 TESTS += test-uc_totitle
 check_PROGRAMS += test-uc_totitle
 test_uc_totitle_SOURCES = unicase/test-uc_totitle.c
-
+test_uc_totitle_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/toupper
+++ b/modules/unicase/toupper
@@ -10,9 +10,9 @@
 unicase/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unicase/toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/toupper-tests
+++ b/modules/unicase/toupper-tests
@@ -12,4 +12,4 @@
 TESTS += test-uc_toupper
 check_PROGRAMS += test-uc_toupper
 test_uc_toupper_SOURCES = unicase/test-uc_toupper.c
-
+test_uc_toupper_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-casecmp
+++ b/modules/unicase/u16-casecmp
@@ -13,9 +13,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-casecmp.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-casecmp.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-casecmp-tests
+++ b/modules/unicase/u16-casecmp-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-casecmp
 check_PROGRAMS += test-u16-casecmp
 test_u16_casecmp_SOURCES = unicase/test-u16-casecmp.c
-
+test_u16_casecmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-casecoll
+++ b/modules/unicase/u16-casecoll
@@ -12,9 +12,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-casecoll.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-casecoll.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-casecoll-tests
+++ b/modules/unicase/u16-casecoll-tests
@@ -12,5 +12,5 @@
 TESTS += test-u16-casecoll
 check_PROGRAMS += test-u16-casecoll
 test_u16_casecoll_SOURCES = unicase/test-u16-casecoll.c
-test_u16_casecoll_LDADD = $(LDADD) @LIBICONV@
+test_u16_casecoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/unicase/u16-casefold
+++ b/modules/unicase/u16-casefold
@@ -12,9 +12,9 @@
 unicase/empty-suffix-context
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-casefold.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-casefold.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-casefold-tests
+++ b/modules/unicase/u16-casefold-tests
@@ -13,4 +13,4 @@
 TESTS += test-u16-casefold
 check_PROGRAMS += test-u16-casefold
 test_u16_casefold_SOURCES = unicase/test-u16-casefold.c
-
+test_u16_casefold_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-casexfrm
+++ b/modules/unicase/u16-casexfrm
@@ -14,9 +14,9 @@
 memxfrm
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-casexfrm.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-casexfrm.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-ct-casefold
+++ b/modules/unicase/u16-ct-casefold
@@ -15,9 +15,9 @@
 uninorm/nfd
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-ct-casefold.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-ct-casefold.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-ct-tolower
+++ b/modules/unicase/u16-ct-tolower
@@ -11,9 +11,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-ct-tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-ct-tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-ct-totitle
+++ b/modules/unicase/u16-ct-totitle
@@ -23,9 +23,9 @@
 stdbool
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-ct-totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-ct-totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-ct-toupper
+++ b/modules/unicase/u16-ct-toupper
@@ -11,9 +11,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-ct-toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-ct-toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-is-cased
+++ b/modules/unicase/u16-is-cased
@@ -15,9 +15,9 @@
 unistr/u16-cmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-is-cased.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-is-cased.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-is-cased-tests
+++ b/modules/unicase/u16-is-cased-tests
@@ -11,4 +11,4 @@
 TESTS += test-u16-is-cased
 check_PROGRAMS += test-u16-is-cased
 test_u16_is_cased_SOURCES = unicase/test-u16-is-cased.c
-
+test_u16_is_cased_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-is-casefolded
+++ b/modules/unicase/u16-is-casefolded
@@ -10,9 +10,9 @@
 unicase/u16-casefold
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-is-casefolded.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-is-casefolded.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-is-casefolded-tests
+++ b/modules/unicase/u16-is-casefolded-tests
@@ -11,4 +11,4 @@
 TESTS += test-u16-is-casefolded
 check_PROGRAMS += test-u16-is-casefolded
 test_u16_is_casefolded_SOURCES = unicase/test-u16-is-casefolded.c
-
+test_u16_is_casefolded_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-is-lowercase
+++ b/modules/unicase/u16-is-lowercase
@@ -10,9 +10,9 @@
 unicase/u16-tolower
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-is-lowercase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-is-lowercase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-is-lowercase-tests
+++ b/modules/unicase/u16-is-lowercase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u16-is-lowercase
 check_PROGRAMS += test-u16-is-lowercase
 test_u16_is_lowercase_SOURCES = unicase/test-u16-is-lowercase.c
-
+test_u16_is_lowercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-is-titlecase
+++ b/modules/unicase/u16-is-titlecase
@@ -10,9 +10,9 @@
 unicase/u16-totitle
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-is-titlecase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-is-titlecase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-is-titlecase-tests
+++ b/modules/unicase/u16-is-titlecase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u16-is-titlecase
 check_PROGRAMS += test-u16-is-titlecase
 test_u16_is_titlecase_SOURCES = unicase/test-u16-is-titlecase.c
-
+test_u16_is_titlecase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-is-uppercase
+++ b/modules/unicase/u16-is-uppercase
@@ -10,9 +10,9 @@
 unicase/u16-toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-is-uppercase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-is-uppercase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-is-uppercase-tests
+++ b/modules/unicase/u16-is-uppercase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u16-is-uppercase
 check_PROGRAMS += test-u16-is-uppercase
 test_u16_is_uppercase_SOURCES = unicase/test-u16-is-uppercase.c
-
+test_u16_is_uppercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-prefix-context
+++ b/modules/unicase/u16-prefix-context
@@ -15,9 +15,9 @@
 unistr/u16-prev
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-prefix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-prefix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-suffix-context
+++ b/modules/unicase/u16-suffix-context
@@ -14,9 +14,9 @@
 unistr/u16-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-suffix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-suffix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-tolower
+++ b/modules/unicase/u16-tolower
@@ -13,9 +13,9 @@
 unicase/tolower
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-tolower-tests
+++ b/modules/unicase/u16-tolower-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-tolower
 check_PROGRAMS += test-u16-tolower
 test_u16_tolower_SOURCES = unicase/test-u16-tolower.c
-
+test_u16_tolower_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-totitle
+++ b/modules/unicase/u16-totitle
@@ -12,9 +12,9 @@
 unicase/empty-suffix-context
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-totitle-tests
+++ b/modules/unicase/u16-totitle-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-totitle
 check_PROGRAMS += test-u16-totitle
 test_u16_totitle_SOURCES = unicase/test-u16-totitle.c
-
+test_u16_totitle_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u16-toupper
+++ b/modules/unicase/u16-toupper
@@ -13,9 +13,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u16-toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u16-toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u16-toupper-tests
+++ b/modules/unicase/u16-toupper-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-toupper
 check_PROGRAMS += test-u16-toupper
 test_u16_toupper_SOURCES = unicase/test-u16-toupper.c
-
+test_u16_toupper_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-casecmp
+++ b/modules/unicase/u32-casecmp
@@ -13,9 +13,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-casecmp.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-casecmp.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-casecmp-tests
+++ b/modules/unicase/u32-casecmp-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-casecmp
 check_PROGRAMS += test-u32-casecmp
 test_u32_casecmp_SOURCES = unicase/test-u32-casecmp.c
-
+test_u32_casecmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-casecoll
+++ b/modules/unicase/u32-casecoll
@@ -12,9 +12,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-casecoll.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-casecoll.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-casecoll-tests
+++ b/modules/unicase/u32-casecoll-tests
@@ -12,5 +12,5 @@
 TESTS += test-u32-casecoll
 check_PROGRAMS += test-u32-casecoll
 test_u32_casecoll_SOURCES = unicase/test-u32-casecoll.c
-test_u32_casecoll_LDADD = $(LDADD) @LIBICONV@
+test_u32_casecoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/unicase/u32-casefold
+++ b/modules/unicase/u32-casefold
@@ -12,9 +12,9 @@
 unicase/empty-suffix-context
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-casefold.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-casefold.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-casefold-tests
+++ b/modules/unicase/u32-casefold-tests
@@ -13,4 +13,4 @@
 TESTS += test-u32-casefold
 check_PROGRAMS += test-u32-casefold
 test_u32_casefold_SOURCES = unicase/test-u32-casefold.c
-
+test_u32_casefold_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-casexfrm
+++ b/modules/unicase/u32-casexfrm
@@ -14,9 +14,9 @@
 memxfrm
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-casexfrm.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-casexfrm.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-ct-casefold
+++ b/modules/unicase/u32-ct-casefold
@@ -15,9 +15,9 @@
 uninorm/nfd
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-ct-casefold.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-ct-casefold.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-ct-tolower
+++ b/modules/unicase/u32-ct-tolower
@@ -11,9 +11,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-ct-tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-ct-tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-ct-totitle
+++ b/modules/unicase/u32-ct-totitle
@@ -23,9 +23,9 @@
 stdbool
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-ct-totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-ct-totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-ct-toupper
+++ b/modules/unicase/u32-ct-toupper
@@ -11,9 +11,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-ct-toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-ct-toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-is-cased
+++ b/modules/unicase/u32-is-cased
@@ -15,9 +15,9 @@
 unistr/u32-cmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-is-cased.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-is-cased.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-is-cased-tests
+++ b/modules/unicase/u32-is-cased-tests
@@ -11,4 +11,4 @@
 TESTS += test-u32-is-cased
 check_PROGRAMS += test-u32-is-cased
 test_u32_is_cased_SOURCES = unicase/test-u32-is-cased.c
-
+test_u32_is_cased_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-is-casefolded
+++ b/modules/unicase/u32-is-casefolded
@@ -10,9 +10,9 @@
 unicase/u32-casefold
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-is-casefolded.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-is-casefolded.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-is-casefolded-tests
+++ b/modules/unicase/u32-is-casefolded-tests
@@ -11,4 +11,4 @@
 TESTS += test-u32-is-casefolded
 check_PROGRAMS += test-u32-is-casefolded
 test_u32_is_casefolded_SOURCES = unicase/test-u32-is-casefolded.c
-
+test_u32_is_casefolded_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-is-lowercase
+++ b/modules/unicase/u32-is-lowercase
@@ -10,9 +10,9 @@
 unicase/u32-tolower
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-is-lowercase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-is-lowercase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-is-lowercase-tests
+++ b/modules/unicase/u32-is-lowercase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u32-is-lowercase
 check_PROGRAMS += test-u32-is-lowercase
 test_u32_is_lowercase_SOURCES = unicase/test-u32-is-lowercase.c
-
+test_u32_is_lowercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-is-titlecase
+++ b/modules/unicase/u32-is-titlecase
@@ -10,9 +10,9 @@
 unicase/u32-totitle
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-is-titlecase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-is-titlecase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-is-titlecase-tests
+++ b/modules/unicase/u32-is-titlecase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u32-is-titlecase
 check_PROGRAMS += test-u32-is-titlecase
 test_u32_is_titlecase_SOURCES = unicase/test-u32-is-titlecase.c
-
+test_u32_is_titlecase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-is-uppercase
+++ b/modules/unicase/u32-is-uppercase
@@ -10,9 +10,9 @@
 unicase/u32-toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-is-uppercase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-is-uppercase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-is-uppercase-tests
+++ b/modules/unicase/u32-is-uppercase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u32-is-uppercase
 check_PROGRAMS += test-u32-is-uppercase
 test_u32_is_uppercase_SOURCES = unicase/test-u32-is-uppercase.c
-
+test_u32_is_uppercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-prefix-context
+++ b/modules/unicase/u32-prefix-context
@@ -15,9 +15,9 @@
 unistr/u32-prev
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-prefix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-prefix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-suffix-context
+++ b/modules/unicase/u32-suffix-context
@@ -14,9 +14,9 @@
 unistr/u32-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-suffix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-suffix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-tolower
+++ b/modules/unicase/u32-tolower
@@ -13,9 +13,9 @@
 unicase/tolower
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-tolower-tests
+++ b/modules/unicase/u32-tolower-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-tolower
 check_PROGRAMS += test-u32-tolower
 test_u32_tolower_SOURCES = unicase/test-u32-tolower.c
-
+test_u32_tolower_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-totitle
+++ b/modules/unicase/u32-totitle
@@ -12,9 +12,9 @@
 unicase/empty-suffix-context
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-totitle-tests
+++ b/modules/unicase/u32-totitle-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-totitle
 check_PROGRAMS += test-u32-totitle
 test_u32_totitle_SOURCES = unicase/test-u32-totitle.c
-
+test_u32_totitle_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u32-toupper
+++ b/modules/unicase/u32-toupper
@@ -13,9 +13,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u32-toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u32-toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u32-toupper-tests
+++ b/modules/unicase/u32-toupper-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-toupper
 check_PROGRAMS += test-u32-toupper
 test_u32_toupper_SOURCES = unicase/test-u32-toupper.c
-
+test_u32_toupper_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-casecmp
+++ b/modules/unicase/u8-casecmp
@@ -13,9 +13,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-casecmp.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-casecmp.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-casecmp-tests
+++ b/modules/unicase/u8-casecmp-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-casecmp
 check_PROGRAMS += test-u8-casecmp
 test_u8_casecmp_SOURCES = unicase/test-u8-casecmp.c
-
+test_u8_casecmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-casecoll
+++ b/modules/unicase/u8-casecoll
@@ -12,9 +12,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-casecoll.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-casecoll.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-casecoll-tests
+++ b/modules/unicase/u8-casecoll-tests
@@ -12,5 +12,5 @@
 TESTS += test-u8-casecoll
 check_PROGRAMS += test-u8-casecoll
 test_u8_casecoll_SOURCES = unicase/test-u8-casecoll.c
-test_u8_casecoll_LDADD = $(LDADD) @LIBICONV@
+test_u8_casecoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/unicase/u8-casefold
+++ b/modules/unicase/u8-casefold
@@ -12,9 +12,9 @@
 unicase/empty-suffix-context
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-casefold.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-casefold.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-casefold-tests
+++ b/modules/unicase/u8-casefold-tests
@@ -13,4 +13,4 @@
 TESTS += test-u8-casefold
 check_PROGRAMS += test-u8-casefold
 test_u8_casefold_SOURCES = unicase/test-u8-casefold.c
-
+test_u8_casefold_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-casexfrm
+++ b/modules/unicase/u8-casexfrm
@@ -14,9 +14,9 @@
 memxfrm
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-casexfrm.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-casexfrm.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-ct-casefold
+++ b/modules/unicase/u8-ct-casefold
@@ -15,9 +15,9 @@
 uninorm/nfd
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-ct-casefold.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-ct-casefold.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-ct-tolower
+++ b/modules/unicase/u8-ct-tolower
@@ -11,9 +11,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-ct-tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-ct-tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-ct-totitle
+++ b/modules/unicase/u8-ct-totitle
@@ -23,9 +23,9 @@
 stdbool
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-ct-totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-ct-totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-ct-toupper
+++ b/modules/unicase/u8-ct-toupper
@@ -11,9 +11,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-ct-toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-ct-toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-is-cased
+++ b/modules/unicase/u8-is-cased
@@ -15,9 +15,9 @@
 unistr/u8-cmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-is-cased.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-is-cased.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-is-cased-tests
+++ b/modules/unicase/u8-is-cased-tests
@@ -11,4 +11,4 @@
 TESTS += test-u8-is-cased
 check_PROGRAMS += test-u8-is-cased
 test_u8_is_cased_SOURCES = unicase/test-u8-is-cased.c
-
+test_u8_is_cased_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-is-casefolded
+++ b/modules/unicase/u8-is-casefolded
@@ -10,9 +10,9 @@
 unicase/u8-casefold
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-is-casefolded.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-is-casefolded.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-is-casefolded-tests
+++ b/modules/unicase/u8-is-casefolded-tests
@@ -11,4 +11,4 @@
 TESTS += test-u8-is-casefolded
 check_PROGRAMS += test-u8-is-casefolded
 test_u8_is_casefolded_SOURCES = unicase/test-u8-is-casefolded.c
-
+test_u8_is_casefolded_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-is-lowercase
+++ b/modules/unicase/u8-is-lowercase
@@ -10,9 +10,9 @@
 unicase/u8-tolower
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-is-lowercase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-is-lowercase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-is-lowercase-tests
+++ b/modules/unicase/u8-is-lowercase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u8-is-lowercase
 check_PROGRAMS += test-u8-is-lowercase
 test_u8_is_lowercase_SOURCES = unicase/test-u8-is-lowercase.c
-
+test_u8_is_lowercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-is-titlecase
+++ b/modules/unicase/u8-is-titlecase
@@ -10,9 +10,9 @@
 unicase/u8-totitle
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-is-titlecase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-is-titlecase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-is-titlecase-tests
+++ b/modules/unicase/u8-is-titlecase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u8-is-titlecase
 check_PROGRAMS += test-u8-is-titlecase
 test_u8_is_titlecase_SOURCES = unicase/test-u8-is-titlecase.c
-
+test_u8_is_titlecase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-is-uppercase
+++ b/modules/unicase/u8-is-uppercase
@@ -10,9 +10,9 @@
 unicase/u8-toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-is-uppercase.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-is-uppercase.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-is-uppercase-tests
+++ b/modules/unicase/u8-is-uppercase-tests
@@ -11,4 +11,4 @@
 TESTS += test-u8-is-uppercase
 check_PROGRAMS += test-u8-is-uppercase
 test_u8_is_uppercase_SOURCES = unicase/test-u8-is-uppercase.c
-
+test_u8_is_uppercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-prefix-context
+++ b/modules/unicase/u8-prefix-context
@@ -15,9 +15,9 @@
 unistr/u8-prev
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-prefix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-prefix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-suffix-context
+++ b/modules/unicase/u8-suffix-context
@@ -14,9 +14,9 @@
 unistr/u8-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-suffix-context.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-suffix-context.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-tolower
+++ b/modules/unicase/u8-tolower
@@ -13,9 +13,9 @@
 unicase/tolower
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-tolower.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-tolower.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-tolower-tests
+++ b/modules/unicase/u8-tolower-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-tolower
 check_PROGRAMS += test-u8-tolower
 test_u8_tolower_SOURCES = unicase/test-u8-tolower.c
-
+test_u8_tolower_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-totitle
+++ b/modules/unicase/u8-totitle
@@ -12,9 +12,9 @@
 unicase/empty-suffix-context
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-totitle.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-totitle.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-totitle-tests
+++ b/modules/unicase/u8-totitle-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-totitle
 check_PROGRAMS += test-u8-totitle
 test_u8_totitle_SOURCES = unicase/test-u8-totitle.c
-
+test_u8_totitle_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/u8-toupper
+++ b/modules/unicase/u8-toupper
@@ -13,9 +13,9 @@
 unicase/toupper
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/u8-toupper.c])
 
 Makefile.am:
-lib_SOURCES += unicase/u8-toupper.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/u8-toupper-tests
+++ b/modules/unicase/u8-toupper-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-toupper
 check_PROGRAMS += test-u8-toupper
 test_u8_toupper_SOURCES = unicase/test-u8-toupper.c
-
+test_u8_toupper_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unicase/ulc-casecmp
+++ b/modules/unicase/ulc-casecmp
@@ -15,9 +15,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/ulc-casecmp.c])
 
 Makefile.am:
-lib_SOURCES += unicase/ulc-casecmp.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/ulc-casecmp-tests
+++ b/modules/unicase/ulc-casecmp-tests
@@ -21,5 +21,5 @@
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-ulc-casecmp
 test_ulc_casecmp_SOURCES = unicase/test-ulc-casecmp.c
-test_ulc_casecmp_LDADD = $(LDADD) @LIBICONV@
+test_ulc_casecmp_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/unicase/ulc-casecoll
+++ b/modules/unicase/ulc-casecoll
@@ -11,9 +11,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/ulc-casecoll.c])
 
 Makefile.am:
-lib_SOURCES += unicase/ulc-casecoll.c
 
 Include:
 "unicase.h"
--- a/modules/unicase/ulc-casecoll-tests
+++ b/modules/unicase/ulc-casecoll-tests
@@ -21,5 +21,5 @@
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-ulc-casecoll
 test_ulc_casecoll_SOURCES = unicase/test-ulc-casecoll.c
-test_ulc_casecoll_LDADD = $(LDADD) @LIBICONV@
+test_ulc_casecoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/unicase/ulc-casexfrm
+++ b/modules/unicase/ulc-casexfrm
@@ -11,9 +11,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.1], [unicase/ulc-casexfrm.c])
 
 Makefile.am:
-lib_SOURCES += unicase/ulc-casexfrm.c
 
 Include:
 "unicase.h"
--- a/modules/uniconv/base
+++ b/modules/uniconv/base
@@ -2,17 +2,28 @@
 Base layer for conversion from/to legacy encodings.
 
 Files:
-lib/uniconv.h
+lib/uniconv.in.h
 lib/iconveh.h
 lib/striconveha.h
 lib/localcharset.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [uniconv.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNICONV_H)
+
+uniconv.h: uniconv.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/uniconv.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += uniconv.h uniconv.h-t
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u16-conv-from-enc
+++ b/modules/uniconv/u16-conv-from-enc
@@ -15,9 +15,9 @@
 
 configure.ac:
 AC_REQUIRE([gl_BIGENDIAN])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u16-conv-from-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u16-conv-from-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u16-conv-from-enc-tests
+++ b/modules/uniconv/u16-conv-from-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u16-conv-from-enc
 check_PROGRAMS += test-u16-conv-from-enc
 test_u16_conv_from_enc_SOURCES = uniconv/test-u16-conv-from-enc.c
-test_u16_conv_from_enc_LDADD = $(LDADD) @LIBICONV@
+test_u16_conv_from_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u16-conv-to-enc
+++ b/modules/uniconv/u16-conv-to-enc
@@ -16,9 +16,9 @@
 
 configure.ac:
 AC_REQUIRE([gl_BIGENDIAN])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u16-conv-to-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u16-conv-to-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u16-conv-to-enc-tests
+++ b/modules/uniconv/u16-conv-to-enc-tests
@@ -10,5 +10,5 @@
 TESTS += test-u16-conv-to-enc
 check_PROGRAMS += test-u16-conv-to-enc
 test_u16_conv_to_enc_SOURCES = uniconv/test-u16-conv-to-enc.c
-test_u16_conv_to_enc_LDADD = $(LDADD) @LIBICONV@
+test_u16_conv_to_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u16-strconv-from-enc
+++ b/modules/uniconv/u16-strconv-from-enc
@@ -11,9 +11,9 @@
 unistr/u16-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u16-strconv-from-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u16-strconv-from-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u16-strconv-from-enc-tests
+++ b/modules/uniconv/u16-strconv-from-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u16-strconv-from-enc
 check_PROGRAMS += test-u16-strconv-from-enc
 test_u16_strconv_from_enc_SOURCES = uniconv/test-u16-strconv-from-enc.c
-test_u16_strconv_from_enc_LDADD = $(LDADD) @LIBICONV@
+test_u16_strconv_from_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u16-strconv-from-locale
+++ b/modules/uniconv/u16-strconv-from-locale
@@ -10,9 +10,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u16-strconv-from-locale.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u16-strconv-from-locale.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u16-strconv-to-enc
+++ b/modules/uniconv/u16-strconv-to-enc
@@ -14,9 +14,9 @@
 
 configure.ac:
 AC_REQUIRE([gl_BIGENDIAN])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u16-strconv-to-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u16-strconv-to-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u16-strconv-to-enc-tests
+++ b/modules/uniconv/u16-strconv-to-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u16-strconv-to-enc
 check_PROGRAMS += test-u16-strconv-to-enc
 test_u16_strconv_to_enc_SOURCES = uniconv/test-u16-strconv-to-enc.c
-test_u16_strconv_to_enc_LDADD = $(LDADD) @LIBICONV@
+test_u16_strconv_to_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u16-strconv-to-locale
+++ b/modules/uniconv/u16-strconv-to-locale
@@ -10,9 +10,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u16-strconv-to-locale.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u16-strconv-to-locale.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u32-conv-from-enc
+++ b/modules/uniconv/u32-conv-from-enc
@@ -14,9 +14,9 @@
 unistr/u32-mblen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u32-conv-from-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u32-conv-from-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u32-conv-from-enc-tests
+++ b/modules/uniconv/u32-conv-from-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u32-conv-from-enc
 check_PROGRAMS += test-u32-conv-from-enc
 test_u32_conv_from_enc_SOURCES = uniconv/test-u32-conv-from-enc.c
-test_u32_conv_from_enc_LDADD = $(LDADD) @LIBICONV@
+test_u32_conv_from_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u32-conv-to-enc
+++ b/modules/uniconv/u32-conv-to-enc
@@ -14,9 +14,9 @@
 unistr/u8-mblen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u32-conv-to-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u32-conv-to-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u32-conv-to-enc-tests
+++ b/modules/uniconv/u32-conv-to-enc-tests
@@ -10,5 +10,5 @@
 TESTS += test-u32-conv-to-enc
 check_PROGRAMS += test-u32-conv-to-enc
 test_u32_conv_to_enc_SOURCES = uniconv/test-u32-conv-to-enc.c
-test_u32_conv_to_enc_LDADD = $(LDADD) @LIBICONV@
+test_u32_conv_to_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u32-strconv-from-enc
+++ b/modules/uniconv/u32-strconv-from-enc
@@ -11,9 +11,9 @@
 unistr/u32-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u32-strconv-from-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u32-strconv-from-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u32-strconv-from-enc-tests
+++ b/modules/uniconv/u32-strconv-from-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u32-strconv-from-enc
 check_PROGRAMS += test-u32-strconv-from-enc
 test_u32_strconv_from_enc_SOURCES = uniconv/test-u32-strconv-from-enc.c
-test_u32_strconv_from_enc_LDADD = $(LDADD) @LIBICONV@
+test_u32_strconv_from_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u32-strconv-from-locale
+++ b/modules/uniconv/u32-strconv-from-locale
@@ -10,9 +10,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u32-strconv-from-locale.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u32-strconv-from-locale.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u32-strconv-to-enc
+++ b/modules/uniconv/u32-strconv-to-enc
@@ -13,9 +13,9 @@
 unistr/u32-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u32-strconv-to-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u32-strconv-to-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u32-strconv-to-enc-tests
+++ b/modules/uniconv/u32-strconv-to-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u32-strconv-to-enc
 check_PROGRAMS += test-u32-strconv-to-enc
 test_u32_strconv_to_enc_SOURCES = uniconv/test-u32-strconv-to-enc.c
-test_u32_strconv_to_enc_LDADD = $(LDADD) @LIBICONV@
+test_u32_strconv_to_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u32-strconv-to-locale
+++ b/modules/uniconv/u32-strconv-to-locale
@@ -10,9 +10,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u32-strconv-to-locale.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u32-strconv-to-locale.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u8-conv-from-enc
+++ b/modules/uniconv/u8-conv-from-enc
@@ -12,9 +12,9 @@
 unistr/u8-mblen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u8-conv-from-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u8-conv-from-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u8-conv-from-enc-tests
+++ b/modules/uniconv/u8-conv-from-enc-tests
@@ -12,5 +12,5 @@
 TESTS += test-u8-conv-from-enc
 check_PROGRAMS += test-u8-conv-from-enc
 test_u8_conv_from_enc_SOURCES = uniconv/test-u8-conv-from-enc.c
-test_u8_conv_from_enc_LDADD = $(LDADD) @LIBICONV@
+test_u8_conv_from_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u8-conv-to-enc
+++ b/modules/uniconv/u8-conv-to-enc
@@ -11,9 +11,9 @@
 unistr/u8-check
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u8-conv-to-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u8-conv-to-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u8-conv-to-enc-tests
+++ b/modules/uniconv/u8-conv-to-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u8-conv-to-enc
 check_PROGRAMS += test-u8-conv-to-enc
 test_u8_conv_to_enc_SOURCES = uniconv/test-u8-conv-to-enc.c
-test_u8_conv_to_enc_LDADD = $(LDADD) @LIBICONV@
+test_u8_conv_to_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u8-strconv-from-enc
+++ b/modules/uniconv/u8-strconv-from-enc
@@ -11,9 +11,9 @@
 unistr/u8-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u8-strconv-from-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u8-strconv-from-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u8-strconv-from-enc-tests
+++ b/modules/uniconv/u8-strconv-from-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u8-strconv-from-enc
 check_PROGRAMS += test-u8-strconv-from-enc
 test_u8_strconv_from_enc_SOURCES = uniconv/test-u8-strconv-from-enc.c
-test_u8_strconv_from_enc_LDADD = $(LDADD) @LIBICONV@
+test_u8_strconv_from_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u8-strconv-from-locale
+++ b/modules/uniconv/u8-strconv-from-locale
@@ -10,9 +10,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u8-strconv-from-locale.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u8-strconv-from-locale.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u8-strconv-to-enc
+++ b/modules/uniconv/u8-strconv-to-enc
@@ -12,9 +12,9 @@
 unistr/u8-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u8-strconv-to-enc.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u8-strconv-to-enc.c
 
 Include:
 "uniconv.h"
--- a/modules/uniconv/u8-strconv-to-enc-tests
+++ b/modules/uniconv/u8-strconv-to-enc-tests
@@ -11,5 +11,5 @@
 TESTS += test-u8-strconv-to-enc
 check_PROGRAMS += test-u8-strconv-to-enc
 test_u8_strconv_to_enc_SOURCES = uniconv/test-u8-strconv-to-enc.c
-test_u8_strconv_to_enc_LDADD = $(LDADD) @LIBICONV@
+test_u8_strconv_to_enc_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniconv/u8-strconv-to-locale
+++ b/modules/uniconv/u8-strconv-to-locale
@@ -10,9 +10,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniconv/u8-strconv-to-locale.c])
 
 Makefile.am:
-lib_SOURCES += uniconv/u8-strconv-to-locale.c
 
 Include:
 "uniconv.h"
--- a/modules/unictype/base
+++ b/modules/unictype/base
@@ -2,15 +2,26 @@
 Base layer for Unicode classification and properties.
 
 Files:
-lib/unictype.h
+lib/unictype.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 stdbool
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [unictype.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNICTYPE_H)
+
+unictype.h: unictype.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/unictype.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += unictype.h unictype.h-t
 
 Include:
 "unictype.h"
--- a/modules/unictype/bidicategory-byname
+++ b/modules/unictype/bidicategory-byname
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/bidi_byname.c])
 
 Makefile.am:
-lib_SOURCES += unictype/bidi_byname.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/bidicategory-byname-tests
+++ b/modules/unictype/bidicategory-byname-tests
@@ -10,4 +10,4 @@
 TESTS += test-bidi_byname
 check_PROGRAMS += test-bidi_byname
 test_bidi_byname_SOURCES = unictype/test-bidi_byname.c
-
+test_bidi_byname_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/bidicategory-name
+++ b/modules/unictype/bidicategory-name
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/bidi_name.c])
 
 Makefile.am:
-lib_SOURCES += unictype/bidi_name.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/bidicategory-name-tests
+++ b/modules/unictype/bidicategory-name-tests
@@ -10,4 +10,4 @@
 TESTS += test-bidi_name
 check_PROGRAMS += test-bidi_name
 test_bidi_name_SOURCES = unictype/test-bidi_name.c
-
+test_bidi_name_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/bidicategory-of
+++ b/modules/unictype/bidicategory-of
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/bidi_of.c])
 
 Makefile.am:
-lib_SOURCES += unictype/bidi_of.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/bidicategory-of-tests
+++ b/modules/unictype/bidicategory-of-tests
@@ -10,4 +10,4 @@
 TESTS += test-bidi_of
 check_PROGRAMS += test-bidi_of
 test_bidi_of_SOURCES = unictype/test-bidi_of.c
-
+test_bidi_of_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/bidicategory-test
+++ b/modules/unictype/bidicategory-test
@@ -9,9 +9,9 @@
 unictype/bidicategory-of
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/bidi_test.c])
 
 Makefile.am:
-lib_SOURCES += unictype/bidi_test.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/bidicategory-test-tests
+++ b/modules/unictype/bidicategory-test-tests
@@ -11,4 +11,4 @@
 TESTS += test-bidi_test
 check_PROGRAMS += test-bidi_test
 test_bidi_test_SOURCES = unictype/test-bidi_test.c
-
+test_bidi_test_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/block-list
+++ b/modules/unictype/block-list
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/blocks.c])
 
 Makefile.am:
-lib_SOURCES += unictype/blocks.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/block-list-tests
+++ b/modules/unictype/block-list-tests
@@ -10,4 +10,4 @@
 TESTS += test-block_list
 check_PROGRAMS += test-block_list
 test_block_list_SOURCES = unictype/test-block_list.c
-
+test_block_list_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/block-of-tests
+++ b/modules/unictype/block-of-tests
@@ -12,4 +12,4 @@
 TESTS += test-block_of
 check_PROGRAMS += test-block_of
 test_block_of_SOURCES = unictype/test-block_of.c
-
+test_block_of_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/block-test
+++ b/modules/unictype/block-test
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/block_test.c])
 
 Makefile.am:
-lib_SOURCES += unictype/block_test.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/block-test-tests
+++ b/modules/unictype/block-test-tests
@@ -10,4 +10,4 @@
 TESTS += test-block_test
 check_PROGRAMS += test-block_test
 test_block_test_SOURCES = unictype/test-block_test.c
-
+test_block_test_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-C
+++ b/modules/unictype/category-C
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_C.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_C.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-C-tests
+++ b/modules/unictype/category-C-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_C
 check_PROGRAMS += test-categ_C
 test_categ_C_SOURCES = unictype/test-categ_C.c
-
+test_categ_C_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Cc
+++ b/modules/unictype/category-Cc
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Cc.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Cc.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Cc-tests
+++ b/modules/unictype/category-Cc-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Cc
 check_PROGRAMS += test-categ_Cc
 test_categ_Cc_SOURCES = unictype/test-categ_Cc.c
-
+test_categ_Cc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Cf
+++ b/modules/unictype/category-Cf
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Cf.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Cf.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Cf-tests
+++ b/modules/unictype/category-Cf-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Cf
 check_PROGRAMS += test-categ_Cf
 test_categ_Cf_SOURCES = unictype/test-categ_Cf.c
-
+test_categ_Cf_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Cn
+++ b/modules/unictype/category-Cn
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Cn.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Cn.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Cn-tests
+++ b/modules/unictype/category-Cn-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Cn
 check_PROGRAMS += test-categ_Cn
 test_categ_Cn_SOURCES = unictype/test-categ_Cn.c
-
+test_categ_Cn_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Co
+++ b/modules/unictype/category-Co
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Co.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Co.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Co-tests
+++ b/modules/unictype/category-Co-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Co
 check_PROGRAMS += test-categ_Co
 test_categ_Co_SOURCES = unictype/test-categ_Co.c
-
+test_categ_Co_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Cs
+++ b/modules/unictype/category-Cs
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Cs.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Cs.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Cs-tests
+++ b/modules/unictype/category-Cs-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Cs
 check_PROGRAMS += test-categ_Cs
 test_categ_Cs_SOURCES = unictype/test-categ_Cs.c
-
+test_categ_Cs_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-L
+++ b/modules/unictype/category-L
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_L.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_L.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-L-tests
+++ b/modules/unictype/category-L-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_L
 check_PROGRAMS += test-categ_L
 test_categ_L_SOURCES = unictype/test-categ_L.c
-
+test_categ_L_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Ll
+++ b/modules/unictype/category-Ll
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Ll.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Ll.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Ll-tests
+++ b/modules/unictype/category-Ll-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Ll
 check_PROGRAMS += test-categ_Ll
 test_categ_Ll_SOURCES = unictype/test-categ_Ll.c
-
+test_categ_Ll_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Lm
+++ b/modules/unictype/category-Lm
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Lm.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Lm.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Lm-tests
+++ b/modules/unictype/category-Lm-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Lm
 check_PROGRAMS += test-categ_Lm
 test_categ_Lm_SOURCES = unictype/test-categ_Lm.c
-
+test_categ_Lm_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Lo
+++ b/modules/unictype/category-Lo
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Lo.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Lo.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Lo-tests
+++ b/modules/unictype/category-Lo-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Lo
 check_PROGRAMS += test-categ_Lo
 test_categ_Lo_SOURCES = unictype/test-categ_Lo.c
-
+test_categ_Lo_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Lt
+++ b/modules/unictype/category-Lt
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Lt.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Lt.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Lt-tests
+++ b/modules/unictype/category-Lt-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Lt
 check_PROGRAMS += test-categ_Lt
 test_categ_Lt_SOURCES = unictype/test-categ_Lt.c
-
+test_categ_Lt_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Lu
+++ b/modules/unictype/category-Lu
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Lu.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Lu.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Lu-tests
+++ b/modules/unictype/category-Lu-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Lu
 check_PROGRAMS += test-categ_Lu
 test_categ_Lu_SOURCES = unictype/test-categ_Lu.c
-
+test_categ_Lu_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-M
+++ b/modules/unictype/category-M
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_M.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_M.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-M-tests
+++ b/modules/unictype/category-M-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_M
 check_PROGRAMS += test-categ_M
 test_categ_M_SOURCES = unictype/test-categ_M.c
-
+test_categ_M_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Mc
+++ b/modules/unictype/category-Mc
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Mc.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Mc.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Mc-tests
+++ b/modules/unictype/category-Mc-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Mc
 check_PROGRAMS += test-categ_Mc
 test_categ_Mc_SOURCES = unictype/test-categ_Mc.c
-
+test_categ_Mc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Me
+++ b/modules/unictype/category-Me
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Me.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Me.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Me-tests
+++ b/modules/unictype/category-Me-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Me
 check_PROGRAMS += test-categ_Me
 test_categ_Me_SOURCES = unictype/test-categ_Me.c
-
+test_categ_Me_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Mn
+++ b/modules/unictype/category-Mn
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Mn.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Mn.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Mn-tests
+++ b/modules/unictype/category-Mn-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Mn
 check_PROGRAMS += test-categ_Mn
 test_categ_Mn_SOURCES = unictype/test-categ_Mn.c
-
+test_categ_Mn_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-N
+++ b/modules/unictype/category-N
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_N.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_N.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-N-tests
+++ b/modules/unictype/category-N-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_N
 check_PROGRAMS += test-categ_N
 test_categ_N_SOURCES = unictype/test-categ_N.c
-
+test_categ_N_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Nd
+++ b/modules/unictype/category-Nd
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Nd.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Nd.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Nd-tests
+++ b/modules/unictype/category-Nd-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Nd
 check_PROGRAMS += test-categ_Nd
 test_categ_Nd_SOURCES = unictype/test-categ_Nd.c
-
+test_categ_Nd_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Nl
+++ b/modules/unictype/category-Nl
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Nl.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Nl.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Nl-tests
+++ b/modules/unictype/category-Nl-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Nl
 check_PROGRAMS += test-categ_Nl
 test_categ_Nl_SOURCES = unictype/test-categ_Nl.c
-
+test_categ_Nl_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-No
+++ b/modules/unictype/category-No
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_No.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_No.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-No-tests
+++ b/modules/unictype/category-No-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_No
 check_PROGRAMS += test-categ_No
 test_categ_No_SOURCES = unictype/test-categ_No.c
-
+test_categ_No_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-P
+++ b/modules/unictype/category-P
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_P.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_P.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-P-tests
+++ b/modules/unictype/category-P-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_P
 check_PROGRAMS += test-categ_P
 test_categ_P_SOURCES = unictype/test-categ_P.c
-
+test_categ_P_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Pc
+++ b/modules/unictype/category-Pc
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Pc.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Pc.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Pc-tests
+++ b/modules/unictype/category-Pc-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Pc
 check_PROGRAMS += test-categ_Pc
 test_categ_Pc_SOURCES = unictype/test-categ_Pc.c
-
+test_categ_Pc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Pd
+++ b/modules/unictype/category-Pd
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Pd.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Pd.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Pd-tests
+++ b/modules/unictype/category-Pd-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Pd
 check_PROGRAMS += test-categ_Pd
 test_categ_Pd_SOURCES = unictype/test-categ_Pd.c
-
+test_categ_Pd_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Pe
+++ b/modules/unictype/category-Pe
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Pe.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Pe.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Pe-tests
+++ b/modules/unictype/category-Pe-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Pe
 check_PROGRAMS += test-categ_Pe
 test_categ_Pe_SOURCES = unictype/test-categ_Pe.c
-
+test_categ_Pe_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Pf
+++ b/modules/unictype/category-Pf
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Pf.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Pf.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Pf-tests
+++ b/modules/unictype/category-Pf-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Pf
 check_PROGRAMS += test-categ_Pf
 test_categ_Pf_SOURCES = unictype/test-categ_Pf.c
-
+test_categ_Pf_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Pi
+++ b/modules/unictype/category-Pi
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Pi.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Pi.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Pi-tests
+++ b/modules/unictype/category-Pi-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Pi
 check_PROGRAMS += test-categ_Pi
 test_categ_Pi_SOURCES = unictype/test-categ_Pi.c
-
+test_categ_Pi_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Po
+++ b/modules/unictype/category-Po
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Po.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Po.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Po-tests
+++ b/modules/unictype/category-Po-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Po
 check_PROGRAMS += test-categ_Po
 test_categ_Po_SOURCES = unictype/test-categ_Po.c
-
+test_categ_Po_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Ps
+++ b/modules/unictype/category-Ps
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Ps.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Ps.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Ps-tests
+++ b/modules/unictype/category-Ps-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Ps
 check_PROGRAMS += test-categ_Ps
 test_categ_Ps_SOURCES = unictype/test-categ_Ps.c
-
+test_categ_Ps_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-S
+++ b/modules/unictype/category-S
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_S.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_S.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-S-tests
+++ b/modules/unictype/category-S-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_S
 check_PROGRAMS += test-categ_S
 test_categ_S_SOURCES = unictype/test-categ_S.c
-
+test_categ_S_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Sc
+++ b/modules/unictype/category-Sc
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Sc.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Sc.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Sc-tests
+++ b/modules/unictype/category-Sc-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Sc
 check_PROGRAMS += test-categ_Sc
 test_categ_Sc_SOURCES = unictype/test-categ_Sc.c
-
+test_categ_Sc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Sk
+++ b/modules/unictype/category-Sk
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Sk.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Sk.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Sk-tests
+++ b/modules/unictype/category-Sk-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Sk
 check_PROGRAMS += test-categ_Sk
 test_categ_Sk_SOURCES = unictype/test-categ_Sk.c
-
+test_categ_Sk_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Sm
+++ b/modules/unictype/category-Sm
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Sm.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Sm.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Sm-tests
+++ b/modules/unictype/category-Sm-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Sm
 check_PROGRAMS += test-categ_Sm
 test_categ_Sm_SOURCES = unictype/test-categ_Sm.c
-
+test_categ_Sm_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-So
+++ b/modules/unictype/category-So
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_So.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_So.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-So-tests
+++ b/modules/unictype/category-So-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_So
 check_PROGRAMS += test-categ_So
 test_categ_So_SOURCES = unictype/test-categ_So.c
-
+test_categ_So_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Z
+++ b/modules/unictype/category-Z
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Z.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Z.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Z-tests
+++ b/modules/unictype/category-Z-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Z
 check_PROGRAMS += test-categ_Z
 test_categ_Z_SOURCES = unictype/test-categ_Z.c
-
+test_categ_Z_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Zl
+++ b/modules/unictype/category-Zl
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Zl.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Zl.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Zl-tests
+++ b/modules/unictype/category-Zl-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Zl
 check_PROGRAMS += test-categ_Zl
 test_categ_Zl_SOURCES = unictype/test-categ_Zl.c
-
+test_categ_Zl_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Zp
+++ b/modules/unictype/category-Zp
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Zp.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Zp.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Zp-tests
+++ b/modules/unictype/category-Zp-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Zp
 check_PROGRAMS += test-categ_Zp
 test_categ_Zp_SOURCES = unictype/test-categ_Zp.c
-
+test_categ_Zp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-Zs
+++ b/modules/unictype/category-Zs
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_Zs.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_Zs.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-Zs-tests
+++ b/modules/unictype/category-Zs-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_Zs
 check_PROGRAMS += test-categ_Zs
 test_categ_Zs_SOURCES = unictype/test-categ_Zs.c
-
+test_categ_Zs_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-and
+++ b/modules/unictype/category-and
@@ -10,9 +10,9 @@
 unictype/category-test-withtable
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_and.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_and.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-and-not
+++ b/modules/unictype/category-and-not
@@ -10,9 +10,9 @@
 unictype/category-test-withtable
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_and_not.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_and_not.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-and-not-tests
+++ b/modules/unictype/category-and-not-tests
@@ -16,4 +16,4 @@
 TESTS += test-categ_and_not
 check_PROGRAMS += test-categ_and_not
 test_categ_and_not_SOURCES = unictype/test-categ_and_not.c
-
+test_categ_and_not_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-and-tests
+++ b/modules/unictype/category-and-tests
@@ -16,4 +16,4 @@
 TESTS += test-categ_and
 check_PROGRAMS += test-categ_and
 test_categ_and_SOURCES = unictype/test-categ_and.c
-
+test_categ_and_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-byname
+++ b/modules/unictype/category-byname
@@ -46,9 +46,9 @@
 unictype/category-none
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_byname.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_byname.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-byname-tests
+++ b/modules/unictype/category-byname-tests
@@ -12,4 +12,4 @@
 TESTS += test-categ_byname
 check_PROGRAMS += test-categ_byname
 test_categ_byname_SOURCES = unictype/test-categ_byname.c
-
+test_categ_byname_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-name
+++ b/modules/unictype/category-name
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_name.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_name.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-name-tests
+++ b/modules/unictype/category-name-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_name
 check_PROGRAMS += test-categ_name
 test_categ_name_SOURCES = unictype/test-categ_name.c
-
+test_categ_name_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-none
+++ b/modules/unictype/category-none
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_none.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_none.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-none-tests
+++ b/modules/unictype/category-none-tests
@@ -11,4 +11,4 @@
 TESTS += test-categ_none
 check_PROGRAMS += test-categ_none
 test_categ_none_SOURCES = unictype/test-categ_none.c
-
+test_categ_none_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-of
+++ b/modules/unictype/category-of
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_of.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_of.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-of-tests
+++ b/modules/unictype/category-of-tests
@@ -11,4 +11,4 @@
 TESTS += test-categ_of
 check_PROGRAMS += test-categ_of
 test_categ_of_SOURCES = unictype/test-categ_of.c
-
+test_categ_of_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-or
+++ b/modules/unictype/category-or
@@ -9,9 +9,9 @@
 unictype/category-test-withtable
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_or.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_or.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-or-tests
+++ b/modules/unictype/category-or-tests
@@ -13,4 +13,4 @@
 TESTS += test-categ_or
 check_PROGRAMS += test-categ_or
 test_categ_or_SOURCES = unictype/test-categ_or.c
-
+test_categ_or_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/category-test
+++ b/modules/unictype/category-test
@@ -10,9 +10,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/categ_test.c])
 
 Makefile.am:
-lib_SOURCES += unictype/categ_test.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/category-test-withtable-tests
+++ b/modules/unictype/category-test-withtable-tests
@@ -10,4 +10,4 @@
 TESTS += test-categ_test_withtable
 check_PROGRAMS += test-categ_test_withtable
 test_categ_test_withtable_SOURCES = unictype/test-categ_test_withtable.c
-
+test_categ_test_withtable_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/combining-class
+++ b/modules/unictype/combining-class
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/combining.c])
 
 Makefile.am:
-lib_SOURCES += unictype/combining.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/combining-class-tests
+++ b/modules/unictype/combining-class-tests
@@ -10,4 +10,4 @@
 TESTS += test-combining
 check_PROGRAMS += test-combining
 test_combining_SOURCES = unictype/test-combining.c
-
+test_combining_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-alnum
+++ b/modules/unictype/ctype-alnum
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_alnum.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_alnum.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-alnum-tests
+++ b/modules/unictype/ctype-alnum-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_alnum
 check_PROGRAMS += test-ctype_alnum
 test_ctype_alnum_SOURCES = unictype/test-ctype_alnum.c
-
+test_ctype_alnum_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-alpha
+++ b/modules/unictype/ctype-alpha
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_alpha.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_alpha.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-alpha-tests
+++ b/modules/unictype/ctype-alpha-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_alpha
 check_PROGRAMS += test-ctype_alpha
 test_ctype_alpha_SOURCES = unictype/test-ctype_alpha.c
-
+test_ctype_alpha_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-blank
+++ b/modules/unictype/ctype-blank
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_blank.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_blank.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-blank-tests
+++ b/modules/unictype/ctype-blank-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_blank
 check_PROGRAMS += test-ctype_blank
 test_ctype_blank_SOURCES = unictype/test-ctype_blank.c
-
+test_ctype_blank_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-cntrl
+++ b/modules/unictype/ctype-cntrl
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_cntrl.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_cntrl.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-cntrl-tests
+++ b/modules/unictype/ctype-cntrl-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_cntrl
 check_PROGRAMS += test-ctype_cntrl
 test_ctype_cntrl_SOURCES = unictype/test-ctype_cntrl.c
-
+test_ctype_cntrl_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-digit
+++ b/modules/unictype/ctype-digit
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-digit-tests
+++ b/modules/unictype/ctype-digit-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_digit
 check_PROGRAMS += test-ctype_digit
 test_ctype_digit_SOURCES = unictype/test-ctype_digit.c
-
+test_ctype_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-graph
+++ b/modules/unictype/ctype-graph
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_graph.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_graph.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-graph-tests
+++ b/modules/unictype/ctype-graph-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_graph
 check_PROGRAMS += test-ctype_graph
 test_ctype_graph_SOURCES = unictype/test-ctype_graph.c
-
+test_ctype_graph_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-lower
+++ b/modules/unictype/ctype-lower
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_lower.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_lower.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-lower-tests
+++ b/modules/unictype/ctype-lower-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_lower
 check_PROGRAMS += test-ctype_lower
 test_ctype_lower_SOURCES = unictype/test-ctype_lower.c
-
+test_ctype_lower_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-print
+++ b/modules/unictype/ctype-print
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_print.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_print.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-print-tests
+++ b/modules/unictype/ctype-print-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_print
 check_PROGRAMS += test-ctype_print
 test_ctype_print_SOURCES = unictype/test-ctype_print.c
-
+test_ctype_print_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-punct
+++ b/modules/unictype/ctype-punct
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_punct.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_punct.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-punct-tests
+++ b/modules/unictype/ctype-punct-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_punct
 check_PROGRAMS += test-ctype_punct
 test_ctype_punct_SOURCES = unictype/test-ctype_punct.c
-
+test_ctype_punct_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-space
+++ b/modules/unictype/ctype-space
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_space.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_space.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-space-tests
+++ b/modules/unictype/ctype-space-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_space
 check_PROGRAMS += test-ctype_space
 test_ctype_space_SOURCES = unictype/test-ctype_space.c
-
+test_ctype_space_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-upper
+++ b/modules/unictype/ctype-upper
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_upper.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_upper.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-upper-tests
+++ b/modules/unictype/ctype-upper-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_upper
 check_PROGRAMS += test-ctype_upper
 test_ctype_upper_SOURCES = unictype/test-ctype_upper.c
-
+test_ctype_upper_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/ctype-xdigit
+++ b/modules/unictype/ctype-xdigit
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/ctype_xdigit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/ctype_xdigit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/ctype-xdigit-tests
+++ b/modules/unictype/ctype-xdigit-tests
@@ -12,4 +12,4 @@
 TESTS += test-ctype_xdigit
 check_PROGRAMS += test-ctype_xdigit
 test_ctype_xdigit_SOURCES = unictype/test-ctype_xdigit.c
-
+test_ctype_xdigit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/decimal-digit
+++ b/modules/unictype/decimal-digit
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/decdigit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/decdigit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/decimal-digit-tests
+++ b/modules/unictype/decimal-digit-tests
@@ -11,4 +11,4 @@
 TESTS += test-decdigit
 check_PROGRAMS += test-decdigit
 test_decdigit_SOURCES = unictype/test-decdigit.c
-
+test_decdigit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/digit
+++ b/modules/unictype/digit
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/digit-tests
+++ b/modules/unictype/digit-tests
@@ -11,4 +11,4 @@
 TESTS += test-digit
 check_PROGRAMS += test-digit
 test_digit_SOURCES = unictype/test-digit.c
-
+test_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/mirror
+++ b/modules/unictype/mirror
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/mirror.c])
 
 Makefile.am:
-lib_SOURCES += unictype/mirror.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/mirror-tests
+++ b/modules/unictype/mirror-tests
@@ -10,4 +10,4 @@
 TESTS += test-mirror
 check_PROGRAMS += test-mirror
 test_mirror_SOURCES = unictype/test-mirror.c
-
+test_mirror_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/numeric
+++ b/modules/unictype/numeric
@@ -9,9 +9,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/numeric.c])
 
 Makefile.am:
-lib_SOURCES += unictype/numeric.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/numeric-tests
+++ b/modules/unictype/numeric-tests
@@ -11,4 +11,4 @@
 TESTS += test-numeric
 check_PROGRAMS += test-numeric
 test_numeric_SOURCES = unictype/test-numeric.c
-
+test_numeric_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-alphabetic
+++ b/modules/unictype/property-alphabetic
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_alphabetic.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_alphabetic.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-alphabetic-tests
+++ b/modules/unictype/property-alphabetic-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_alphabetic
 check_PROGRAMS += test-pr_alphabetic
 test_pr_alphabetic_SOURCES = unictype/test-pr_alphabetic.c
-
+test_pr_alphabetic_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-ascii-hex-digit
+++ b/modules/unictype/property-ascii-hex-digit
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_ascii_hex_digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_ascii_hex_digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-ascii-hex-digit-tests
+++ b/modules/unictype/property-ascii-hex-digit-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_ascii_hex_digit
 check_PROGRAMS += test-pr_ascii_hex_digit
 test_pr_ascii_hex_digit_SOURCES = unictype/test-pr_ascii_hex_digit.c
-
+test_pr_ascii_hex_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-arabic-digit
+++ b/modules/unictype/property-bidi-arabic-digit
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_arabic_digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_arabic_digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-arabic-digit-tests
+++ b/modules/unictype/property-bidi-arabic-digit-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_arabic_digit
 check_PROGRAMS += test-pr_bidi_arabic_digit
 test_pr_bidi_arabic_digit_SOURCES = unictype/test-pr_bidi_arabic_digit.c
-
+test_pr_bidi_arabic_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-arabic-right-to-left
+++ b/modules/unictype/property-bidi-arabic-right-to-left
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_arabic_right_to_left.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_arabic_right_to_left.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-arabic-right-to-left-tests
+++ b/modules/unictype/property-bidi-arabic-right-to-left-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_arabic_right_to_left
 check_PROGRAMS += test-pr_bidi_arabic_right_to_left
 test_pr_bidi_arabic_right_to_left_SOURCES = unictype/test-pr_bidi_arabic_right_to_left.c
-
+test_pr_bidi_arabic_right_to_left_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-block-separator
+++ b/modules/unictype/property-bidi-block-separator
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_block_separator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_block_separator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-block-separator-tests
+++ b/modules/unictype/property-bidi-block-separator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_block_separator
 check_PROGRAMS += test-pr_bidi_block_separator
 test_pr_bidi_block_separator_SOURCES = unictype/test-pr_bidi_block_separator.c
-
+test_pr_bidi_block_separator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-boundary-neutral
+++ b/modules/unictype/property-bidi-boundary-neutral
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_boundary_neutral.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_boundary_neutral.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-boundary-neutral-tests
+++ b/modules/unictype/property-bidi-boundary-neutral-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_boundary_neutral
 check_PROGRAMS += test-pr_bidi_boundary_neutral
 test_pr_bidi_boundary_neutral_SOURCES = unictype/test-pr_bidi_boundary_neutral.c
-
+test_pr_bidi_boundary_neutral_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-common-separator
+++ b/modules/unictype/property-bidi-common-separator
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_common_separator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_common_separator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-common-separator-tests
+++ b/modules/unictype/property-bidi-common-separator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_common_separator
 check_PROGRAMS += test-pr_bidi_common_separator
 test_pr_bidi_common_separator_SOURCES = unictype/test-pr_bidi_common_separator.c
-
+test_pr_bidi_common_separator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-control
+++ b/modules/unictype/property-bidi-control
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_control.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_control.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-control-tests
+++ b/modules/unictype/property-bidi-control-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_control
 check_PROGRAMS += test-pr_bidi_control
 test_pr_bidi_control_SOURCES = unictype/test-pr_bidi_control.c
-
+test_pr_bidi_control_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-embedding-or-override
+++ b/modules/unictype/property-bidi-embedding-or-override
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_embedding_or_override.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_embedding_or_override.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-embedding-or-override-tests
+++ b/modules/unictype/property-bidi-embedding-or-override-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_embedding_or_override
 check_PROGRAMS += test-pr_bidi_embedding_or_override
 test_pr_bidi_embedding_or_override_SOURCES = unictype/test-pr_bidi_embedding_or_override.c
-
+test_pr_bidi_embedding_or_override_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-eur-num-separator
+++ b/modules/unictype/property-bidi-eur-num-separator
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_eur_num_separator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_eur_num_separator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-eur-num-separator-tests
+++ b/modules/unictype/property-bidi-eur-num-separator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_eur_num_separator
 check_PROGRAMS += test-pr_bidi_eur_num_separator
 test_pr_bidi_eur_num_separator_SOURCES = unictype/test-pr_bidi_eur_num_separator.c
-
+test_pr_bidi_eur_num_separator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-eur-num-terminator
+++ b/modules/unictype/property-bidi-eur-num-terminator
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_eur_num_terminator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_eur_num_terminator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-eur-num-terminator-tests
+++ b/modules/unictype/property-bidi-eur-num-terminator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_eur_num_terminator
 check_PROGRAMS += test-pr_bidi_eur_num_terminator
 test_pr_bidi_eur_num_terminator_SOURCES = unictype/test-pr_bidi_eur_num_terminator.c
-
+test_pr_bidi_eur_num_terminator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-european-digit
+++ b/modules/unictype/property-bidi-european-digit
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_european_digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_european_digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-european-digit-tests
+++ b/modules/unictype/property-bidi-european-digit-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_european_digit
 check_PROGRAMS += test-pr_bidi_european_digit
 test_pr_bidi_european_digit_SOURCES = unictype/test-pr_bidi_european_digit.c
-
+test_pr_bidi_european_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-hebrew-right-to-left
+++ b/modules/unictype/property-bidi-hebrew-right-to-left
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_hebrew_right_to_left.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_hebrew_right_to_left.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-hebrew-right-to-left-tests
+++ b/modules/unictype/property-bidi-hebrew-right-to-left-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_hebrew_right_to_left
 check_PROGRAMS += test-pr_bidi_hebrew_right_to_left
 test_pr_bidi_hebrew_right_to_left_SOURCES = unictype/test-pr_bidi_hebrew_right_to_left.c
-
+test_pr_bidi_hebrew_right_to_left_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-left-to-right
+++ b/modules/unictype/property-bidi-left-to-right
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_left_to_right.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_left_to_right.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-left-to-right-tests
+++ b/modules/unictype/property-bidi-left-to-right-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_left_to_right
 check_PROGRAMS += test-pr_bidi_left_to_right
 test_pr_bidi_left_to_right_SOURCES = unictype/test-pr_bidi_left_to_right.c
-
+test_pr_bidi_left_to_right_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-non-spacing-mark
+++ b/modules/unictype/property-bidi-non-spacing-mark
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_non_spacing_mark.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_non_spacing_mark.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-non-spacing-mark-tests
+++ b/modules/unictype/property-bidi-non-spacing-mark-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_non_spacing_mark
 check_PROGRAMS += test-pr_bidi_non_spacing_mark
 test_pr_bidi_non_spacing_mark_SOURCES = unictype/test-pr_bidi_non_spacing_mark.c
-
+test_pr_bidi_non_spacing_mark_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-other-neutral
+++ b/modules/unictype/property-bidi-other-neutral
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_other_neutral.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_other_neutral.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-other-neutral-tests
+++ b/modules/unictype/property-bidi-other-neutral-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_other_neutral
 check_PROGRAMS += test-pr_bidi_other_neutral
 test_pr_bidi_other_neutral_SOURCES = unictype/test-pr_bidi_other_neutral.c
-
+test_pr_bidi_other_neutral_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-pdf
+++ b/modules/unictype/property-bidi-pdf
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_pdf.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_pdf.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-pdf-tests
+++ b/modules/unictype/property-bidi-pdf-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_pdf
 check_PROGRAMS += test-pr_bidi_pdf
 test_pr_bidi_pdf_SOURCES = unictype/test-pr_bidi_pdf.c
-
+test_pr_bidi_pdf_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-segment-separator
+++ b/modules/unictype/property-bidi-segment-separator
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_segment_separator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_segment_separator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-segment-separator-tests
+++ b/modules/unictype/property-bidi-segment-separator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_segment_separator
 check_PROGRAMS += test-pr_bidi_segment_separator
 test_pr_bidi_segment_separator_SOURCES = unictype/test-pr_bidi_segment_separator.c
-
+test_pr_bidi_segment_separator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-bidi-whitespace
+++ b/modules/unictype/property-bidi-whitespace
@@ -12,9 +12,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_bidi_whitespace.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_bidi_whitespace.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-bidi-whitespace-tests
+++ b/modules/unictype/property-bidi-whitespace-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_bidi_whitespace
 check_PROGRAMS += test-pr_bidi_whitespace
 test_pr_bidi_whitespace_SOURCES = unictype/test-pr_bidi_whitespace.c
-
+test_pr_bidi_whitespace_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-byname
+++ b/modules/unictype/property-byname
@@ -89,9 +89,9 @@
 gperf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_byname.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_byname.c
 
 unictype/pr_byname.h: unictype/pr_byname.gperf
 	$(GPERF) -m 10 $(srcdir)/unictype/pr_byname.gperf > $(srcdir)/unictype/pr_byname.h-t
--- a/modules/unictype/property-byname-tests
+++ b/modules/unictype/property-byname-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_byname
 check_PROGRAMS += test-pr_byname
 test_pr_byname_SOURCES = unictype/test-pr_byname.c
-
+test_pr_byname_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-combining
+++ b/modules/unictype/property-combining
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_combining.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_combining.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-combining-tests
+++ b/modules/unictype/property-combining-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_combining
 check_PROGRAMS += test-pr_combining
 test_pr_combining_SOURCES = unictype/test-pr_combining.c
-
+test_pr_combining_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-composite
+++ b/modules/unictype/property-composite
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_composite.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_composite.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-composite-tests
+++ b/modules/unictype/property-composite-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_composite
 check_PROGRAMS += test-pr_composite
 test_pr_composite_SOURCES = unictype/test-pr_composite.c
-
+test_pr_composite_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-currency-symbol
+++ b/modules/unictype/property-currency-symbol
@@ -13,9 +13,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_currency_symbol.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_currency_symbol.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-currency-symbol-tests
+++ b/modules/unictype/property-currency-symbol-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_currency_symbol
 check_PROGRAMS += test-pr_currency_symbol
 test_pr_currency_symbol_SOURCES = unictype/test-pr_currency_symbol.c
-
+test_pr_currency_symbol_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-dash
+++ b/modules/unictype/property-dash
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_dash.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_dash.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-dash-tests
+++ b/modules/unictype/property-dash-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_dash
 check_PROGRAMS += test-pr_dash
 test_pr_dash_SOURCES = unictype/test-pr_dash.c
-
+test_pr_dash_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-decimal-digit
+++ b/modules/unictype/property-decimal-digit
@@ -13,9 +13,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_decimal_digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_decimal_digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-decimal-digit-tests
+++ b/modules/unictype/property-decimal-digit-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_decimal_digit
 check_PROGRAMS += test-pr_decimal_digit
 test_pr_decimal_digit_SOURCES = unictype/test-pr_decimal_digit.c
-
+test_pr_decimal_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-default-ignorable-code-point
+++ b/modules/unictype/property-default-ignorable-code-point
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_default_ignorable_code_point.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_default_ignorable_code_point.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-default-ignorable-code-point-tests
+++ b/modules/unictype/property-default-ignorable-code-point-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_default_ignorable_code_point
 check_PROGRAMS += test-pr_default_ignorable_code_point
 test_pr_default_ignorable_code_point_SOURCES = unictype/test-pr_default_ignorable_code_point.c
-
+test_pr_default_ignorable_code_point_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-deprecated
+++ b/modules/unictype/property-deprecated
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_deprecated.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_deprecated.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-deprecated-tests
+++ b/modules/unictype/property-deprecated-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_deprecated
 check_PROGRAMS += test-pr_deprecated
 test_pr_deprecated_SOURCES = unictype/test-pr_deprecated.c
-
+test_pr_deprecated_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-diacritic
+++ b/modules/unictype/property-diacritic
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_diacritic.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_diacritic.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-diacritic-tests
+++ b/modules/unictype/property-diacritic-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_diacritic
 check_PROGRAMS += test-pr_diacritic
 test_pr_diacritic_SOURCES = unictype/test-pr_diacritic.c
-
+test_pr_diacritic_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-extender
+++ b/modules/unictype/property-extender
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_extender.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_extender.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-extender-tests
+++ b/modules/unictype/property-extender-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_extender
 check_PROGRAMS += test-pr_extender
 test_pr_extender_SOURCES = unictype/test-pr_extender.c
-
+test_pr_extender_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-format-control
+++ b/modules/unictype/property-format-control
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_format_control.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_format_control.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-format-control-tests
+++ b/modules/unictype/property-format-control-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_format_control
 check_PROGRAMS += test-pr_format_control
 test_pr_format_control_SOURCES = unictype/test-pr_format_control.c
-
+test_pr_format_control_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-grapheme-base
+++ b/modules/unictype/property-grapheme-base
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_grapheme_base.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_grapheme_base.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-grapheme-base-tests
+++ b/modules/unictype/property-grapheme-base-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_grapheme_base
 check_PROGRAMS += test-pr_grapheme_base
 test_pr_grapheme_base_SOURCES = unictype/test-pr_grapheme_base.c
-
+test_pr_grapheme_base_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-grapheme-extend
+++ b/modules/unictype/property-grapheme-extend
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_grapheme_extend.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_grapheme_extend.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-grapheme-extend-tests
+++ b/modules/unictype/property-grapheme-extend-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_grapheme_extend
 check_PROGRAMS += test-pr_grapheme_extend
 test_pr_grapheme_extend_SOURCES = unictype/test-pr_grapheme_extend.c
-
+test_pr_grapheme_extend_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-grapheme-link
+++ b/modules/unictype/property-grapheme-link
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_grapheme_link.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_grapheme_link.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-grapheme-link-tests
+++ b/modules/unictype/property-grapheme-link-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_grapheme_link
 check_PROGRAMS += test-pr_grapheme_link
 test_pr_grapheme_link_SOURCES = unictype/test-pr_grapheme_link.c
-
+test_pr_grapheme_link_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-hex-digit
+++ b/modules/unictype/property-hex-digit
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_hex_digit.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_hex_digit.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-hex-digit-tests
+++ b/modules/unictype/property-hex-digit-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_hex_digit
 check_PROGRAMS += test-pr_hex_digit
 test_pr_hex_digit_SOURCES = unictype/test-pr_hex_digit.c
-
+test_pr_hex_digit_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-hyphen
+++ b/modules/unictype/property-hyphen
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_hyphen.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_hyphen.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-hyphen-tests
+++ b/modules/unictype/property-hyphen-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_hyphen
 check_PROGRAMS += test-pr_hyphen
 test_pr_hyphen_SOURCES = unictype/test-pr_hyphen.c
-
+test_pr_hyphen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-id-continue
+++ b/modules/unictype/property-id-continue
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_id_continue.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_id_continue.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-id-continue-tests
+++ b/modules/unictype/property-id-continue-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_id_continue
 check_PROGRAMS += test-pr_id_continue
 test_pr_id_continue_SOURCES = unictype/test-pr_id_continue.c
-
+test_pr_id_continue_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-id-start
+++ b/modules/unictype/property-id-start
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_id_start.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_id_start.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-id-start-tests
+++ b/modules/unictype/property-id-start-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_id_start
 check_PROGRAMS += test-pr_id_start
 test_pr_id_start_SOURCES = unictype/test-pr_id_start.c
-
+test_pr_id_start_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-ideographic
+++ b/modules/unictype/property-ideographic
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_ideographic.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_ideographic.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-ideographic-tests
+++ b/modules/unictype/property-ideographic-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_ideographic
 check_PROGRAMS += test-pr_ideographic
 test_pr_ideographic_SOURCES = unictype/test-pr_ideographic.c
-
+test_pr_ideographic_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-ids-binary-operator
+++ b/modules/unictype/property-ids-binary-operator
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_ids_binary_operator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_ids_binary_operator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-ids-binary-operator-tests
+++ b/modules/unictype/property-ids-binary-operator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_ids_binary_operator
 check_PROGRAMS += test-pr_ids_binary_operator
 test_pr_ids_binary_operator_SOURCES = unictype/test-pr_ids_binary_operator.c
-
+test_pr_ids_binary_operator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-ids-trinary-operator
+++ b/modules/unictype/property-ids-trinary-operator
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_ids_trinary_operator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_ids_trinary_operator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-ids-trinary-operator-tests
+++ b/modules/unictype/property-ids-trinary-operator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_ids_trinary_operator
 check_PROGRAMS += test-pr_ids_trinary_operator
 test_pr_ids_trinary_operator_SOURCES = unictype/test-pr_ids_trinary_operator.c
-
+test_pr_ids_trinary_operator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-ignorable-control
+++ b/modules/unictype/property-ignorable-control
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_ignorable_control.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_ignorable_control.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-ignorable-control-tests
+++ b/modules/unictype/property-ignorable-control-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_ignorable_control
 check_PROGRAMS += test-pr_ignorable_control
 test_pr_ignorable_control_SOURCES = unictype/test-pr_ignorable_control.c
-
+test_pr_ignorable_control_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-iso-control
+++ b/modules/unictype/property-iso-control
@@ -13,9 +13,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_iso_control.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_iso_control.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-iso-control-tests
+++ b/modules/unictype/property-iso-control-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_iso_control
 check_PROGRAMS += test-pr_iso_control
 test_pr_iso_control_SOURCES = unictype/test-pr_iso_control.c
-
+test_pr_iso_control_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-join-control
+++ b/modules/unictype/property-join-control
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_join_control.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_join_control.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-join-control-tests
+++ b/modules/unictype/property-join-control-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_join_control
 check_PROGRAMS += test-pr_join_control
 test_pr_join_control_SOURCES = unictype/test-pr_join_control.c
-
+test_pr_join_control_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-left-of-pair
+++ b/modules/unictype/property-left-of-pair
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_left_of_pair.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_left_of_pair.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-left-of-pair-tests
+++ b/modules/unictype/property-left-of-pair-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_left_of_pair
 check_PROGRAMS += test-pr_left_of_pair
 test_pr_left_of_pair_SOURCES = unictype/test-pr_left_of_pair.c
-
+test_pr_left_of_pair_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-line-separator
+++ b/modules/unictype/property-line-separator
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_line_separator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_line_separator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-line-separator-tests
+++ b/modules/unictype/property-line-separator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_line_separator
 check_PROGRAMS += test-pr_line_separator
 test_pr_line_separator_SOURCES = unictype/test-pr_line_separator.c
-
+test_pr_line_separator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-logical-order-exception
+++ b/modules/unictype/property-logical-order-exception
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_logical_order_exception.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_logical_order_exception.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-logical-order-exception-tests
+++ b/modules/unictype/property-logical-order-exception-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_logical_order_exception
 check_PROGRAMS += test-pr_logical_order_exception
 test_pr_logical_order_exception_SOURCES = unictype/test-pr_logical_order_exception.c
-
+test_pr_logical_order_exception_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-lowercase
+++ b/modules/unictype/property-lowercase
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_lowercase.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_lowercase.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-lowercase-tests
+++ b/modules/unictype/property-lowercase-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_lowercase
 check_PROGRAMS += test-pr_lowercase
 test_pr_lowercase_SOURCES = unictype/test-pr_lowercase.c
-
+test_pr_lowercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-math
+++ b/modules/unictype/property-math
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_math.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_math.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-math-tests
+++ b/modules/unictype/property-math-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_math
 check_PROGRAMS += test-pr_math
 test_pr_math_SOURCES = unictype/test-pr_math.c
-
+test_pr_math_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-non-break
+++ b/modules/unictype/property-non-break
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_non_break.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_non_break.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-non-break-tests
+++ b/modules/unictype/property-non-break-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_non_break
 check_PROGRAMS += test-pr_non_break
 test_pr_non_break_SOURCES = unictype/test-pr_non_break.c
-
+test_pr_non_break_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-not-a-character
+++ b/modules/unictype/property-not-a-character
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_not_a_character.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_not_a_character.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-not-a-character-tests
+++ b/modules/unictype/property-not-a-character-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_not_a_character
 check_PROGRAMS += test-pr_not_a_character
 test_pr_not_a_character_SOURCES = unictype/test-pr_not_a_character.c
-
+test_pr_not_a_character_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-numeric
+++ b/modules/unictype/property-numeric
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_numeric.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_numeric.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-numeric-tests
+++ b/modules/unictype/property-numeric-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_numeric
 check_PROGRAMS += test-pr_numeric
 test_pr_numeric_SOURCES = unictype/test-pr_numeric.c
-
+test_pr_numeric_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-alphabetic
+++ b/modules/unictype/property-other-alphabetic
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_alphabetic.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_alphabetic.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-alphabetic-tests
+++ b/modules/unictype/property-other-alphabetic-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_alphabetic
 check_PROGRAMS += test-pr_other_alphabetic
 test_pr_other_alphabetic_SOURCES = unictype/test-pr_other_alphabetic.c
-
+test_pr_other_alphabetic_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-default-ignorable-code-point
+++ b/modules/unictype/property-other-default-ignorable-code-point
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_default_ignorable_code_point.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_default_ignorable_code_point.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-default-ignorable-code-point-tests
+++ b/modules/unictype/property-other-default-ignorable-code-point-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_default_ignorable_code_point
 check_PROGRAMS += test-pr_other_default_ignorable_code_point
 test_pr_other_default_ignorable_code_point_SOURCES = unictype/test-pr_other_default_ignorable_code_point.c
-
+test_pr_other_default_ignorable_code_point_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-grapheme-extend
+++ b/modules/unictype/property-other-grapheme-extend
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_grapheme_extend.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_grapheme_extend.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-grapheme-extend-tests
+++ b/modules/unictype/property-other-grapheme-extend-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_grapheme_extend
 check_PROGRAMS += test-pr_other_grapheme_extend
 test_pr_other_grapheme_extend_SOURCES = unictype/test-pr_other_grapheme_extend.c
-
+test_pr_other_grapheme_extend_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-id-continue
+++ b/modules/unictype/property-other-id-continue
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_id_continue.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_id_continue.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-id-continue-tests
+++ b/modules/unictype/property-other-id-continue-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_id_continue
 check_PROGRAMS += test-pr_other_id_continue
 test_pr_other_id_continue_SOURCES = unictype/test-pr_other_id_continue.c
-
+test_pr_other_id_continue_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-id-start
+++ b/modules/unictype/property-other-id-start
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_id_start.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_id_start.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-id-start-tests
+++ b/modules/unictype/property-other-id-start-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_id_start
 check_PROGRAMS += test-pr_other_id_start
 test_pr_other_id_start_SOURCES = unictype/test-pr_other_id_start.c
-
+test_pr_other_id_start_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-lowercase
+++ b/modules/unictype/property-other-lowercase
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_lowercase.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_lowercase.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-lowercase-tests
+++ b/modules/unictype/property-other-lowercase-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_lowercase
 check_PROGRAMS += test-pr_other_lowercase
 test_pr_other_lowercase_SOURCES = unictype/test-pr_other_lowercase.c
-
+test_pr_other_lowercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-math
+++ b/modules/unictype/property-other-math
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_math.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_math.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-math-tests
+++ b/modules/unictype/property-other-math-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_math
 check_PROGRAMS += test-pr_other_math
 test_pr_other_math_SOURCES = unictype/test-pr_other_math.c
-
+test_pr_other_math_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-other-uppercase
+++ b/modules/unictype/property-other-uppercase
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_other_uppercase.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_other_uppercase.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-other-uppercase-tests
+++ b/modules/unictype/property-other-uppercase-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_other_uppercase
 check_PROGRAMS += test-pr_other_uppercase
 test_pr_other_uppercase_SOURCES = unictype/test-pr_other_uppercase.c
-
+test_pr_other_uppercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-paired-punctuation
+++ b/modules/unictype/property-paired-punctuation
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_paired_punctuation.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_paired_punctuation.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-paired-punctuation-tests
+++ b/modules/unictype/property-paired-punctuation-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_paired_punctuation
 check_PROGRAMS += test-pr_paired_punctuation
 test_pr_paired_punctuation_SOURCES = unictype/test-pr_paired_punctuation.c
-
+test_pr_paired_punctuation_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-paragraph-separator
+++ b/modules/unictype/property-paragraph-separator
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_paragraph_separator.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_paragraph_separator.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-paragraph-separator-tests
+++ b/modules/unictype/property-paragraph-separator-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_paragraph_separator
 check_PROGRAMS += test-pr_paragraph_separator
 test_pr_paragraph_separator_SOURCES = unictype/test-pr_paragraph_separator.c
-
+test_pr_paragraph_separator_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-pattern-syntax
+++ b/modules/unictype/property-pattern-syntax
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_pattern_syntax.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_pattern_syntax.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-pattern-syntax-tests
+++ b/modules/unictype/property-pattern-syntax-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_pattern_syntax
 check_PROGRAMS += test-pr_pattern_syntax
 test_pr_pattern_syntax_SOURCES = unictype/test-pr_pattern_syntax.c
-
+test_pr_pattern_syntax_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-pattern-white-space
+++ b/modules/unictype/property-pattern-white-space
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_pattern_white_space.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_pattern_white_space.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-pattern-white-space-tests
+++ b/modules/unictype/property-pattern-white-space-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_pattern_white_space
 check_PROGRAMS += test-pr_pattern_white_space
 test_pr_pattern_white_space_SOURCES = unictype/test-pr_pattern_white_space.c
-
+test_pr_pattern_white_space_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-private-use
+++ b/modules/unictype/property-private-use
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_private_use.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_private_use.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-private-use-tests
+++ b/modules/unictype/property-private-use-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_private_use
 check_PROGRAMS += test-pr_private_use
 test_pr_private_use_SOURCES = unictype/test-pr_private_use.c
-
+test_pr_private_use_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-punctuation
+++ b/modules/unictype/property-punctuation
@@ -13,9 +13,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_punctuation.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_punctuation.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-punctuation-tests
+++ b/modules/unictype/property-punctuation-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_punctuation
 check_PROGRAMS += test-pr_punctuation
 test_pr_punctuation_SOURCES = unictype/test-pr_punctuation.c
-
+test_pr_punctuation_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-quotation-mark
+++ b/modules/unictype/property-quotation-mark
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_quotation_mark.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_quotation_mark.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-quotation-mark-tests
+++ b/modules/unictype/property-quotation-mark-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_quotation_mark
 check_PROGRAMS += test-pr_quotation_mark
 test_pr_quotation_mark_SOURCES = unictype/test-pr_quotation_mark.c
-
+test_pr_quotation_mark_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-radical
+++ b/modules/unictype/property-radical
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_radical.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_radical.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-radical-tests
+++ b/modules/unictype/property-radical-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_radical
 check_PROGRAMS += test-pr_radical
 test_pr_radical_SOURCES = unictype/test-pr_radical.c
-
+test_pr_radical_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-sentence-terminal
+++ b/modules/unictype/property-sentence-terminal
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_sentence_terminal.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_sentence_terminal.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-sentence-terminal-tests
+++ b/modules/unictype/property-sentence-terminal-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_sentence_terminal
 check_PROGRAMS += test-pr_sentence_terminal
 test_pr_sentence_terminal_SOURCES = unictype/test-pr_sentence_terminal.c
-
+test_pr_sentence_terminal_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-soft-dotted
+++ b/modules/unictype/property-soft-dotted
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_soft_dotted.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_soft_dotted.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-soft-dotted-tests
+++ b/modules/unictype/property-soft-dotted-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_soft_dotted
 check_PROGRAMS += test-pr_soft_dotted
 test_pr_soft_dotted_SOURCES = unictype/test-pr_soft_dotted.c
-
+test_pr_soft_dotted_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-space
+++ b/modules/unictype/property-space
@@ -13,9 +13,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_space.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_space.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-space-tests
+++ b/modules/unictype/property-space-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_space
 check_PROGRAMS += test-pr_space
 test_pr_space_SOURCES = unictype/test-pr_space.c
-
+test_pr_space_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-terminal-punctuation
+++ b/modules/unictype/property-terminal-punctuation
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_terminal_punctuation.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_terminal_punctuation.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-terminal-punctuation-tests
+++ b/modules/unictype/property-terminal-punctuation-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_terminal_punctuation
 check_PROGRAMS += test-pr_terminal_punctuation
 test_pr_terminal_punctuation_SOURCES = unictype/test-pr_terminal_punctuation.c
-
+test_pr_terminal_punctuation_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-test
+++ b/modules/unictype/property-test
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_test.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_test.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-test-tests
+++ b/modules/unictype/property-test-tests
@@ -11,4 +11,4 @@
 TESTS += test-pr_test
 check_PROGRAMS += test-pr_test
 test_pr_test_SOURCES = unictype/test-pr_test.c
-
+test_pr_test_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-titlecase
+++ b/modules/unictype/property-titlecase
@@ -13,9 +13,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_titlecase.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_titlecase.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-titlecase-tests
+++ b/modules/unictype/property-titlecase-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_titlecase
 check_PROGRAMS += test-pr_titlecase
 test_pr_titlecase_SOURCES = unictype/test-pr_titlecase.c
-
+test_pr_titlecase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-unassigned-code-value
+++ b/modules/unictype/property-unassigned-code-value
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_unassigned_code_value.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_unassigned_code_value.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-unassigned-code-value-tests
+++ b/modules/unictype/property-unassigned-code-value-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_unassigned_code_value
 check_PROGRAMS += test-pr_unassigned_code_value
 test_pr_unassigned_code_value_SOURCES = unictype/test-pr_unassigned_code_value.c
-
+test_pr_unassigned_code_value_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-unified-ideograph
+++ b/modules/unictype/property-unified-ideograph
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_unified_ideograph.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_unified_ideograph.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-unified-ideograph-tests
+++ b/modules/unictype/property-unified-ideograph-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_unified_ideograph
 check_PROGRAMS += test-pr_unified_ideograph
 test_pr_unified_ideograph_SOURCES = unictype/test-pr_unified_ideograph.c
-
+test_pr_unified_ideograph_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-uppercase
+++ b/modules/unictype/property-uppercase
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_uppercase.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_uppercase.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-uppercase-tests
+++ b/modules/unictype/property-uppercase-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_uppercase
 check_PROGRAMS += test-pr_uppercase
 test_pr_uppercase_SOURCES = unictype/test-pr_uppercase.c
-
+test_pr_uppercase_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-variation-selector
+++ b/modules/unictype/property-variation-selector
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_variation_selector.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_variation_selector.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-variation-selector-tests
+++ b/modules/unictype/property-variation-selector-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_variation_selector
 check_PROGRAMS += test-pr_variation_selector
 test_pr_variation_selector_SOURCES = unictype/test-pr_variation_selector.c
-
+test_pr_variation_selector_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-white-space
+++ b/modules/unictype/property-white-space
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_white_space.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_white_space.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-white-space-tests
+++ b/modules/unictype/property-white-space-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_white_space
 check_PROGRAMS += test-pr_white_space
 test_pr_white_space_SOURCES = unictype/test-pr_white_space.c
-
+test_pr_white_space_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-xid-continue
+++ b/modules/unictype/property-xid-continue
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_xid_continue.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_xid_continue.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-xid-continue-tests
+++ b/modules/unictype/property-xid-continue-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_xid_continue
 check_PROGRAMS += test-pr_xid_continue
 test_pr_xid_continue_SOURCES = unictype/test-pr_xid_continue.c
-
+test_pr_xid_continue_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-xid-start
+++ b/modules/unictype/property-xid-start
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_xid_start.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_xid_start.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-xid-start-tests
+++ b/modules/unictype/property-xid-start-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_xid_start
 check_PROGRAMS += test-pr_xid_start
 test_pr_xid_start_SOURCES = unictype/test-pr_xid_start.c
-
+test_pr_xid_start_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/property-zero-width
+++ b/modules/unictype/property-zero-width
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/pr_zero_width.c])
 
 Makefile.am:
-lib_SOURCES += unictype/pr_zero_width.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/property-zero-width-tests
+++ b/modules/unictype/property-zero-width-tests
@@ -12,4 +12,4 @@
 TESTS += test-pr_zero_width
 check_PROGRAMS += test-pr_zero_width
 test_pr_zero_width_SOURCES = unictype/test-pr_zero_width.c
-
+test_pr_zero_width_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/scripts
+++ b/modules/unictype/scripts
@@ -11,9 +11,9 @@
 gperf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/scripts.c])
 
 Makefile.am:
-lib_SOURCES += unictype/scripts.c
 
 unictype/scripts_byname.h: unictype/scripts_byname.gperf
 	$(GPERF) -m 10 $(srcdir)/unictype/scripts_byname.gperf > $(srcdir)/unictype/scripts_byname.h-t
--- a/modules/unictype/scripts-tests
+++ b/modules/unictype/scripts-tests
@@ -10,4 +10,4 @@
 TESTS += test-scripts
 check_PROGRAMS += test-scripts
 test_scripts_SOURCES = unictype/test-scripts.c
-
+test_scripts_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/syntax-c-ident
+++ b/modules/unictype/syntax-c-ident
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/sy_c_ident.c])
 
 Makefile.am:
-lib_SOURCES += unictype/sy_c_ident.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/syntax-c-ident-tests
+++ b/modules/unictype/syntax-c-ident-tests
@@ -10,4 +10,4 @@
 TESTS += test-sy_c_ident
 check_PROGRAMS += test-sy_c_ident
 test_sy_c_ident_SOURCES = unictype/test-sy_c_ident.c
-
+test_sy_c_ident_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/syntax-c-whitespace
+++ b/modules/unictype/syntax-c-whitespace
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/sy_c_whitespace.c])
 
 Makefile.am:
-lib_SOURCES += unictype/sy_c_whitespace.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/syntax-c-whitespace-tests
+++ b/modules/unictype/syntax-c-whitespace-tests
@@ -12,4 +12,4 @@
 TESTS += test-sy_c_whitespace
 check_PROGRAMS += test-sy_c_whitespace
 test_sy_c_whitespace_SOURCES = unictype/test-sy_c_whitespace.c
-
+test_sy_c_whitespace_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/syntax-java-ident
+++ b/modules/unictype/syntax-java-ident
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/sy_java_ident.c])
 
 Makefile.am:
-lib_SOURCES += unictype/sy_java_ident.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/syntax-java-ident-tests
+++ b/modules/unictype/syntax-java-ident-tests
@@ -10,4 +10,4 @@
 TESTS += test-sy_java_ident
 check_PROGRAMS += test-sy_java_ident
 test_sy_java_ident_SOURCES = unictype/test-sy_java_ident.c
-
+test_sy_java_ident_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unictype/syntax-java-whitespace
+++ b/modules/unictype/syntax-java-whitespace
@@ -8,9 +8,9 @@
 unictype/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unictype/sy_java_whitespace.c])
 
 Makefile.am:
-lib_SOURCES += unictype/sy_java_whitespace.c
 
 Include:
 "unictype.h"
--- a/modules/unictype/syntax-java-whitespace-tests
+++ b/modules/unictype/syntax-java-whitespace-tests
@@ -12,4 +12,4 @@
 TESTS += test-sy_java_whitespace
 check_PROGRAMS += test-sy_java_whitespace
 test_sy_java_whitespace_SOURCES = unictype/test-sy_java_whitespace.c
-
+test_sy_java_whitespace_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/base
+++ b/modules/unilbrk/base
@@ -2,15 +2,26 @@
 Base layer for line breaking.
 
 Files:
-lib/unilbrk.h
+lib/unilbrk.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [unilbrk.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNILBRK_H)
+
+unilbrk.h: unilbrk.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/unilbrk.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += unilbrk.h unilbrk.h-t
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u16-possible-linebreaks
+++ b/modules/unilbrk/u16-possible-linebreaks
@@ -12,9 +12,9 @@
 streq
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/u16-possible-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/u16-possible-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u16-possible-linebreaks-tests
+++ b/modules/unilbrk/u16-possible-linebreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u16-possible-linebreaks
 check_PROGRAMS += test-u16-possible-linebreaks
 test_u16_possible_linebreaks_SOURCES = unilbrk/test-u16-possible-linebreaks.c
-
+test_u16_possible_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/u16-width-linebreaks
+++ b/modules/unilbrk/u16-width-linebreaks
@@ -11,9 +11,9 @@
 unistr/u16-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/u16-width-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/u16-width-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u16-width-linebreaks-tests
+++ b/modules/unilbrk/u16-width-linebreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u16-width-linebreaks
 check_PROGRAMS += test-u16-width-linebreaks
 test_u16_width_linebreaks_SOURCES = unilbrk/test-u16-width-linebreaks.c
-
+test_u16_width_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/u32-possible-linebreaks
+++ b/modules/unilbrk/u32-possible-linebreaks
@@ -11,9 +11,9 @@
 streq
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/u32-possible-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/u32-possible-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u32-possible-linebreaks-tests
+++ b/modules/unilbrk/u32-possible-linebreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u32-possible-linebreaks
 check_PROGRAMS += test-u32-possible-linebreaks
 test_u32_possible_linebreaks_SOURCES = unilbrk/test-u32-possible-linebreaks.c
-
+test_u32_possible_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/u32-width-linebreaks
+++ b/modules/unilbrk/u32-width-linebreaks
@@ -10,9 +10,9 @@
 uniwidth/width
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/u32-width-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/u32-width-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u32-width-linebreaks-tests
+++ b/modules/unilbrk/u32-width-linebreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u32-width-linebreaks
 check_PROGRAMS += test-u32-width-linebreaks
 test_u32_width_linebreaks_SOURCES = unilbrk/test-u32-width-linebreaks.c
-
+test_u32_width_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/u8-possible-linebreaks
+++ b/modules/unilbrk/u8-possible-linebreaks
@@ -12,9 +12,9 @@
 streq
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/u8-possible-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/u8-possible-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u8-possible-linebreaks-tests
+++ b/modules/unilbrk/u8-possible-linebreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u8-possible-linebreaks
 check_PROGRAMS += test-u8-possible-linebreaks
 test_u8_possible_linebreaks_SOURCES = unilbrk/test-u8-possible-linebreaks.c
-
+test_u8_possible_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/u8-width-linebreaks
+++ b/modules/unilbrk/u8-width-linebreaks
@@ -11,9 +11,9 @@
 unistr/u8-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/u8-width-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/u8-width-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/u8-width-linebreaks-tests
+++ b/modules/unilbrk/u8-width-linebreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u8-width-linebreaks
 check_PROGRAMS += test-u8-width-linebreaks
 test_u8_width_linebreaks_SOURCES = unilbrk/test-u8-width-linebreaks.c
-
+test_u8_width_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unilbrk/ulc-possible-linebreaks
+++ b/modules/unilbrk/ulc-possible-linebreaks
@@ -12,9 +12,9 @@
 c-ctype
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/ulc-possible-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/ulc-possible-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/ulc-possible-linebreaks-tests
+++ b/modules/unilbrk/ulc-possible-linebreaks-tests
@@ -10,5 +10,5 @@
 TESTS += test-ulc-possible-linebreaks
 check_PROGRAMS += test-ulc-possible-linebreaks
 test_ulc_possible_linebreaks_SOURCES = unilbrk/test-ulc-possible-linebreaks.c
-test_ulc_possible_linebreaks_LDADD = $(LDADD) @LIBICONV@
+test_ulc_possible_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/unilbrk/ulc-width-linebreaks
+++ b/modules/unilbrk/ulc-width-linebreaks
@@ -12,9 +12,9 @@
 c-ctype
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unilbrk/ulc-width-linebreaks.c])
 
 Makefile.am:
-lib_SOURCES += unilbrk/ulc-width-linebreaks.c
 
 Include:
 "unilbrk.h"
--- a/modules/unilbrk/ulc-width-linebreaks-tests
+++ b/modules/unilbrk/ulc-width-linebreaks-tests
@@ -10,5 +10,5 @@
 TESTS += test-ulc-width-linebreaks
 check_PROGRAMS += test-ulc-width-linebreaks
 test_ulc_width_linebreaks_SOURCES = unilbrk/test-ulc-width-linebreaks.c
-test_ulc_width_linebreaks_LDADD = $(LDADD) @LIBICONV@
+test_ulc_width_linebreaks_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniname/base
+++ b/modules/uniname/base
@@ -2,14 +2,25 @@
 Base layer for Unicode character names.
 
 Files:
-lib/uniname.h
+lib/uniname.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [uniname.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNINAME_H)
+
+uniname.h: uniname.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/uniname.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += uniname.h uniname.h-t
 
 Include:
 "uniname.h"
--- a/modules/uniname/uniname
+++ b/modules/uniname/uniname
@@ -11,9 +11,9 @@
 memcmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniname/uniname.c])
 
 Makefile.am:
-lib_SOURCES += uniname/uniname.c
 
 Include:
 "uniname.h"
--- a/modules/uniname/uniname-tests
+++ b/modules/uniname/uniname-tests
@@ -13,5 +13,5 @@
 TESTS += uniname/test-uninames.sh
 check_PROGRAMS += test-uninames
 test_uninames_SOURCES = uniname/test-uninames.c
-test_uninames_LDADD = $(LDADD) @LIBINTL@
+test_uninames_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@
 
--- a/modules/uninorm/base
+++ b/modules/uninorm/base
@@ -2,14 +2,25 @@
 Base layer for normalization forms of Unicode strings.
 
 Files:
-lib/uninorm.h
+lib/uninorm.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [uninorm.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNINORM_H)
+
+uninorm.h: uninorm.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/uninorm.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += uninorm.h uninorm.h-t
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/canonical-decomposition
+++ b/modules/uninorm/canonical-decomposition
@@ -9,9 +9,9 @@
 uninorm/decomposition-table
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/canonical-decomposition.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/canonical-decomposition.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/canonical-decomposition-tests
+++ b/modules/uninorm/canonical-decomposition-tests
@@ -10,4 +10,4 @@
 TESTS += test-canonical-decomposition
 check_PROGRAMS += test-canonical-decomposition
 test_canonical_decomposition_SOURCES = uninorm/test-canonical-decomposition.c
-
+test_canonical_decomposition_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/compat-decomposition-tests
+++ b/modules/uninorm/compat-decomposition-tests
@@ -10,4 +10,4 @@
 TESTS += test-compat-decomposition
 check_PROGRAMS += test-compat-decomposition
 test_compat_decomposition_SOURCES = uninorm/test-compat-decomposition.c
-
+test_compat_decomposition_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/composition
+++ b/modules/uninorm/composition
@@ -10,9 +10,9 @@
 gperf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/composition.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/composition.c
 
 uninorm/composition-table.h: $(srcdir)/uninorm/composition-table.gperf
 	$(GPERF) -m 1 $(srcdir)/uninorm/composition-table.gperf > $(srcdir)/uninorm/composition-table.h-t
--- a/modules/uninorm/composition-tests
+++ b/modules/uninorm/composition-tests
@@ -10,4 +10,4 @@
 TESTS += test-composition
 check_PROGRAMS += test-composition
 test_composition_SOURCES = uninorm/test-composition.c
-
+test_composition_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/decomposing-form
+++ b/modules/uninorm/decomposing-form
@@ -9,9 +9,9 @@
 uninorm/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/decomposing-form.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/decomposing-form.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/decomposing-form-tests
+++ b/modules/uninorm/decomposing-form-tests
@@ -14,4 +14,4 @@
 TESTS += test-decomposing-form
 check_PROGRAMS += test-decomposing-form
 test_decomposing_form_SOURCES = uninorm/test-decomposing-form.c
-
+test_decomposing_form_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/decomposition
+++ b/modules/uninorm/decomposition
@@ -9,9 +9,9 @@
 uninorm/decomposition-table
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/decomposition.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/decomposition.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/decomposition-tests
+++ b/modules/uninorm/decomposition-tests
@@ -10,4 +10,4 @@
 TESTS += test-decomposition
 check_PROGRAMS += test-decomposition
 test_decomposition_SOURCES = uninorm/test-decomposition.c
-
+test_decomposition_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/filter
+++ b/modules/uninorm/filter
@@ -12,9 +12,9 @@
 malloc-posix
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/uninorm-filter.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/uninorm-filter.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/filter-tests
+++ b/modules/uninorm/filter-tests
@@ -12,4 +12,4 @@
 TESTS += test-uninorm-filter-nfc
 check_PROGRAMS += test-uninorm-filter-nfc
 test_uninorm_filter_nfc_SOURCES = uninorm/test-uninorm-filter-nfc.c
-
+test_uninorm_filter_nfc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/nfc
+++ b/modules/uninorm/nfc
@@ -12,9 +12,9 @@
 uninorm/nfd
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/nfc.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/nfc.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/nfc-tests
+++ b/modules/uninorm/nfc-tests
@@ -29,7 +29,8 @@
   uninorm/test-u8-nfc.c \
   uninorm/test-u16-nfc.c \
   uninorm/test-u32-nfc.c
+test_nfc_LDADD = $(LDADD) $(LIBUNISTRING)
 test_u32_nfc_big_SOURCES = \
   uninorm/test-u32-nfc-big.c \
   uninorm/test-u32-normalize-big.c
-test_u32_nfc_big_LDADD = $(LDADD) @LIBINTL@
+test_u32_nfc_big_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@
--- a/modules/uninorm/nfd
+++ b/modules/uninorm/nfd
@@ -10,9 +10,9 @@
 uninorm/canonical-decomposition
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/nfd.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/nfd.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/nfd-tests
+++ b/modules/uninorm/nfd-tests
@@ -29,8 +29,9 @@
   uninorm/test-u8-nfd.c \
   uninorm/test-u16-nfd.c \
   uninorm/test-u32-nfd.c
+test_nfd_LDADD = $(LDADD) $(LIBUNISTRING)
 test_u32_nfd_big_SOURCES = \
   uninorm/test-u32-nfd-big.c \
   uninorm/test-u32-normalize-big.c
-test_u32_nfd_big_LDADD = $(LDADD) @LIBINTL@
+test_u32_nfd_big_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@
 
--- a/modules/uninorm/nfkc
+++ b/modules/uninorm/nfkc
@@ -12,9 +12,9 @@
 uninorm/nfkd
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/nfkc.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/nfkc.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/nfkc-tests
+++ b/modules/uninorm/nfkc-tests
@@ -29,8 +29,9 @@
   uninorm/test-u8-nfkc.c \
   uninorm/test-u16-nfkc.c \
   uninorm/test-u32-nfkc.c
+test_nfkc_LDADD = $(LDADD) $(LIBUNISTRING)
 test_u32_nfkc_big_SOURCES = \
   uninorm/test-u32-nfkc-big.c \
   uninorm/test-u32-normalize-big.c
-test_u32_nfkc_big_LDADD = $(LDADD) @LIBINTL@
+test_u32_nfkc_big_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@
 
--- a/modules/uninorm/nfkd
+++ b/modules/uninorm/nfkd
@@ -10,9 +10,9 @@
 uninorm/compat-decomposition
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/nfkd.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/nfkd.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/nfkd-tests
+++ b/modules/uninorm/nfkd-tests
@@ -29,8 +29,9 @@
   uninorm/test-u8-nfkd.c \
   uninorm/test-u16-nfkd.c \
   uninorm/test-u32-nfkd.c
+test_nfkd_LDADD = $(LDADD) $(LIBUNISTRING)
 test_u32_nfkd_big_SOURCES = \
   uninorm/test-u32-nfkd-big.c \
   uninorm/test-u32-normalize-big.c
-test_u32_nfkd_big_LDADD = $(LDADD) @LIBINTL@
+test_u32_nfkd_big_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@
 
--- a/modules/uninorm/u16-normalize
+++ b/modules/uninorm/u16-normalize
@@ -16,9 +16,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u16-normalize])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u16-normalize.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u16-normalize.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u16-normcmp
+++ b/modules/uninorm/u16-normcmp
@@ -12,9 +12,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u16-normcmp.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u16-normcmp.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u16-normcmp-tests
+++ b/modules/uninorm/u16-normcmp-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-normcmp
 check_PROGRAMS += test-u16-normcmp
 test_u16_normcmp_SOURCES = uninorm/test-u16-normcmp.c
-
+test_u16_normcmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/u16-normcoll
+++ b/modules/uninorm/u16-normcoll
@@ -11,9 +11,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u16-normcoll.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u16-normcoll.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u16-normcoll-tests
+++ b/modules/uninorm/u16-normcoll-tests
@@ -12,5 +12,5 @@
 TESTS += test-u16-normcoll
 check_PROGRAMS += test-u16-normcoll
 test_u16_normcoll_SOURCES = uninorm/test-u16-normcoll.c
-test_u16_normcoll_LDADD = $(LDADD) @LIBICONV@
+test_u16_normcoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uninorm/u16-normxfrm
+++ b/modules/uninorm/u16-normxfrm
@@ -13,9 +13,9 @@
 memxfrm
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u16-normxfrm.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u16-normxfrm.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u32-normalize
+++ b/modules/uninorm/u32-normalize
@@ -16,9 +16,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u32-normalize])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u32-normalize.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u32-normalize.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u32-normcmp
+++ b/modules/uninorm/u32-normcmp
@@ -12,9 +12,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u32-normcmp.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u32-normcmp.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u32-normcmp-tests
+++ b/modules/uninorm/u32-normcmp-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-normcmp
 check_PROGRAMS += test-u32-normcmp
 test_u32_normcmp_SOURCES = uninorm/test-u32-normcmp.c
-
+test_u32_normcmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/u32-normcoll
+++ b/modules/uninorm/u32-normcoll
@@ -11,9 +11,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u32-normcoll.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u32-normcoll.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u32-normcoll-tests
+++ b/modules/uninorm/u32-normcoll-tests
@@ -12,5 +12,5 @@
 TESTS += test-u32-normcoll
 check_PROGRAMS += test-u32-normcoll
 test_u32_normcoll_SOURCES = uninorm/test-u32-normcoll.c
-test_u32_normcoll_LDADD = $(LDADD) @LIBICONV@
+test_u32_normcoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uninorm/u32-normxfrm
+++ b/modules/uninorm/u32-normxfrm
@@ -13,9 +13,9 @@
 memxfrm
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u32-normxfrm.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u32-normxfrm.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u8-normalize
+++ b/modules/uninorm/u8-normalize
@@ -16,9 +16,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u8-normalize])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u8-normalize.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u8-normalize.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u8-normcmp
+++ b/modules/uninorm/u8-normcmp
@@ -12,9 +12,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u8-normcmp.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u8-normcmp.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u8-normcmp-tests
+++ b/modules/uninorm/u8-normcmp-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-normcmp
 check_PROGRAMS += test-u8-normcmp
 test_u8_normcmp_SOURCES = uninorm/test-u8-normcmp.c
-
+test_u8_normcmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uninorm/u8-normcoll
+++ b/modules/uninorm/u8-normcoll
@@ -11,9 +11,9 @@
 memcmp2
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u8-normcoll.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u8-normcoll.c
 
 Include:
 "uninorm.h"
--- a/modules/uninorm/u8-normcoll-tests
+++ b/modules/uninorm/u8-normcoll-tests
@@ -12,5 +12,5 @@
 TESTS += test-u8-normcoll
 check_PROGRAMS += test-u8-normcoll
 test_u8_normcoll_SOURCES = uninorm/test-u8-normcoll.c
-test_u8_normcoll_LDADD = $(LDADD) @LIBICONV@
+test_u8_normcoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uninorm/u8-normxfrm
+++ b/modules/uninorm/u8-normxfrm
@@ -13,9 +13,9 @@
 memxfrm
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uninorm/u8-normxfrm.c])
 
 Makefile.am:
-lib_SOURCES += uninorm/u8-normxfrm.c
 
 Include:
 "uninorm.h"
--- a/modules/unistdio/base
+++ b/modules/unistdio/base
@@ -2,14 +2,25 @@
 Base layer for formatted output to strings.
 
 Files:
-lib/unistdio.h
+lib/unistdio.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [unistdio.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNISTDIO_H)
+
+unistdio.h: unistdio.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/unistdio.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += unistdio.h unistdio.h-t
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-asnprintf
+++ b/modules/unistdio/u16-asnprintf
@@ -11,9 +11,9 @@
 unistdio/u16-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-asnprintf-tests
+++ b/modules/unistdio/u16-asnprintf-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-asnprintf1
 check_PROGRAMS += test-u16-asnprintf1
 test_u16_asnprintf1_SOURCES = unistdio/test-u16-asnprintf1.c
-test_u16_asnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u16_asnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u16-asprintf
+++ b/modules/unistdio/u16-asprintf
@@ -10,9 +10,9 @@
 unistdio/u16-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-snprintf
+++ b/modules/unistdio/u16-snprintf
@@ -10,9 +10,9 @@
 unistdio/u16-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-sprintf
+++ b/modules/unistdio/u16-sprintf
@@ -10,9 +10,9 @@
 unistdio/u16-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-asnprintf
+++ b/modules/unistdio/u16-u16-asnprintf
@@ -11,9 +11,9 @@
 unistdio/u16-u16-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-asprintf
+++ b/modules/unistdio/u16-u16-asprintf
@@ -10,9 +10,9 @@
 unistdio/u16-u16-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-snprintf
+++ b/modules/unistdio/u16-u16-snprintf
@@ -10,9 +10,9 @@
 unistdio/u16-u16-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-sprintf
+++ b/modules/unistdio/u16-u16-sprintf
@@ -10,9 +10,9 @@
 unistdio/u16-u16-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-vasnprintf
+++ b/modules/unistdio/u16-u16-vasnprintf
@@ -47,9 +47,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-vasprintf
+++ b/modules/unistdio/u16-u16-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-vsnprintf
+++ b/modules/unistdio/u16-u16-vsnprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-u16-vsprintf
+++ b/modules/unistdio/u16-u16-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-u16-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-u16-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-vasnprintf
+++ b/modules/unistdio/u16-vasnprintf
@@ -47,9 +47,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-vasnprintf-tests
+++ b/modules/unistdio/u16-vasnprintf-tests
@@ -25,8 +25,8 @@
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-u16-vasnprintf1 test-u16-vasnprintf2 test-u16-vasnprintf3
 test_u16_vasnprintf1_SOURCES = unistdio/test-u16-vasnprintf1.c
-test_u16_vasnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u16_vasnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_u16_vasnprintf2_SOURCES = unistdio/test-u16-vasnprintf2.c
-test_u16_vasnprintf2_LDADD = $(LDADD) @LIBICONV@
+test_u16_vasnprintf2_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_u16_vasnprintf3_SOURCES = unistdio/test-u16-vasnprintf3.c
-test_u16_vasnprintf3_LDADD = $(LDADD) @LIBICONV@
+test_u16_vasnprintf3_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u16-vasprintf
+++ b/modules/unistdio/u16-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-vasprintf-tests
+++ b/modules/unistdio/u16-vasprintf-tests
@@ -11,4 +11,4 @@
 TESTS += test-u16-vasprintf1
 check_PROGRAMS += test-u16-vasprintf1
 test_u16_vasprintf1_SOURCES = unistdio/test-u16-vasprintf1.c
-test_u16_vasprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u16_vasprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u16-vsnprintf
+++ b/modules/unistdio/u16-vsnprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-vsnprintf-tests
+++ b/modules/unistdio/u16-vsnprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-u16-vsnprintf1
 check_PROGRAMS += test-u16-vsnprintf1
 test_u16_vsnprintf1_SOURCES = unistdio/test-u16-vsnprintf1.c
-test_u16_vsnprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_u16_vsnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/u16-vsprintf
+++ b/modules/unistdio/u16-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u16-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u16-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u16-vsprintf-tests
+++ b/modules/unistdio/u16-vsprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-u16-vsprintf1
 check_PROGRAMS += test-u16-vsprintf1
 test_u16_vsprintf1_SOURCES = unistdio/test-u16-vsprintf1.c
-test_u16_vsprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_u16_vsprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/u32-asnprintf
+++ b/modules/unistdio/u32-asnprintf
@@ -11,9 +11,9 @@
 unistdio/u32-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-asnprintf-tests
+++ b/modules/unistdio/u32-asnprintf-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-asnprintf1
 check_PROGRAMS += test-u32-asnprintf1
 test_u32_asnprintf1_SOURCES = unistdio/test-u32-asnprintf1.c
-test_u32_asnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u32_asnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u32-asprintf
+++ b/modules/unistdio/u32-asprintf
@@ -10,9 +10,9 @@
 unistdio/u32-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-snprintf
+++ b/modules/unistdio/u32-snprintf
@@ -10,9 +10,9 @@
 unistdio/u32-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-sprintf
+++ b/modules/unistdio/u32-sprintf
@@ -10,9 +10,9 @@
 unistdio/u32-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-asnprintf
+++ b/modules/unistdio/u32-u32-asnprintf
@@ -11,9 +11,9 @@
 unistdio/u32-u32-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-asprintf
+++ b/modules/unistdio/u32-u32-asprintf
@@ -10,9 +10,9 @@
 unistdio/u32-u32-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-snprintf
+++ b/modules/unistdio/u32-u32-snprintf
@@ -10,9 +10,9 @@
 unistdio/u32-u32-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-sprintf
+++ b/modules/unistdio/u32-u32-sprintf
@@ -10,9 +10,9 @@
 unistdio/u32-u32-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-vasnprintf
+++ b/modules/unistdio/u32-u32-vasnprintf
@@ -47,9 +47,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-vasprintf
+++ b/modules/unistdio/u32-u32-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-vsnprintf
+++ b/modules/unistdio/u32-u32-vsnprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-u32-vsprintf
+++ b/modules/unistdio/u32-u32-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-u32-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-u32-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-vasnprintf
+++ b/modules/unistdio/u32-vasnprintf
@@ -47,9 +47,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-vasnprintf-tests
+++ b/modules/unistdio/u32-vasnprintf-tests
@@ -25,8 +25,8 @@
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-u32-vasnprintf1 test-u32-vasnprintf2 test-u32-vasnprintf3
 test_u32_vasnprintf1_SOURCES = unistdio/test-u32-vasnprintf1.c
-test_u32_vasnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u32_vasnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_u32_vasnprintf2_SOURCES = unistdio/test-u32-vasnprintf2.c
-test_u32_vasnprintf2_LDADD = $(LDADD) @LIBICONV@
+test_u32_vasnprintf2_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_u32_vasnprintf3_SOURCES = unistdio/test-u32-vasnprintf3.c
-test_u32_vasnprintf3_LDADD = $(LDADD) @LIBICONV@
+test_u32_vasnprintf3_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u32-vasprintf
+++ b/modules/unistdio/u32-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-vasprintf-tests
+++ b/modules/unistdio/u32-vasprintf-tests
@@ -11,4 +11,4 @@
 TESTS += test-u32-vasprintf1
 check_PROGRAMS += test-u32-vasprintf1
 test_u32_vasprintf1_SOURCES = unistdio/test-u32-vasprintf1.c
-test_u32_vasprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u32_vasprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u32-vsnprintf
+++ b/modules/unistdio/u32-vsnprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-vsnprintf-tests
+++ b/modules/unistdio/u32-vsnprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-u32-vsnprintf1
 check_PROGRAMS += test-u32-vsnprintf1
 test_u32_vsnprintf1_SOURCES = unistdio/test-u32-vsnprintf1.c
-test_u32_vsnprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_u32_vsnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/u32-vsprintf
+++ b/modules/unistdio/u32-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u32-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u32-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u32-vsprintf-tests
+++ b/modules/unistdio/u32-vsprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-u32-vsprintf1
 check_PROGRAMS += test-u32-vsprintf1
 test_u32_vsprintf1_SOURCES = unistdio/test-u32-vsprintf1.c
-test_u32_vsprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_u32_vsprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/u8-asnprintf
+++ b/modules/unistdio/u8-asnprintf
@@ -11,9 +11,9 @@
 unistdio/u8-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-asnprintf-tests
+++ b/modules/unistdio/u8-asnprintf-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-asnprintf1
 check_PROGRAMS += test-u8-asnprintf1
 test_u8_asnprintf1_SOURCES = unistdio/test-u8-asnprintf1.c
-test_u8_asnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u8_asnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u8-asprintf
+++ b/modules/unistdio/u8-asprintf
@@ -10,9 +10,9 @@
 unistdio/u8-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-snprintf
+++ b/modules/unistdio/u8-snprintf
@@ -10,9 +10,9 @@
 unistdio/u8-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-sprintf
+++ b/modules/unistdio/u8-sprintf
@@ -10,9 +10,9 @@
 unistdio/u8-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-asnprintf
+++ b/modules/unistdio/u8-u8-asnprintf
@@ -11,9 +11,9 @@
 unistdio/u8-u8-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-asprintf
+++ b/modules/unistdio/u8-u8-asprintf
@@ -10,9 +10,9 @@
 unistdio/u8-u8-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-snprintf
+++ b/modules/unistdio/u8-u8-snprintf
@@ -10,9 +10,9 @@
 unistdio/u8-u8-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-sprintf
+++ b/modules/unistdio/u8-u8-sprintf
@@ -10,9 +10,9 @@
 unistdio/u8-u8-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-vasnprintf
+++ b/modules/unistdio/u8-u8-vasnprintf
@@ -47,9 +47,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-vasprintf
+++ b/modules/unistdio/u8-u8-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-vsnprintf
+++ b/modules/unistdio/u8-u8-vsnprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-u8-vsprintf
+++ b/modules/unistdio/u8-u8-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-u8-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-u8-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-vasnprintf
+++ b/modules/unistdio/u8-vasnprintf
@@ -47,9 +47,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-vasnprintf-tests
+++ b/modules/unistdio/u8-vasnprintf-tests
@@ -25,8 +25,8 @@
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-u8-vasnprintf1 test-u8-vasnprintf2 test-u8-vasnprintf3
 test_u8_vasnprintf1_SOURCES = unistdio/test-u8-vasnprintf1.c
-test_u8_vasnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u8_vasnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_u8_vasnprintf2_SOURCES = unistdio/test-u8-vasnprintf2.c
-test_u8_vasnprintf2_LDADD = $(LDADD) @LIBICONV@
+test_u8_vasnprintf2_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_u8_vasnprintf3_SOURCES = unistdio/test-u8-vasnprintf3.c
-test_u8_vasnprintf3_LDADD = $(LDADD) @LIBICONV@
+test_u8_vasnprintf3_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u8-vasprintf
+++ b/modules/unistdio/u8-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-vasprintf-tests
+++ b/modules/unistdio/u8-vasprintf-tests
@@ -11,4 +11,4 @@
 TESTS += test-u8-vasprintf1
 check_PROGRAMS += test-u8-vasprintf1
 test_u8_vasprintf1_SOURCES = unistdio/test-u8-vasprintf1.c
-test_u8_vasprintf1_LDADD = $(LDADD) @LIBICONV@
+test_u8_vasprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/u8-vsnprintf
+++ b/modules/unistdio/u8-vsnprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-vsnprintf-tests
+++ b/modules/unistdio/u8-vsnprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-u8-vsnprintf1
 check_PROGRAMS += test-u8-vsnprintf1
 test_u8_vsnprintf1_SOURCES = unistdio/test-u8-vsnprintf1.c
-test_u8_vsnprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_u8_vsnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/u8-vsprintf
+++ b/modules/unistdio/u8-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/u8-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/u8-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/u8-vsprintf-tests
+++ b/modules/unistdio/u8-vsprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-u8-vsprintf1
 check_PROGRAMS += test-u8-vsprintf1
 test_u8_vsprintf1_SOURCES = unistdio/test-u8-vsprintf1.c
-test_u8_vsprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_u8_vsprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/ulc-asnprintf
+++ b/modules/unistdio/ulc-asnprintf
@@ -11,9 +11,9 @@
 unistdio/ulc-vasnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-asnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-asnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-asnprintf-tests
+++ b/modules/unistdio/ulc-asnprintf-tests
@@ -12,4 +12,4 @@
 TESTS += test-ulc-asnprintf1
 check_PROGRAMS += test-ulc-asnprintf1
 test_ulc_asnprintf1_SOURCES = unistdio/test-ulc-asnprintf1.c
-test_ulc_asnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_ulc_asnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/ulc-asprintf
+++ b/modules/unistdio/ulc-asprintf
@@ -10,9 +10,9 @@
 unistdio/ulc-vasprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-asprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-asprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-fprintf
+++ b/modules/unistdio/ulc-fprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-fprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-fprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-snprintf
+++ b/modules/unistdio/ulc-snprintf
@@ -10,9 +10,9 @@
 unistdio/ulc-vsnprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-snprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-snprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-sprintf
+++ b/modules/unistdio/ulc-sprintf
@@ -10,9 +10,9 @@
 unistdio/ulc-vsprintf
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-sprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-sprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-vasnprintf
+++ b/modules/unistdio/ulc-vasnprintf
@@ -45,9 +45,9 @@
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-vasnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-vasnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-vasnprintf-tests
+++ b/modules/unistdio/ulc-vasnprintf-tests
@@ -21,8 +21,8 @@
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-ulc-vasnprintf1 test-ulc-vasnprintf2 test-ulc-vasnprintf3
 test_ulc_vasnprintf1_SOURCES = unistdio/test-ulc-vasnprintf1.c
-test_ulc_vasnprintf1_LDADD = $(LDADD) @LIBICONV@
+test_ulc_vasnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_ulc_vasnprintf2_SOURCES = unistdio/test-ulc-vasnprintf2.c
-test_ulc_vasnprintf2_LDADD = $(LDADD) @LIBICONV@
+test_ulc_vasnprintf2_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 test_ulc_vasnprintf3_SOURCES = unistdio/test-ulc-vasnprintf3.c
-test_ulc_vasnprintf3_LDADD = $(LDADD) @LIBICONV@
+test_ulc_vasnprintf3_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/ulc-vasprintf
+++ b/modules/unistdio/ulc-vasprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-vasprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-vasprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-vasprintf-tests
+++ b/modules/unistdio/ulc-vasprintf-tests
@@ -11,4 +11,4 @@
 TESTS += test-ulc-vasprintf1
 check_PROGRAMS += test-ulc-vasprintf1
 test_ulc_vasprintf1_SOURCES = unistdio/test-ulc-vasprintf1.c
-test_ulc_vasprintf1_LDADD = $(LDADD) @LIBICONV@
+test_ulc_vasprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistdio/ulc-vfprintf
+++ b/modules/unistdio/ulc-vfprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-vfprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-vfprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-vsnprintf
+++ b/modules/unistdio/ulc-vsnprintf
@@ -11,9 +11,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-vsnprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-vsnprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-vsnprintf-tests
+++ b/modules/unistdio/ulc-vsnprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-ulc-vsnprintf1
 check_PROGRAMS += test-ulc-vsnprintf1
 test_ulc_vsnprintf1_SOURCES = unistdio/test-ulc-vsnprintf1.c
-test_ulc_vsnprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_ulc_vsnprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistdio/ulc-vsprintf
+++ b/modules/unistdio/ulc-vsprintf
@@ -12,9 +12,9 @@
 errno
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistdio/ulc-vsprintf.c])
 
 Makefile.am:
-lib_SOURCES += unistdio/ulc-vsprintf.c
 
 Include:
 "unistdio.h"
--- a/modules/unistdio/ulc-vsprintf-tests
+++ b/modules/unistdio/ulc-vsprintf-tests
@@ -13,4 +13,4 @@
 TESTS += test-ulc-vsprintf1
 check_PROGRAMS += test-ulc-vsprintf1
 test_ulc_vsprintf1_SOURCES = unistdio/test-ulc-vsprintf1.c
-test_ulc_vsprintf1_LDADD = $(LDADD) @LIBINTL@ @LIBICONV@
+test_ulc_vsprintf1_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ @LIBICONV@
--- a/modules/unistr/base
+++ b/modules/unistr/base
@@ -2,7 +2,8 @@
 Base layer for elementary Unicode string functions.
 
 Files:
-lib/unistr.h
+lib/unistr.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
@@ -11,8 +12,18 @@
 inline
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9.2], [unistr.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNISTR_H)
+
+unistr.h: unistr.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/unistr.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += unistr.h unistr.h-t
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-check
+++ b/modules/unistr/u16-check
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-check.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-check.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-check-tests
+++ b/modules/unistr/u16-check-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-check
 check_PROGRAMS += test-u16-check
 test_u16_check_SOURCES = unistr/test-u16-check.c
+test_u16_check_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-chr
+++ b/modules/unistr/u16-chr
@@ -9,9 +9,9 @@
 unistr/u16-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-chr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-chr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-chr-tests
+++ b/modules/unistr/u16-chr-tests
@@ -19,3 +19,4 @@
 TESTS += test-u16-chr
 check_PROGRAMS += test-u16-chr
 test_u16_chr_SOURCES = unistr/test-u16-chr.c
+test_u16_chr_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-cmp
+++ b/modules/unistr/u16-cmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-cmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-cmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-cmp-tests
+++ b/modules/unistr/u16-cmp-tests
@@ -18,3 +18,4 @@
 TESTS += test-u16-cmp
 check_PROGRAMS += test-u16-cmp
 test_u16_cmp_SOURCES = unistr/test-u16-cmp.c
+test_u16_cmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-cmp2
+++ b/modules/unistr/u16-cmp2
@@ -11,9 +11,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-cmp2.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-cmp2.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-cmp2-tests
+++ b/modules/unistr/u16-cmp2-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-cmp2
 check_PROGRAMS += test-u16-cmp2
 test_u16_cmp2_SOURCES = unistr/test-u16-cmp2.c
+test_u16_cmp2_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-cpy
+++ b/modules/unistr/u16-cpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-cpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-cpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-cpy-alloc
+++ b/modules/unistr/u16-cpy-alloc
@@ -10,9 +10,9 @@
 malloc-posix
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-cpy-alloc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-cpy-alloc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-cpy-alloc-tests
+++ b/modules/unistr/u16-cpy-alloc-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-cpy-alloc
 check_PROGRAMS += test-u16-cpy-alloc
 test_u16_cpy_alloc_SOURCES = unistr/test-u16-cpy-alloc.c
+test_u16_cpy_alloc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-cpy-tests
+++ b/modules/unistr/u16-cpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-cpy
 check_PROGRAMS += test-u16-cpy
 test_u16_cpy_SOURCES = unistr/test-u16-cpy.c
+test_u16_cpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-endswith
+++ b/modules/unistr/u16-endswith
@@ -11,9 +11,9 @@
 unistr/u16-cmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-endswith.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-endswith.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-mblen
+++ b/modules/unistr/u16-mblen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-mblen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-mblen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-mblen-tests
+++ b/modules/unistr/u16-mblen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-mblen
 check_PROGRAMS += test-u16-mblen
 test_u16_mblen_SOURCES = unistr/test-u16-mblen.c
+test_u16_mblen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-mbsnlen
+++ b/modules/unistr/u16-mbsnlen
@@ -9,9 +9,9 @@
 unistr/u16-mbtoucr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-mbsnlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-mbsnlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-mbsnlen-tests
+++ b/modules/unistr/u16-mbsnlen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-mbsnlen
 check_PROGRAMS += test-u16-mbsnlen
 test_u16_mbsnlen_SOURCES = unistr/test-u16-mbsnlen.c
+test_u16_mbsnlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-mbtouc
+++ b/modules/unistr/u16-mbtouc
@@ -10,9 +10,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u16-mbtouc])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-mbtouc.c unistr/u16-mbtouc-aux.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-mbtouc.c unistr/u16-mbtouc-aux.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-mbtouc-tests
+++ b/modules/unistr/u16-mbtouc-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-mbtouc
 check_PROGRAMS += test-u16-mbtouc
 test_u16_mbtouc_SOURCES = unistr/test-u16-mbtouc.c
+test_u16_mbtouc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-mbtouc-unsafe
+++ b/modules/unistr/u16-mbtouc-unsafe
@@ -10,9 +10,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u16-mbtouc-unsafe])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-mbtouc-unsafe.c unistr/u16-mbtouc-unsafe-aux.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-mbtouc-unsafe.c unistr/u16-mbtouc-unsafe-aux.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-mbtouc-unsafe-tests
+++ b/modules/unistr/u16-mbtouc-unsafe-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-mbtouc-unsafe
 check_PROGRAMS += test-u16-mbtouc-unsafe
 test_u16_mbtouc_unsafe_SOURCES = unistr/test-u16-mbtouc-unsafe.c
+test_u16_mbtouc_unsafe_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-mbtoucr
+++ b/modules/unistr/u16-mbtoucr
@@ -9,9 +9,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u16-mbtoucr])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-mbtoucr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-mbtoucr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-mbtoucr-tests
+++ b/modules/unistr/u16-mbtoucr-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-mbtoucr
 check_PROGRAMS += test-u16-mbtoucr
 test_u16_mbtoucr_SOURCES = unistr/test-u16-mbtoucr.c
+test_u16_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-move
+++ b/modules/unistr/u16-move
@@ -10,9 +10,9 @@
 memmove
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-move.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-move.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-move-tests
+++ b/modules/unistr/u16-move-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-move
 check_PROGRAMS += test-u16-move
 test_u16_move_SOURCES = unistr/test-u16-move.c
+test_u16_move_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-next
+++ b/modules/unistr/u16-next
@@ -9,9 +9,9 @@
 unistr/u16-strmbtouc
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-next.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-next.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-next-tests
+++ b/modules/unistr/u16-next-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-next
 check_PROGRAMS += test-u16-next
 test_u16_next_SOURCES = unistr/test-u16-next.c
+test_u16_next_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-prev
+++ b/modules/unistr/u16-prev
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-prev.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-prev.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-prev-tests
+++ b/modules/unistr/u16-prev-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-prev
 check_PROGRAMS += test-u16-prev
 test_u16_prev_SOURCES = unistr/test-u16-prev.c
+test_u16_prev_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-set
+++ b/modules/unistr/u16-set
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-set.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-set.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-set-tests
+++ b/modules/unistr/u16-set-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-set
 check_PROGRAMS += test-u16-set
 test_u16_set_SOURCES = unistr/test-u16-set.c
+test_u16_set_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-startswith
+++ b/modules/unistr/u16-startswith
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-startswith.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-startswith.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-stpcpy
+++ b/modules/unistr/u16-stpcpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-stpcpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-stpcpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-stpcpy-tests
+++ b/modules/unistr/u16-stpcpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-stpcpy
 check_PROGRAMS += test-u16-stpcpy
 test_u16_stpcpy_SOURCES = unistr/test-u16-stpcpy.c
+test_u16_stpcpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-stpncpy
+++ b/modules/unistr/u16-stpncpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u16-stpncpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-stpncpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-stpncpy-tests
+++ b/modules/unistr/u16-stpncpy-tests
@@ -18,3 +18,4 @@
 TESTS += test-u16-stpncpy
 check_PROGRAMS += test-u16-stpncpy
 test_u16_stpncpy_SOURCES = unistr/test-u16-stpncpy.c
+test_u16_stpncpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strcat
+++ b/modules/unistr/u16-strcat
@@ -10,9 +10,9 @@
 unistr/u16-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strcat.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strcat.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strcat-tests
+++ b/modules/unistr/u16-strcat-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-strcat
 check_PROGRAMS += test-u16-strcat
 test_u16_strcat_SOURCES = unistr/test-u16-strcat.c
+test_u16_strcat_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strchr
+++ b/modules/unistr/u16-strchr
@@ -9,9 +9,9 @@
 unistr/u16-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strchr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strchr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strcmp
+++ b/modules/unistr/u16-strcmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strcmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strcmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strcmp-tests
+++ b/modules/unistr/u16-strcmp-tests
@@ -12,3 +12,4 @@
 TESTS += test-u16-strcmp
 check_PROGRAMS += test-u16-strcmp
 test_u16_strcmp_SOURCES = unistr/test-u16-strcmp.c
+test_u16_strcmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strcoll
+++ b/modules/unistr/u16-strcoll
@@ -11,9 +11,9 @@
 uniconv/u16-strconv-to-locale
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u16-strcoll.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strcoll.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strcoll-tests
+++ b/modules/unistr/u16-strcoll-tests
@@ -12,4 +12,4 @@
 TESTS += test-u16-strcoll
 check_PROGRAMS += test-u16-strcoll
 test_u16_strcoll_SOURCES = unistr/test-u16-strcoll.c
-test_u16_strcoll_LDADD = $(LDADD) @LIBICONV@
+test_u16_strcoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistr/u16-strcpy
+++ b/modules/unistr/u16-strcpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strcpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strcpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strcpy-tests
+++ b/modules/unistr/u16-strcpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-strcpy
 check_PROGRAMS += test-u16-strcpy
 test_u16_strcpy_SOURCES = unistr/test-u16-strcpy.c
+test_u16_strcpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strcspn
+++ b/modules/unistr/u16-strcspn
@@ -12,9 +12,9 @@
 unistr/u16-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strcspn.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strcspn.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strdup
+++ b/modules/unistr/u16-strdup
@@ -10,9 +10,9 @@
 unistr/u16-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strdup.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strdup.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strdup-tests
+++ b/modules/unistr/u16-strdup-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-strdup
 check_PROGRAMS += test-u16-strdup
 test_u16_strdup_SOURCES = unistr/test-u16-strdup.c
+test_u16_strdup_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strlen
+++ b/modules/unistr/u16-strlen
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strlen-tests
+++ b/modules/unistr/u16-strlen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-strlen
 check_PROGRAMS += test-u16-strlen
 test_u16_strlen_SOURCES = unistr/test-u16-strlen.c
+test_u16_strlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strmblen
+++ b/modules/unistr/u16-strmblen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strmblen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strmblen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strmblen-tests
+++ b/modules/unistr/u16-strmblen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-strmblen
 check_PROGRAMS += test-u16-strmblen
 test_u16_strmblen_SOURCES = unistr/test-u16-strmblen.c
+test_u16_strmblen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strmbtouc
+++ b/modules/unistr/u16-strmbtouc
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strmbtouc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strmbtouc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strmbtouc-tests
+++ b/modules/unistr/u16-strmbtouc-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-strmbtouc
 check_PROGRAMS += test-u16-strmbtouc
 test_u16_strmbtouc_SOURCES = unistr/test-u16-strmbtouc.c
+test_u16_strmbtouc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strncat
+++ b/modules/unistr/u16-strncat
@@ -10,9 +10,9 @@
 unistr/u16-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strncat.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strncat.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strncat-tests
+++ b/modules/unistr/u16-strncat-tests
@@ -18,3 +18,4 @@
 TESTS += test-u16-strncat
 check_PROGRAMS += test-u16-strncat
 test_u16_strncat_SOURCES = unistr/test-u16-strncat.c
+test_u16_strncat_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strncmp
+++ b/modules/unistr/u16-strncmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strncmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strncmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strncmp-tests
+++ b/modules/unistr/u16-strncmp-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-strncmp
 check_PROGRAMS += test-u16-strncmp
 test_u16_strncmp_SOURCES = unistr/test-u16-strncmp.c
+test_u16_strncmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strncpy
+++ b/modules/unistr/u16-strncpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strncpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strncpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strncpy-tests
+++ b/modules/unistr/u16-strncpy-tests
@@ -18,3 +18,4 @@
 TESTS += test-u16-strncpy
 check_PROGRAMS += test-u16-strncpy
 test_u16_strncpy_SOURCES = unistr/test-u16-strncpy.c
+test_u16_strncpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strnlen
+++ b/modules/unistr/u16-strnlen
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strnlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strnlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strnlen-tests
+++ b/modules/unistr/u16-strnlen-tests
@@ -18,3 +18,4 @@
 TESTS += test-u16-strnlen
 check_PROGRAMS += test-u16-strnlen
 test_u16_strnlen_SOURCES = unistr/test-u16-strnlen.c
+test_u16_strnlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-strpbrk
+++ b/modules/unistr/u16-strpbrk
@@ -11,9 +11,9 @@
 unistr/u16-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strpbrk.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strpbrk.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strrchr
+++ b/modules/unistr/u16-strrchr
@@ -9,9 +9,9 @@
 unistr/u16-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strrchr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strrchr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strspn
+++ b/modules/unistr/u16-strspn
@@ -13,9 +13,9 @@
 unistr/u16-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strspn.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strspn.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strstr
+++ b/modules/unistr/u16-strstr
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strstr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strstr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-strtok
+++ b/modules/unistr/u16-strtok
@@ -11,9 +11,9 @@
 unistr/u16-strpbrk
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-strtok.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-strtok.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-to-u32
+++ b/modules/unistr/u16-to-u32
@@ -9,9 +9,9 @@
 unistr/u16-mbtoucr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u16-to-u32.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-to-u32.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-to-u32-tests
+++ b/modules/unistr/u16-to-u32-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-to-u32
 check_PROGRAMS += test-u16-to-u32
 test_u16_to_u32_SOURCES = unistr/test-u16-to-u32.c
+test_u16_to_u32_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-to-u8
+++ b/modules/unistr/u16-to-u8
@@ -10,9 +10,9 @@
 unistr/u8-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u16-to-u8.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-to-u8.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-to-u8-tests
+++ b/modules/unistr/u16-to-u8-tests
@@ -11,3 +11,4 @@
 TESTS += test-u16-to-u8
 check_PROGRAMS += test-u16-to-u8
 test_u16_to_u8_SOURCES = unistr/test-u16-to-u8.c
+test_u16_to_u8_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u16-uctomb
+++ b/modules/unistr/u16-uctomb
@@ -10,9 +10,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u16-uctomb])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u16-uctomb.c unistr/u16-uctomb-aux.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u16-uctomb.c unistr/u16-uctomb-aux.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u16-uctomb-tests
+++ b/modules/unistr/u16-uctomb-tests
@@ -10,3 +10,4 @@
 TESTS += test-u16-uctomb
 check_PROGRAMS += test-u16-uctomb
 test_u16_uctomb_SOURCES = unistr/test-u16-uctomb.c
+test_u16_uctomb_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-check
+++ b/modules/unistr/u32-check
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-check.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-check.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-check-tests
+++ b/modules/unistr/u32-check-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-check
 check_PROGRAMS += test-u32-check
 test_u32_check_SOURCES = unistr/test-u32-check.c
+test_u32_check_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-chr
+++ b/modules/unistr/u32-chr
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-chr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-chr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-chr-tests
+++ b/modules/unistr/u32-chr-tests
@@ -19,3 +19,4 @@
 TESTS += test-u32-chr
 check_PROGRAMS += test-u32-chr
 test_u32_chr_SOURCES = unistr/test-u32-chr.c
+test_u32_chr_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-cmp
+++ b/modules/unistr/u32-cmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-cmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-cmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-cmp-tests
+++ b/modules/unistr/u32-cmp-tests
@@ -18,3 +18,4 @@
 TESTS += test-u32-cmp
 check_PROGRAMS += test-u32-cmp
 test_u32_cmp_SOURCES = unistr/test-u32-cmp.c
+test_u32_cmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-cmp2
+++ b/modules/unistr/u32-cmp2
@@ -11,9 +11,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-cmp2.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-cmp2.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-cmp2-tests
+++ b/modules/unistr/u32-cmp2-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-cmp2
 check_PROGRAMS += test-u32-cmp2
 test_u32_cmp2_SOURCES = unistr/test-u32-cmp2.c
+test_u32_cmp2_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-cpy
+++ b/modules/unistr/u32-cpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-cpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-cpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-cpy-alloc
+++ b/modules/unistr/u32-cpy-alloc
@@ -10,9 +10,9 @@
 malloc-posix
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-cpy-alloc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-cpy-alloc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-cpy-alloc-tests
+++ b/modules/unistr/u32-cpy-alloc-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-cpy-alloc
 check_PROGRAMS += test-u32-cpy-alloc
 test_u32_cpy_alloc_SOURCES = unistr/test-u32-cpy-alloc.c
+test_u32_cpy_alloc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-cpy-tests
+++ b/modules/unistr/u32-cpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-cpy
 check_PROGRAMS += test-u32-cpy
 test_u32_cpy_SOURCES = unistr/test-u32-cpy.c
+test_u32_cpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-endswith
+++ b/modules/unistr/u32-endswith
@@ -11,9 +11,9 @@
 unistr/u32-cmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-endswith.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-endswith.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-mblen
+++ b/modules/unistr/u32-mblen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-mblen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-mblen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-mblen-tests
+++ b/modules/unistr/u32-mblen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-mblen
 check_PROGRAMS += test-u32-mblen
 test_u32_mblen_SOURCES = unistr/test-u32-mblen.c
+test_u32_mblen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-mbsnlen
+++ b/modules/unistr/u32-mbsnlen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-mbsnlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-mbsnlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-mbsnlen-tests
+++ b/modules/unistr/u32-mbsnlen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-mbsnlen
 check_PROGRAMS += test-u32-mbsnlen
 test_u32_mbsnlen_SOURCES = unistr/test-u32-mbsnlen.c
+test_u32_mbsnlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-mbtouc
+++ b/modules/unistr/u32-mbtouc
@@ -9,9 +9,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u32-mbtouc])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-mbtouc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-mbtouc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-mbtouc-tests
+++ b/modules/unistr/u32-mbtouc-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-mbtouc
 check_PROGRAMS += test-u32-mbtouc
 test_u32_mbtouc_SOURCES = unistr/test-u32-mbtouc.c
+test_u32_mbtouc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-mbtouc-unsafe
+++ b/modules/unistr/u32-mbtouc-unsafe
@@ -9,9 +9,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u32-mbtouc-unsafe])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-mbtouc-unsafe.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-mbtouc-unsafe.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-mbtouc-unsafe-tests
+++ b/modules/unistr/u32-mbtouc-unsafe-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-mbtouc-unsafe
 check_PROGRAMS += test-u32-mbtouc-unsafe
 test_u32_mbtouc_unsafe_SOURCES = unistr/test-u32-mbtouc-unsafe.c
+test_u32_mbtouc_unsafe_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-mbtoucr
+++ b/modules/unistr/u32-mbtoucr
@@ -9,9 +9,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u32-mbtoucr])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-mbtoucr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-mbtoucr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-mbtoucr-tests
+++ b/modules/unistr/u32-mbtoucr-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-mbtoucr
 check_PROGRAMS += test-u32-mbtoucr
 test_u32_mbtoucr_SOURCES = unistr/test-u32-mbtoucr.c
+test_u32_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-move
+++ b/modules/unistr/u32-move
@@ -10,9 +10,9 @@
 memmove
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-move.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-move.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-move-tests
+++ b/modules/unistr/u32-move-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-move
 check_PROGRAMS += test-u32-move
 test_u32_move_SOURCES = unistr/test-u32-move.c
+test_u32_move_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-next
+++ b/modules/unistr/u32-next
@@ -9,9 +9,9 @@
 unistr/u32-strmbtouc
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-next.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-next.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-next-tests
+++ b/modules/unistr/u32-next-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-next
 check_PROGRAMS += test-u32-next
 test_u32_next_SOURCES = unistr/test-u32-next.c
+test_u32_next_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-prev
+++ b/modules/unistr/u32-prev
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-prev.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-prev.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-prev-tests
+++ b/modules/unistr/u32-prev-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-prev
 check_PROGRAMS += test-u32-prev
 test_u32_prev_SOURCES = unistr/test-u32-prev.c
+test_u32_prev_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-set
+++ b/modules/unistr/u32-set
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-set.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-set.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-set-tests
+++ b/modules/unistr/u32-set-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-set
 check_PROGRAMS += test-u32-set
 test_u32_set_SOURCES = unistr/test-u32-set.c
+test_u32_set_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-startswith
+++ b/modules/unistr/u32-startswith
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-startswith.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-startswith.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-stpcpy
+++ b/modules/unistr/u32-stpcpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-stpcpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-stpcpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-stpcpy-tests
+++ b/modules/unistr/u32-stpcpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-stpcpy
 check_PROGRAMS += test-u32-stpcpy
 test_u32_stpcpy_SOURCES = unistr/test-u32-stpcpy.c
+test_u32_stpcpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-stpncpy
+++ b/modules/unistr/u32-stpncpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u32-stpncpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-stpncpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-stpncpy-tests
+++ b/modules/unistr/u32-stpncpy-tests
@@ -18,3 +18,4 @@
 TESTS += test-u32-stpncpy
 check_PROGRAMS += test-u32-stpncpy
 test_u32_stpncpy_SOURCES = unistr/test-u32-stpncpy.c
+test_u32_stpncpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strcat
+++ b/modules/unistr/u32-strcat
@@ -10,9 +10,9 @@
 unistr/u32-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strcat.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strcat.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strcat-tests
+++ b/modules/unistr/u32-strcat-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-strcat
 check_PROGRAMS += test-u32-strcat
 test_u32_strcat_SOURCES = unistr/test-u32-strcat.c
+test_u32_strcat_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strchr
+++ b/modules/unistr/u32-strchr
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strchr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strchr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strcmp
+++ b/modules/unistr/u32-strcmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strcmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strcmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strcmp-tests
+++ b/modules/unistr/u32-strcmp-tests
@@ -12,3 +12,4 @@
 TESTS += test-u32-strcmp
 check_PROGRAMS += test-u32-strcmp
 test_u32_strcmp_SOURCES = unistr/test-u32-strcmp.c
+test_u32_strcmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strcoll
+++ b/modules/unistr/u32-strcoll
@@ -11,9 +11,9 @@
 uniconv/u32-strconv-to-locale
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u32-strcoll.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strcoll.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strcoll-tests
+++ b/modules/unistr/u32-strcoll-tests
@@ -12,4 +12,4 @@
 TESTS += test-u32-strcoll
 check_PROGRAMS += test-u32-strcoll
 test_u32_strcoll_SOURCES = unistr/test-u32-strcoll.c
-test_u32_strcoll_LDADD = $(LDADD) @LIBICONV@
+test_u32_strcoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistr/u32-strcpy
+++ b/modules/unistr/u32-strcpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strcpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strcpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strcpy-tests
+++ b/modules/unistr/u32-strcpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-strcpy
 check_PROGRAMS += test-u32-strcpy
 test_u32_strcpy_SOURCES = unistr/test-u32-strcpy.c
+test_u32_strcpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strcspn
+++ b/modules/unistr/u32-strcspn
@@ -10,9 +10,9 @@
 unistr/u32-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strcspn.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strcspn.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strdup
+++ b/modules/unistr/u32-strdup
@@ -10,9 +10,9 @@
 unistr/u32-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strdup.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strdup.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strdup-tests
+++ b/modules/unistr/u32-strdup-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-strdup
 check_PROGRAMS += test-u32-strdup
 test_u32_strdup_SOURCES = unistr/test-u32-strdup.c
+test_u32_strdup_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strlen
+++ b/modules/unistr/u32-strlen
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strlen-tests
+++ b/modules/unistr/u32-strlen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-strlen
 check_PROGRAMS += test-u32-strlen
 test_u32_strlen_SOURCES = unistr/test-u32-strlen.c
+test_u32_strlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strmblen
+++ b/modules/unistr/u32-strmblen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strmblen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strmblen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strmblen-tests
+++ b/modules/unistr/u32-strmblen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-strmblen
 check_PROGRAMS += test-u32-strmblen
 test_u32_strmblen_SOURCES = unistr/test-u32-strmblen.c
+test_u32_strmblen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strmbtouc
+++ b/modules/unistr/u32-strmbtouc
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strmbtouc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strmbtouc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strmbtouc-tests
+++ b/modules/unistr/u32-strmbtouc-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-strmbtouc
 check_PROGRAMS += test-u32-strmbtouc
 test_u32_strmbtouc_SOURCES = unistr/test-u32-strmbtouc.c
+test_u32_strmbtouc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strncat
+++ b/modules/unistr/u32-strncat
@@ -10,9 +10,9 @@
 unistr/u32-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strncat.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strncat.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strncat-tests
+++ b/modules/unistr/u32-strncat-tests
@@ -18,3 +18,4 @@
 TESTS += test-u32-strncat
 check_PROGRAMS += test-u32-strncat
 test_u32_strncat_SOURCES = unistr/test-u32-strncat.c
+test_u32_strncat_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strncmp
+++ b/modules/unistr/u32-strncmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strncmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strncmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strncmp-tests
+++ b/modules/unistr/u32-strncmp-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-strncmp
 check_PROGRAMS += test-u32-strncmp
 test_u32_strncmp_SOURCES = unistr/test-u32-strncmp.c
+test_u32_strncmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strncpy
+++ b/modules/unistr/u32-strncpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strncpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strncpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strncpy-tests
+++ b/modules/unistr/u32-strncpy-tests
@@ -18,3 +18,4 @@
 TESTS += test-u32-strncpy
 check_PROGRAMS += test-u32-strncpy
 test_u32_strncpy_SOURCES = unistr/test-u32-strncpy.c
+test_u32_strncpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strnlen
+++ b/modules/unistr/u32-strnlen
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strnlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strnlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strnlen-tests
+++ b/modules/unistr/u32-strnlen-tests
@@ -18,3 +18,4 @@
 TESTS += test-u32-strnlen
 check_PROGRAMS += test-u32-strnlen
 test_u32_strnlen_SOURCES = unistr/test-u32-strnlen.c
+test_u32_strnlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-strpbrk
+++ b/modules/unistr/u32-strpbrk
@@ -9,9 +9,9 @@
 unistr/u32-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strpbrk.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strpbrk.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strrchr
+++ b/modules/unistr/u32-strrchr
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strrchr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strrchr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strspn
+++ b/modules/unistr/u32-strspn
@@ -9,9 +9,9 @@
 unistr/u32-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strspn.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strspn.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strstr
+++ b/modules/unistr/u32-strstr
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strstr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strstr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-strtok
+++ b/modules/unistr/u32-strtok
@@ -11,9 +11,9 @@
 unistr/u32-strpbrk
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-strtok.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-strtok.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-to-u16
+++ b/modules/unistr/u32-to-u16
@@ -9,9 +9,9 @@
 unistr/u16-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-to-u16.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-to-u16.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-to-u16-tests
+++ b/modules/unistr/u32-to-u16-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-to-u16
 check_PROGRAMS += test-u32-to-u16
 test_u32_to_u16_SOURCES = unistr/test-u32-to-u16.c
+test_u32_to_u16_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-to-u8
+++ b/modules/unistr/u32-to-u8
@@ -9,9 +9,9 @@
 unistr/u8-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-to-u8.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-to-u8.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-to-u8-tests
+++ b/modules/unistr/u32-to-u8-tests
@@ -11,3 +11,4 @@
 TESTS += test-u32-to-u8
 check_PROGRAMS += test-u32-to-u8
 test_u32_to_u8_SOURCES = unistr/test-u32-to-u8.c
+test_u32_to_u8_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u32-uctomb
+++ b/modules/unistr/u32-uctomb
@@ -9,9 +9,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u32-uctomb])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u32-uctomb.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u32-uctomb.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u32-uctomb-tests
+++ b/modules/unistr/u32-uctomb-tests
@@ -10,3 +10,4 @@
 TESTS += test-u32-uctomb
 check_PROGRAMS += test-u32-uctomb
 test_u32_uctomb_SOURCES = unistr/test-u32-uctomb.c
+test_u32_uctomb_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-check
+++ b/modules/unistr/u8-check
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-check.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-check.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-check-tests
+++ b/modules/unistr/u8-check-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-check
 check_PROGRAMS += test-u8-check
 test_u8_check_SOURCES = unistr/test-u8-check.c
+test_u8_check_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-chr
+++ b/modules/unistr/u8-chr
@@ -9,9 +9,9 @@
 unistr/u8-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-chr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-chr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-chr-tests
+++ b/modules/unistr/u8-chr-tests
@@ -19,3 +19,4 @@
 TESTS += test-u8-chr
 check_PROGRAMS += test-u8-chr
 test_u8_chr_SOURCES = unistr/test-u8-chr.c
+test_u8_chr_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-cmp
+++ b/modules/unistr/u8-cmp
@@ -9,9 +9,9 @@
 memcmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-cmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-cmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-cmp-tests
+++ b/modules/unistr/u8-cmp-tests
@@ -18,3 +18,4 @@
 TESTS += test-u8-cmp
 check_PROGRAMS += test-u8-cmp
 test_u8_cmp_SOURCES = unistr/test-u8-cmp.c
+test_u8_cmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-cmp2
+++ b/modules/unistr/u8-cmp2
@@ -11,9 +11,9 @@
 minmax
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-cmp2.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-cmp2.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-cmp2-tests
+++ b/modules/unistr/u8-cmp2-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-cmp2
 check_PROGRAMS += test-u8-cmp2
 test_u8_cmp2_SOURCES = unistr/test-u8-cmp2.c
+test_u8_cmp2_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-cpy
+++ b/modules/unistr/u8-cpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-cpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-cpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-cpy-alloc
+++ b/modules/unistr/u8-cpy-alloc
@@ -10,9 +10,9 @@
 malloc-posix
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-cpy-alloc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-cpy-alloc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-cpy-alloc-tests
+++ b/modules/unistr/u8-cpy-alloc-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-cpy-alloc
 check_PROGRAMS += test-u8-cpy-alloc
 test_u8_cpy_alloc_SOURCES = unistr/test-u8-cpy-alloc.c
+test_u8_cpy_alloc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-cpy-tests
+++ b/modules/unistr/u8-cpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-cpy
 check_PROGRAMS += test-u8-cpy
 test_u8_cpy_SOURCES = unistr/test-u8-cpy.c
+test_u8_cpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-endswith
+++ b/modules/unistr/u8-endswith
@@ -11,9 +11,9 @@
 unistr/u8-cmp
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-endswith.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-endswith.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-mblen
+++ b/modules/unistr/u8-mblen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-mblen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-mblen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-mblen-tests
+++ b/modules/unistr/u8-mblen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-mblen
 check_PROGRAMS += test-u8-mblen
 test_u8_mblen_SOURCES = unistr/test-u8-mblen.c
+test_u8_mblen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-mbsnlen
+++ b/modules/unistr/u8-mbsnlen
@@ -9,9 +9,9 @@
 unistr/u8-mbtoucr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u8-mbsnlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-mbsnlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-mbsnlen-tests
+++ b/modules/unistr/u8-mbsnlen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-mbsnlen
 check_PROGRAMS += test-u8-mbsnlen
 test_u8_mbsnlen_SOURCES = unistr/test-u8-mbsnlen.c
+test_u8_mbsnlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-mbtouc
+++ b/modules/unistr/u8-mbtouc
@@ -10,9 +10,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u8-mbtouc])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-mbtouc.c unistr/u8-mbtouc-aux.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-mbtouc.c unistr/u8-mbtouc-aux.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-mbtouc-tests
+++ b/modules/unistr/u8-mbtouc-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-mbtouc
 check_PROGRAMS += test-u8-mbtouc
 test_u8_mbtouc_SOURCES = unistr/test-u8-mbtouc.c
+test_u8_mbtouc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-mbtouc-unsafe
+++ b/modules/unistr/u8-mbtouc-unsafe
@@ -10,9 +10,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-mbtouc-unsafe.c unistr/u8-mbtouc-unsafe-aux.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-mbtouc-unsafe.c unistr/u8-mbtouc-unsafe-aux.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-mbtouc-unsafe-tests
+++ b/modules/unistr/u8-mbtouc-unsafe-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-mbtouc-unsafe
 check_PROGRAMS += test-u8-mbtouc-unsafe
 test_u8_mbtouc_unsafe_SOURCES = unistr/test-u8-mbtouc-unsafe.c
+test_u8_mbtouc_unsafe_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-mbtoucr
+++ b/modules/unistr/u8-mbtoucr
@@ -9,9 +9,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-mbtoucr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-mbtoucr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-mbtoucr-tests
+++ b/modules/unistr/u8-mbtoucr-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-mbtoucr
 check_PROGRAMS += test-u8-mbtoucr
 test_u8_mbtoucr_SOURCES = unistr/test-u8-mbtoucr.c
+test_u8_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-move
+++ b/modules/unistr/u8-move
@@ -10,9 +10,9 @@
 memmove
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-move.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-move.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-move-tests
+++ b/modules/unistr/u8-move-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-move
 check_PROGRAMS += test-u8-move
 test_u8_move_SOURCES = unistr/test-u8-move.c
+test_u8_move_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-next
+++ b/modules/unistr/u8-next
@@ -9,9 +9,9 @@
 unistr/u8-strmbtouc
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-next.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-next.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-next-tests
+++ b/modules/unistr/u8-next-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-next
 check_PROGRAMS += test-u8-next
 test_u8_next_SOURCES = unistr/test-u8-next.c
+test_u8_next_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-prev
+++ b/modules/unistr/u8-prev
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-prev.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-prev.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-prev-tests
+++ b/modules/unistr/u8-prev-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-prev
 check_PROGRAMS += test-u8-prev
 test_u8_prev_SOURCES = unistr/test-u8-prev.c
+test_u8_prev_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-set
+++ b/modules/unistr/u8-set
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-set.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-set.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-set-tests
+++ b/modules/unistr/u8-set-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-set
 check_PROGRAMS += test-u8-set
 test_u8_set_SOURCES = unistr/test-u8-set.c
+test_u8_set_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-startswith
+++ b/modules/unistr/u8-startswith
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-startswith.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-startswith.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-stpcpy
+++ b/modules/unistr/u8-stpcpy
@@ -10,9 +10,9 @@
 
 configure.ac:
 AC_CHECK_FUNCS_ONCE([stpcpy])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-stpcpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-stpcpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-stpcpy-tests
+++ b/modules/unistr/u8-stpcpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-stpcpy
 check_PROGRAMS += test-u8-stpcpy
 test_u8_stpcpy_SOURCES = unistr/test-u8-stpcpy.c
+test_u8_stpcpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-stpncpy
+++ b/modules/unistr/u8-stpncpy
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u8-stpncpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-stpncpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-stpncpy-tests
+++ b/modules/unistr/u8-stpncpy-tests
@@ -18,3 +18,4 @@
 TESTS += test-u8-stpncpy
 check_PROGRAMS += test-u8-stpncpy
 test_u8_stpncpy_SOURCES = unistr/test-u8-stpncpy.c
+test_u8_stpncpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strcat
+++ b/modules/unistr/u8-strcat
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strcat.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strcat.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strcat-tests
+++ b/modules/unistr/u8-strcat-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-strcat
 check_PROGRAMS += test-u8-strcat
 test_u8_strcat_SOURCES = unistr/test-u8-strcat.c
+test_u8_strcat_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strchr
+++ b/modules/unistr/u8-strchr
@@ -9,9 +9,9 @@
 unistr/u8-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strchr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strchr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strcmp
+++ b/modules/unistr/u8-strcmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strcmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strcmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strcmp-tests
+++ b/modules/unistr/u8-strcmp-tests
@@ -12,3 +12,4 @@
 TESTS += test-u8-strcmp
 check_PROGRAMS += test-u8-strcmp
 test_u8_strcmp_SOURCES = unistr/test-u8-strcmp.c
+test_u8_strcmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strcoll
+++ b/modules/unistr/u8-strcoll
@@ -11,9 +11,9 @@
 uniconv/u8-strconv-to-locale
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u8-strcoll.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strcoll.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strcoll-tests
+++ b/modules/unistr/u8-strcoll-tests
@@ -12,4 +12,4 @@
 TESTS += test-u8-strcoll
 check_PROGRAMS += test-u8-strcoll
 test_u8_strcoll_SOURCES = unistr/test-u8-strcoll.c
-test_u8_strcoll_LDADD = $(LDADD) @LIBICONV@
+test_u8_strcoll_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
--- a/modules/unistr/u8-strcpy
+++ b/modules/unistr/u8-strcpy
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strcpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strcpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strcpy-tests
+++ b/modules/unistr/u8-strcpy-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-strcpy
 check_PROGRAMS += test-u8-strcpy
 test_u8_strcpy_SOURCES = unistr/test-u8-strcpy.c
+test_u8_strcpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strcspn
+++ b/modules/unistr/u8-strcspn
@@ -12,9 +12,9 @@
 unistr/u8-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strcspn.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strcspn.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strdup
+++ b/modules/unistr/u8-strdup
@@ -11,9 +11,9 @@
 
 configure.ac:
 AC_CHECK_FUNCS_ONCE([strdup])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strdup.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strdup.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strdup-tests
+++ b/modules/unistr/u8-strdup-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-strdup
 check_PROGRAMS += test-u8-strdup
 test_u8_strdup_SOURCES = unistr/test-u8-strdup.c
+test_u8_strdup_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strlen
+++ b/modules/unistr/u8-strlen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strlen-tests
+++ b/modules/unistr/u8-strlen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-strlen
 check_PROGRAMS += test-u8-strlen
 test_u8_strlen_SOURCES = unistr/test-u8-strlen.c
+test_u8_strlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strmblen
+++ b/modules/unistr/u8-strmblen
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strmblen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strmblen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strmblen-tests
+++ b/modules/unistr/u8-strmblen-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-strmblen
 check_PROGRAMS += test-u8-strmblen
 test_u8_strmblen_SOURCES = unistr/test-u8-strmblen.c
+test_u8_strmblen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strmbtouc
+++ b/modules/unistr/u8-strmbtouc
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strmbtouc.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strmbtouc.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strmbtouc-tests
+++ b/modules/unistr/u8-strmbtouc-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-strmbtouc
 check_PROGRAMS += test-u8-strmbtouc
 test_u8_strmbtouc_SOURCES = unistr/test-u8-strmbtouc.c
+test_u8_strmbtouc_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strncat
+++ b/modules/unistr/u8-strncat
@@ -9,9 +9,9 @@
 strncat
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strncat.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strncat.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strncat-tests
+++ b/modules/unistr/u8-strncat-tests
@@ -18,3 +18,4 @@
 TESTS += test-u8-strncat
 check_PROGRAMS += test-u8-strncat
 test_u8_strncat_SOURCES = unistr/test-u8-strncat.c
+test_u8_strncat_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strncmp
+++ b/modules/unistr/u8-strncmp
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strncmp.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strncmp.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strncmp-tests
+++ b/modules/unistr/u8-strncmp-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-strncmp
 check_PROGRAMS += test-u8-strncmp
 test_u8_strncmp_SOURCES = unistr/test-u8-strncmp.c
+test_u8_strncmp_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strncpy
+++ b/modules/unistr/u8-strncpy
@@ -8,9 +8,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strncpy.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strncpy.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strncpy-tests
+++ b/modules/unistr/u8-strncpy-tests
@@ -18,3 +18,4 @@
 TESTS += test-u8-strncpy
 check_PROGRAMS += test-u8-strncpy
 test_u8_strncpy_SOURCES = unistr/test-u8-strncpy.c
+test_u8_strncpy_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strnlen
+++ b/modules/unistr/u8-strnlen
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strnlen.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strnlen.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strnlen-tests
+++ b/modules/unistr/u8-strnlen-tests
@@ -18,3 +18,4 @@
 TESTS += test-u8-strnlen
 check_PROGRAMS += test-u8-strnlen
 test_u8_strnlen_SOURCES = unistr/test-u8-strnlen.c
+test_u8_strnlen_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-strpbrk
+++ b/modules/unistr/u8-strpbrk
@@ -11,9 +11,9 @@
 unistr/u8-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strpbrk.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strpbrk.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strrchr
+++ b/modules/unistr/u8-strrchr
@@ -9,9 +9,9 @@
 unistr/u8-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strrchr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strrchr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strspn
+++ b/modules/unistr/u8-strspn
@@ -13,9 +13,9 @@
 unistr/u8-strchr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strspn.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strspn.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strstr
+++ b/modules/unistr/u8-strstr
@@ -9,9 +9,9 @@
 unistr/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strstr.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strstr.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-strtok
+++ b/modules/unistr/u8-strtok
@@ -11,9 +11,9 @@
 unistr/u8-strpbrk
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-strtok.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-strtok.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-to-u16
+++ b/modules/unistr/u8-to-u16
@@ -10,9 +10,9 @@
 unistr/u16-uctomb
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u8-to-u16.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-to-u16.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-to-u16-tests
+++ b/modules/unistr/u8-to-u16-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-to-u16
 check_PROGRAMS += test-u8-to-u16
 test_u8_to_u16_SOURCES = unistr/test-u8-to-u16.c
+test_u8_to_u16_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-to-u32
+++ b/modules/unistr/u8-to-u32
@@ -9,9 +9,9 @@
 unistr/u8-mbtoucr
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9.3], [unistr/u8-to-u32.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-to-u32.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-to-u32-tests
+++ b/modules/unistr/u8-to-u32-tests
@@ -11,3 +11,4 @@
 TESTS += test-u8-to-u32
 check_PROGRAMS += test-u8-to-u32
 test_u8_to_u32_SOURCES = unistr/test-u8-to-u32.c
+test_u8_to_u32_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unistr/u8-uctomb
+++ b/modules/unistr/u8-uctomb
@@ -10,9 +10,9 @@
 
 configure.ac:
 gl_MODULE_INDICATOR([unistr/u8-uctomb])
+gl_LIBUNISTRING_LIBSOURCE([0.9], [unistr/u8-uctomb.c unistr/u8-uctomb-aux.c])
 
 Makefile.am:
-lib_SOURCES += unistr/u8-uctomb.c unistr/u8-uctomb-aux.c
 
 Include:
 "unistr.h"
--- a/modules/unistr/u8-uctomb-tests
+++ b/modules/unistr/u8-uctomb-tests
@@ -10,3 +10,4 @@
 TESTS += test-u8-uctomb
 check_PROGRAMS += test-u8-uctomb
 test_u8_uctomb_SOURCES = unistr/test-u8-uctomb.c
+test_u8_uctomb_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/unitypes
+++ b/modules/unitypes
@@ -2,14 +2,24 @@
 Base types for Unicode string functions.
 
 Files:
-lib/unitypes.h
+lib/unitypes.in.h
 
 Depends-on:
 stdint
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H)
+
+unitypes.h: unitypes.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/unitypes.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += unitypes.h unitypes.h-t
 
 Include:
 "unitypes.h"
--- a/modules/uniwbrk/base
+++ b/modules/uniwbrk/base
@@ -2,14 +2,25 @@
 Base layer for word breaks.
 
 Files:
-lib/uniwbrk.h
+lib/uniwbrk.in.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [uniwbrk.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNIWBRK_H)
+
+uniwbrk.h: uniwbrk.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/uniwbrk.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += uniwbrk.h uniwbrk.h-t
 
 Include:
 "uniwbrk.h"
--- a/modules/uniwbrk/u16-wordbreaks
+++ b/modules/uniwbrk/u16-wordbreaks
@@ -12,9 +12,9 @@
 unistr/u16-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwbrk/u16-wordbreaks.c])
 
 Makefile.am:
-lib_SOURCES += uniwbrk/u16-wordbreaks.c
 
 Include:
 "uniwbrk.h"
--- a/modules/uniwbrk/u16-wordbreaks-tests
+++ b/modules/uniwbrk/u16-wordbreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u16-wordbreaks
 check_PROGRAMS += test-u16-wordbreaks
 test_u16_wordbreaks_SOURCES = uniwbrk/test-u16-wordbreaks.c
-
+test_u16_wordbreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwbrk/u32-wordbreaks
+++ b/modules/uniwbrk/u32-wordbreaks
@@ -12,9 +12,9 @@
 unistr/u32-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwbrk/u32-wordbreaks.c])
 
 Makefile.am:
-lib_SOURCES += uniwbrk/u32-wordbreaks.c
 
 Include:
 "uniwbrk.h"
--- a/modules/uniwbrk/u32-wordbreaks-tests
+++ b/modules/uniwbrk/u32-wordbreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u32-wordbreaks
 check_PROGRAMS += test-u32-wordbreaks
 test_u32_wordbreaks_SOURCES = uniwbrk/test-u32-wordbreaks.c
-
+test_u32_wordbreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwbrk/u8-wordbreaks
+++ b/modules/uniwbrk/u8-wordbreaks
@@ -12,9 +12,9 @@
 unistr/u8-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwbrk/u8-wordbreaks.c])
 
 Makefile.am:
-lib_SOURCES += uniwbrk/u8-wordbreaks.c
 
 Include:
 "uniwbrk.h"
--- a/modules/uniwbrk/u8-wordbreaks-tests
+++ b/modules/uniwbrk/u8-wordbreaks-tests
@@ -10,4 +10,4 @@
 TESTS += test-u8-wordbreaks
 check_PROGRAMS += test-u8-wordbreaks
 test_u8_wordbreaks_SOURCES = uniwbrk/test-u8-wordbreaks.c
-
+test_u8_wordbreaks_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwbrk/ulc-wordbreaks
+++ b/modules/uniwbrk/ulc-wordbreaks
@@ -13,9 +13,9 @@
 localcharset
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwbrk/ulc-wordbreaks.c])
 
 Makefile.am:
-lib_SOURCES += uniwbrk/ulc-wordbreaks.c
 
 Include:
 "uniwbrk.h"
--- a/modules/uniwbrk/ulc-wordbreaks-tests
+++ b/modules/uniwbrk/ulc-wordbreaks-tests
@@ -15,5 +15,5 @@
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@'
 check_PROGRAMS += test-ulc-wordbreaks
 test_ulc_wordbreaks_SOURCES = uniwbrk/test-ulc-wordbreaks.c
-test_ulc_wordbreaks_LDADD = $(LDADD) @LIBICONV@
+test_ulc_wordbreaks_LDADD = $(LDADD) $(LIBUNISTRING) @LIBICONV@
 
--- a/modules/uniwbrk/wordbreak-property
+++ b/modules/uniwbrk/wordbreak-property
@@ -9,9 +9,9 @@
 uniwbrk/base
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwbrk/wordbreak-property.c])
 
 Makefile.am:
-lib_SOURCES += uniwbrk/wordbreak-property.c
 
 Include:
 "uniwbrk.h"
--- a/modules/uniwidth/base
+++ b/modules/uniwidth/base
@@ -2,15 +2,26 @@
 Base layer for Unicode string width.
 
 Files:
-lib/uniwidth.h
+lib/uniwidth.in.h
 lib/localcharset.h
+m4/libunistring-base.m4
 
 Depends-on:
 unitypes
 
 configure.ac:
+gl_LIBUNISTRING_LIBHEADER([0.9], [uniwidth.h])
 
 Makefile.am:
+BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H)
+
+uniwidth.h: uniwidth.in.h
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/uniwidth.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u16-strwidth
+++ b/modules/uniwidth/u16-strwidth
@@ -10,9 +10,9 @@
 unistr/u16-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/u16-strwidth.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/u16-strwidth.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u16-strwidth-tests
+++ b/modules/uniwidth/u16-strwidth-tests
@@ -10,4 +10,4 @@
 TESTS += test-u16-strwidth
 check_PROGRAMS += test-u16-strwidth
 test_u16_strwidth_SOURCES = uniwidth/test-u16-strwidth.c
-
+test_u16_strwidth_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwidth/u16-width
+++ b/modules/uniwidth/u16-width
@@ -10,9 +10,9 @@
 unistr/u16-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/u16-width.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/u16-width.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u16-width-tests
+++ b/modules/uniwidth/u16-width-tests
@@ -10,4 +10,4 @@
 TESTS += test-u16-width
 check_PROGRAMS += test-u16-width
 test_u16_width_SOURCES = uniwidth/test-u16-width.c
-
+test_u16_width_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwidth/u32-strwidth
+++ b/modules/uniwidth/u32-strwidth
@@ -10,9 +10,9 @@
 unistr/u32-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/u32-strwidth.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/u32-strwidth.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u32-strwidth-tests
+++ b/modules/uniwidth/u32-strwidth-tests
@@ -10,4 +10,4 @@
 TESTS += test-u32-strwidth
 check_PROGRAMS += test-u32-strwidth
 test_u32_strwidth_SOURCES = uniwidth/test-u32-strwidth.c
-
+test_u32_strwidth_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwidth/u32-width
+++ b/modules/uniwidth/u32-width
@@ -9,9 +9,9 @@
 uniwidth/width
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/u32-width.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/u32-width.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u32-width-tests
+++ b/modules/uniwidth/u32-width-tests
@@ -10,4 +10,4 @@
 TESTS += test-u32-width
 check_PROGRAMS += test-u32-width
 test_u32_width_SOURCES = uniwidth/test-u32-width.c
-
+test_u32_width_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwidth/u8-strwidth
+++ b/modules/uniwidth/u8-strwidth
@@ -10,9 +10,9 @@
 unistr/u8-strlen
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/u8-strwidth.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/u8-strwidth.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u8-strwidth-tests
+++ b/modules/uniwidth/u8-strwidth-tests
@@ -10,4 +10,4 @@
 TESTS += test-u8-strwidth
 check_PROGRAMS += test-u8-strwidth
 test_u8_strwidth_SOURCES = uniwidth/test-u8-strwidth.c
-
+test_u8_strwidth_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwidth/u8-width
+++ b/modules/uniwidth/u8-width
@@ -10,9 +10,9 @@
 unistr/u8-mbtouc-unsafe
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/u8-width.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/u8-width.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/u8-width-tests
+++ b/modules/uniwidth/u8-width-tests
@@ -10,4 +10,4 @@
 TESTS += test-u8-width
 check_PROGRAMS += test-u8-width
 test_u8_width_SOURCES = uniwidth/test-u8-width.c
-
+test_u8_width_LDADD = $(LDADD) $(LIBUNISTRING)
--- a/modules/uniwidth/width
+++ b/modules/uniwidth/width
@@ -10,9 +10,9 @@
 streq
 
 configure.ac:
+gl_LIBUNISTRING_LIBSOURCE([0.9], [uniwidth/width.c])
 
 Makefile.am:
-lib_SOURCES += uniwidth/width.c
 
 Include:
 "uniwidth.h"
--- a/modules/uniwidth/width-tests
+++ b/modules/uniwidth/width-tests
@@ -12,5 +12,6 @@
 TESTS += test-uc_width uniwidth/test-uc_width2.sh
 check_PROGRAMS += test-uc_width test-uc_width2
 test_uc_width_SOURCES = uniwidth/test-uc_width.c
+test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING)
 test_uc_width2_SOURCES = uniwidth/test-uc_width2.c
-
+test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING)